An End to Order (many cores with java, session two)

294 views

Published on

Session Two of Many Cores with Java, looking at parallelism within a single modern core. Discusses the links with

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
294
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

An End to Order (many cores with java, session two)

  1. 1. An End to Ordermany cores with javasession twoparallelism in a single corecopyright 2013 Robert Burrell Donkin robertburrelldonkin.namethis work is licensed under a Creative Commons Attribution 3.0 Unported License
  2. 2. Pre-emptive multi-tasking operatingsystems use involuntary contextswitching to provide the illusion ofparallel processes even when thehardware supports only a single threadof execution.Take Away from Session One
  3. 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. 4. If Only Single Cores Were So Simple● Moores 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. 5. An End to Order● out of order execution○ execution order■ governed by efficiency■ not program order● serial execution is an illusion created bya conspiracy of○ core○ compiler and○ platform● enter the Java Memory Model
  6. 6. Parallel Pipelines● Superscalar○ instruction level parallelism● Siumultaneous MultiThreading○ aka HyperThreading○ hardware support for multiple threads of executionwithin the same core○ shared caches
  7. 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
  8. 8. Concurrent QualitiesRecall:● Responsiveness○ to human (or other external) actors● Liveliness○ an intrinsic quality○ all tasks continue to make progress
  9. 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 levelof throughput
  10. 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. 11. Even on a single core,theres no escaping parallelism.Take Away

×