The Relative Power of Synchronization Operations Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.

Slides:



Advertisements
Similar presentations
The Relative Power of Synchronization Operations Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
Advertisements

HardBound: Architectural Support for Spatial Safety of the C Programming Language Joe Devietti *, Colin Blundell, Milo Martin, Steve Zdancewic * University.
Universality of Consensus Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
The State Transition Diagram
12. Common Errors, a few Puzzles. © O. Nierstrasz P2 — Common Errors, a few Puzzles 12.2 Common Errors, a few Puzzles Sources  Cay Horstmann, Computing.
Universality of Consensus The Art of Multiprocessor Programming Spring 2007.
EngageNY.org ©2012 Core Knowledge Foundation. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Introduction Companion slides for
Spin Locks and Contention Based on slides by by Maurice Herlihy & Nir Shavit Tomer Gurevich.
Introduction to Software Engineering 7. Modeling Behaviour.
Concurrent Queues Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
©2013 Core Knowledge Foundation. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
The Relative Power of Synchronization Operations The Art of Multiprocessor Programming Spring 2007.
12. Summary, Trends, Research. © O. Nierstrasz PS — Summary, Trends, Research Roadmap  Summary: —Trends in programming paradigms  Research:...
Shared Counters and Parallelism Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
The Relative Power of Synchronization Operations Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
ESE Einführung in Software Engineering N. XXX Prof. O. Nierstrasz Fall Semester 2009.
ESE Einführung in Software Engineering X. CHAPTER Prof. O. Nierstrasz Wintersemester 2005 / 2006.
Metamodeling Seminar X. CHAPTER Prof. O. Nierstrasz Spring Semester 2008.
ESE Einführung in Software Engineering X. CHAPTER Prof. O. Nierstrasz Wintersemester 2005 / 2006.
N. XXX Prof. O. Nierstrasz Thanks to Jens Palsberg and Tony Hosking for their kind permission to reuse and adapt the CS132 and CS502 lecture notes.
Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Concurrent Skip Lists.
OORPT Object-Oriented Reengineering Patterns and Techniques X. CHAPTER Prof. O. Nierstrasz.
CP — Concurrent Programming X. CHAPTER Prof. O. Nierstrasz Wintersemester 2005 / 2006.
Art of Multiprocessor Programming 1 Universality of Consensus Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
12. eToys. © O. Nierstrasz PS — eToys 12.2 Denotational Semantics Overview:  … References:  …
SWOT Analysis Strengths Weaknesses SWOT Opportunities Threats.
Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.
Collecting Images & Clippings Chapter 2.3 in Sketching User Experiences: The Workbook.
Concurrent Objects Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
Concurrent Objects Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Please read sections 3.7 and 3.8.
Win8 on Intel Programming Course The challenge Paul Guermonprez Intel Software
Multicore Programming
Manifold Protocols TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.
Linearizability By Mila Oren 1. Outline  Sequential and concurrent specifications.  Define linearizability (intuition and formal model).  Composability.
The Animated Sequence Chapter 5.1 in Sketching User Experiences: The Workbook.
Multicore Programming Nir Shavit Tel Aviv University.
©2013 Core Knowledge Foundation. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Sketching Vocabulary Chapter 3.4 in Sketching User Experiences: The Workbook Drawing objects, people, and their activities.
Win8 on Intel Programming Course Paul Guermonprez Intel Software
State of the Ward in 2007 Version 1.0 A Fifth Sunday Lesson Given in the Sterling Park Ward, Ashburn, VA Stake by D. Calvin Andrus, Bishop
Design of Everyday Things Part 2: Useful Designs? Lecture /slide deck produced by Saul Greenberg, University of Calgary, Canada Images from:
Concurrent Objects MIT 6.05s by Maurice Herlihy & Nir Shavit.
© 2014 Core Knowledge Foundation. This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 3.0 Unported License.
Concurrent Queues Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
Programming Language Basics Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
Multiprocessor Architecture Basics Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
Concurrent Stacks Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
Futures, Scheduling, and Work Distribution Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit TexPoint fonts used.
Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Concurrent Skip Lists.
©2013 Core Knowledge Foundation. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Images of pesticides By: Leslie London, University of Cape Town This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5.
Spin Locks and Contention Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
Queue Locks and Local Spinning Some Slides based on: The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
EngageNY.org ©2012 Core Knowledge Foundation. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Concurrent Skip Lists.
© 2015 Core Knowledge Foundation. This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 3.0 Unported License.
1 Licence This presentation document is one used by Ryan Cartwright of Equitas IT Solutions [1] and is Copyright © 2008 Ryan P. Cartwright / Equitas IT.
Sketching Vocabulary Chapter 3.4 in Sketching User Experiences: The Workbook Drawing objects, people, and their activities.
Concurrent Objects Companion slides for
Concurrent Objects Companion slides for
Byzantine-Resilient Colorless Computaton
Pre and post workshop assessments
Elements of Combinatorial Topology
FOTW Worksheet Slides Christopher Penn, Financial Aid Podcast Student Loan Network.
Simulations and Reductions
Combinatorial Topology and Distributed Computing
The Relative Power of Synchronization Methods
The Relative Power of Synchronization Operations
The Relative Power of Synchronization Operations
Presentation transcript:

