Factors to Consider When Choosing Accounts Payable Services Providers.pptx
An End to Order (many cores with java, session two)
1. An End to Order
many cores with java
session two
parallelism in a single core
copyright 2013 Robert Burrell Donkin robertburrelldonkin.name
this work is licensed under a Creative Commons Attribution 3.0 Unported License
2. Pre-emptive multi-tasking operating
systems use involuntary context
switching to provide the illusion of
parallel processes even when the
hardware supports only a single thread
of execution.
Take Away from Session One
3. Reflecting on the Exercises
● Pre-emptive
○ not time sharing
● Code can be interrupted...
○ at almost any time
● Concurrent Java is platform independent...
○ only when the rules are followed
4. If Only Single Cores Were So Simple
● Moore's Law
○ Number of transistors doubles every 2 years
● Pipelines
○ Small steps
○ Improves throughput
○ Facilitates higher clock
● How Long?
○ IBM Stretch - Fetch, Decode, and Execute
○ Classic RISC - 5 steps
○ Pentium D - 31 steps
5. An End to Order
● out of order execution
○ execution order
■ governed by efficiency
■ not program order
● serial execution is an illusion created by
a conspiracy of
○ core
○ compiler and
○ platform
● enter the Java Memory Model
6. Parallel Pipelines
● Superscalar
○ instruction level parallelism
● Siumultaneous MultiThreading
○ aka HyperThreading
○ hardware support for multiple threads of execution
within the same core
○ shared caches
7. What makes Parallelism Hard...?
● High-dimensional problem space
○ lots of potential solutions
● Unpredicatable
○ non-linearity
● Analysis is expensive
○ potentially entire system must be known
9. Performance Qualities
(following Doug Lea)
● Throughput
○ operations per unit time
● Latency
○ time taken to service a message
● Efficiency
○ computational resources required to achieve a level
of throughput
10. Performance Qualities
(following Doug Lea)
● Capacity
○ number of simultaneous tasks
■ for target throughput or latency
● Scalability
○ rate at which throughput or latency improves
■ when resources are added
● Degradation
○ rate at which throughput or latency improves
■ when activities are added
11. Even on a single core,
there's no escaping parallelism.
Take Away