1 / 45

The Future of Concurrency Theory Renaissance or Reformation?

The shift in technology towards multi-core processors and concurrency theory, exploring challenges, potential solutions, and implications for the future of computing and software development. Discusses the impact of Moore's Law, shared memory multiprocessors, fine-grained locking, and the need for a new approach to parallel programming. Raises questions about the value of upgrading to more cores, the role of theory in computer science, and the responsibilities that come with the sudden relevance of concurrency theory.

cfugate
Download Presentation

The Future of Concurrency Theory Renaissance or Reformation?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Future of Concurrency TheoryRenaissance or Reformation? (Met dank aan Maurice Herlihy) Frits Vaandrager

  2. Le Quatorze Juillet SAN FRANCISCO, May 7. 2004 - Intelsaid on Friday that it was scrapping its development of two microprocessors, a move that is a shift in the company's business strategy…. New York Times Intreedag 2008

  3. Moore’s Law Transistor count still rising Clock speed flattening sharply Intreedag 2008

  4. Still on some of your desktops: The Uniprocesor cpu memory Intreedag 2008 4

  5. In the Enterprise: The Shared Memory Multiprocessor(SMP) cache cache cache Bus Bus shared memory Intreedag 2008 5

  6. Your New Desktop: The Multicore Processor(CMP) Sun T2000 Niagara All on the same chip cache cache cache Bus Bus shared memory Intreedag 2008 6

  7. Multicores are Here • “Learn how the multi-core processor architecture plays a central role in Intel's platform approach. ….” • “AMD is leading the industry to multi-core technology for the x86 based computing market …” • “Sun's multicore strategy centers around multi-threaded software. ... “ Intreedag 2008

  8. World (re)discovers Concurrency Theory achievements This has already happened (sort-of) Renaissance? World learns of concurrency results Intreedag 2008

  9. Can we respond to the Real World’s challenges? Are we working on problems that matter? Can we recognize what’s going to be important? Reformation? Bonfire of the Vanities Intreedag 2008

  10. Time cured software bloat Double your path length? Wait 6 months, until Processor speed catches up In Classic Antiquity Intreedag 2008

  11. Multiprocessor companies failed in 80s Outstripped by sequential processors Field respected, but not taken seriously Parallelism Didn’t Matter Intreedag 2008

  12. Six months means more cores, same clock speed Must exploit more parallelism No one really knows how to do this The Old Order Lies in Ruins Intreedag 2008

  13. If more cores does not deliver more value … Then why upgrade? What Keeps Microsoft and Intel awake at Night? ? Intreedag 2008

  14. Computers could become like washing machines You don’t trade it in every 2 years for a cooler model You keep it until it breaks Washing Machine Science? Intreedag 2008

  15. Computer Science is driven by Moore’s law Each year we can do things we couldn’t do last year Means funding, students, excitement No Cores Please, we’re Theorists! ! Intreedag 2008

  16. Many challenges involve Concurrent algorithms Data structures Formal models Complexity & lower bounds, … Stuff we’re good at. With Sudden Relevance Comes Great Responsibility Intreedag 2008

  17. Concurrent Programming Today Intreedag 2008

  18. Coarse-Grained Locking Easily made correct … But not scalable. Intreedag 2008

  19. Fine-Grained Locking Here comes trouble … Intreedag 2008

  20. Locks are not Robust If a thread holding a lock is delayed … No one else can make progress Intreedag 2008

  21. Intreedag 2008

  22. Locking Relies on Conventions • Relation between • Lock bit and object bits • Exists only in programmer’s mind Actual comment from Linux Kernel (hat tip: Bradley Kuszmaul) /* * When a locked buffer is visible to the I/O layer * BH_Launder is set. This means before unlocking * we must clear BH_Launder,mb() on alpha and then * clear BH_Lock, so no reader can see BH_Launder set * on an unlocked buffer and then risk to deadlock. */ Intreedag 2008

  23. Sadistic Homework deq(y) enq(x) FIFO queue No interference if ends “far enough” apart Intreedag 2008

  24. Sadistic Homework deq(y) enq(x) FIFO queue Interference OK if ends “close enough” together Intreedag 2008

  25. One lock? Too Conservative Locks at each end? Deadlock, too complicated, etc Publishable result? Once, maybe still? You Try It … Intreedag 2008

  26. Downey’s Room Party Problem “A dean of students should keep order in the students' house. In order to do this, he can enter a room with too many students (in order to break up a too large party) or he can enter an empty room to conduct a search. Otherwise, the dean may not enter a room. If the dean is in a room, no additional students may enter, but students may leave. In that case, the dean has to stay until all students have left. There is only one dean, and no limitation on the number of students in one room.” Intreedag 2008

  27. Don’t be Shy Marc Schoolderman (first year CS student from Nijmegen) discovered bugs in published “solution” of Downey using a model checker Intreedag 2008

  28. The Transactional Manifesto • What we do now is inadequate to meet the multicore challenge • Research Agenda • Replace locking with a transactional API • Design languages to support this model • Implement the run-time to be fast enough Intreedag 2008

  29. Sadistic Homework Revisited Public void enq(item x) { Qnode q = new Qnode(x); q.next = this.tail; this.tail.next = q; } Write sequential Code (1) Intreedag 2008 29

  30. Sadistic Homework Revisited Public void LeftEnq(item x) { atomic { Qnode q = new Qnode(x); q.next = this.tail; this.tail.next = q; } } (1) Intreedag 2008 30

  31. Sadistic Homework Revisited Public void LeftEnq(item x) { atomic { Qnode q = new Qnode(x); q.next = this.tail; this.tail.next = q; } } Enclose in atomic block (1) Intreedag 2008 31

  32. Not always this simple Conditional waits Enhanced concurrency Complex patterns But often it is Works for sadistic homework Warning Intreedag 2008 32

  33. Composition Public void Transfer(Queue<T> q1, q2) { atomic { T x = q1.deq(); q2.enq(x); } } Trivial or what? (1) Intreedag 2008 33

  34. Not All Skittles and Beer • Algorithmic choices • Lower bounds • Better algorithms • Language design • Semantic issues • Like memory models • Atomicity checking Intreedag 2008

  35. How to resolve conflicts? Who moves forward and who rolls back? Lots of empirical work but formal work in infancy Contention Management & Scheduling Judgment of Solomon Intreedag 2008

  36. How do transactional & non-transactional threads synchronize? Similar to memory-model theory? Efficient algorithms? Strong vs Weak Isolation Intreedag 2008

  37. Transactions act as if it acquires SGL Good: Intuitively appealing Bad: What about aborted transactions? Expensive? Need better models Single Global Lock Semantics? Intreedag 2008

  38. Asynchrony Formal Models of Performance Intreedag 2008

  39. Asynchrony Multi-level Memory Formal Models of Performance Intreedag 2008

  40. Asynchrony Multi-level Memory Contention Formal Models of Performance Intreedag 2008

  41. Formal Verification • Concurrent algorithms are hard • Need routine verification of real algorithms • Model checking? • Theorem proving? • Probably both Intreedag 2008

  42. An Insurmountable Opportunity! • Multicore forces us to rethink almost everything Intreedag 2008

  43. An Insurmountable Opportunity! • Multicore forces us to rethink almost everything • The fate of CS as a vibrant field depends on our success Intreedag 2008

  44. An Insurmountable Opportunity! • Multicore forces us to rethink almost everything • The fate of CS as a vibrant field depends on our success • Concurrency theory has unique insights & advantages Intreedag 2008

  45. An Insurmountable Opportunity! • Multicore forces us to rethink almost everything • The fate of CS as a vibrant field depends on our success • Concurrency theory has unique insights & advantages • Are we equal to the task? Intreedag 2008

More Related