The Relative Power of Synchronization Operations Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit

Art of Multiprocessor Programming 2 Why is Mutual Exclusion so wrong?

Art of Multiprocessor Programming 3 Asynchronous Interrupts Swapped out back at ???

Art of Multiprocessor Programming 4 Heterogeneous Processors ??? yawn supercomputer toaster

Art of Multiprocessor Programming 5 Fault-tolerance ???

Art of Multiprocessor Programming 6 Machine Level Instruction Granularity Amdahl’s Law

Art of Multiprocessor Programming 7 Wait-Free Implementation Every method call completes in finite number of steps Implies no mutual exclusion

8 Basic Questions Wait-Free synchronization might be a good idea in principle But how do you do it … –Systematically? –Correctly? –Efficiently? Art of Multiprocessor Programming

9 Two-Thread Wait-Free Queue public class WaitFreeQueue { int head = 0, tail = 0; Item[QSIZE] items; public void enq(Item x) { while (tail - head == QSIZE) {}; items[tail % QSIZE] = x; tail++; } public Item deq() { while (tail - head == 0) {} Item item = items[head % QSIZE]; head++; return item; }} Art of Multiprocessor Programming 0 1 capacity-1 2 head tail y z

10 What About Multiple Dequeuers? Art of Multiprocessor Programming

11 Grand Challenge Implement a FIFO queue –Wait-free –Linearizable –From atomic read-write registers –Multiple dequeuers Only new aspect Art of Multiprocessor Programming

12 Puzzle Art of Multiprocessor Programming While you are ruminating on the grand challenge … We will give you another puzzle … Consensus!

Art of Multiprocessor Programming 13 Consensus: Each Thread has a Private Input

14 They Communicate Art of Multiprocessor Programming

15 They Agree on One Thread’s Input 19

16 Formally Theorem –There is no wait-free implementation of n-thread consensus from read-write registers Art of Multiprocessor Programming

17 The Consensus Hierarchy 1 Read/Write Registers, Snapshots… 2 getAndSet, getAndIncrement, … ∞ compareAndSet,…......

Art of Multiprocessor Programming 18 This work is licensed under a Creative Commons Attribution- ShareAlike 2.5 License.Creative Commons Attribution- ShareAlike 2.5 License You are free: –to Share — to copy, distribute and transmit the work –to Remix — to adapt the work Under the following conditions: –Attribution. You must attribute the work to “The Art of Multiprocessor Programming” (but not in any way that suggests that the authors endorse you or your use of the work). –Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license. For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to – Any of the above conditions can be waived if you get permission from the copyright holder. Nothing in this license impairs or restricts the author's moral rights.