Atomic Snapshots. Abstract Data Types Abstract representation of data & set of methods (operations) for accessing it Implement using primitives on base.

Slides:



Advertisements
Similar presentations
Impossibilities for Disjoint-Access Parallel Transactional Memory : Alessia Milani [Guerraoui & Kapalka, SPAA 08] [Attiya, Hillel & Milani, SPAA 09]
Advertisements

© 2005 P. Kouznetsov Computing with Reads and Writes in the Absence of Step Contention Hagit Attiya Rachid Guerraoui Petr Kouznetsov School of Computer.
1 © R. Guerraoui The Power of Registers Prof R. Guerraoui Distributed Programming Laboratory.
Uncoordinated Checkpointing The Global State Recording Algorithm Cristian Solano.
Scalable and Lock-Free Concurrent Dictionaries
CPSC 668Set 18: Wait-Free Simulations Beyond Registers1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
Safety Definitions and Inherent Bounds of Transactional Memory Eshcar Hillel.
Inherent limitations on DAP TMs 1 Inherent Limitations on Disjoint-Access Parallel Transactional Memory Hagit Attiya, Eshcar Hillel, Alessia Milani Technion.
1 Chapter 3 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2014 Synchronization Algorithms and Concurrent Programming Synchronization.
1 Nir Shavit Tel-Aviv University and Sun Microsystems Labs (Joint work with Maurice Herlihy of Brown University) © Herlihy and Shavit 2004 The Topological.
Two Techniques for Proving Lower Bounds Hagit Attiya Technion TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A.
Common2 Extended to Stacks Adam Morrison joint with Eli Gafni Yehuda Afek.
A Mile-High View of Concurrent Algorithms Hagit Attiya Technion.
Max Registers, Counters, and Monotone Circuits James Aspnes, Yale University Hagit Attiya, Technion Keren Censor, Technion PODC 2009.
Lower bound for sorting, radix sort COMP171 Fall 2006.
Winter School: Hot Topics in Distributed Computing 2010 Algorithms that Adapt to Contention Hagit Attiya (Technion & EPFL)
1 Principles of Reliable Distributed Systems Lecture 10: Atomic Shared Memory Objects and Shared Memory Emulations Spring 2007 Prof. Idit Keidar.
CPSC 668Set 16: Distributed Shared Memory1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
CPSC 668Set 17: Fault-Tolerant Register Simulations1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
Algorithmics for Software Transactional Memory Hagit Attiya Technion.
Distributed Algorithms (22903) Lecturer: Danny Hendler Shared objects: linearizability, wait-freedom and simulations Most of this presentation is based.
What Can Be Implemented Anonymously ? Paper by Rachid Guerraui and Eric Ruppert Presentation by Amir Anter 1.
1 Adaptive and Efficient Mutual Exclusion Presented by: By Hagit Attya and Vita Bortnikov Mian Huang.
Wait-Free Consensus with Infinite Arrivals James Aspnes Gauri Shah Jatin Shah Yale University STOC 2002.
Locality in Concurrent Data Structures Hagit Attiya Technion.
Deriving an Algorithm for the Weak Symmetry Breaking Task Armando Castañeda Sergio Rajsbaum Universidad Nacional Autónoma de México.
Hagit Attiya (CS, Technion) Joint work with Rachid Guerraoui (EPFL) Eric Ruppert (York University) Partial Snapshots.
Comparison Under Abstraction for Verifying Linearizability Daphna Amit Noam Rinetzky Mooly Sagiv Tom RepsEran Yahav Tel Aviv UniversityUniversity of Wisconsin.
Art of Multiprocessor Programming 1 Universality of Consensus Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
Synchronization Methods for Multicore Programming Brendan Lynch.
1 © R. Guerraoui Seth Gilbert Professor: Rachid Guerraoui Assistants: M. Kapalka and A. Dragojevic Distributed Programming Laboratory.
An Introduction to Software Transactional Memory
CHAPTER 71 TREE. Binary Tree A binary tree T is a finite set of one or more nodes such that: (a) T is empty or (b) There is a specially designated node.
Parallel Programming Philippas Tsigas Chalmers University of Technology Computer Science and Engineering Department © Philippas Tsigas.
Simple Wait-Free Snapshots for Real-Time Systems with Sporadic Tasks Håkan Sundell Philippas Tsigas.
Faster than Optimal Snapshots (for a While) James Aspnes, Yale University Hagit Attiya, Technion Keren Censor-Hillel, MIT Faith Ellen, University of Toronto.
Linearizability By Mila Oren 1. Outline  Sequential and concurrent specifications.  Define linearizability (intuition and formal model).  Composability.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 18: Wait-Free Simulations Beyond Registers 1.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 3 (26/01/2006) Instructor: Haifeng YU.
Håkan Sundell, Chalmers University of Technology 1 Simple and Fast Wait-Free Snapshots for Real-Time Systems Håkan Sundell Philippas.
A Consistency Framework for Iteration Operations in Concurrent Data Structures Yiannis Nikolakopoulos A. Gidenstam M. Papatriantafilou P. Tsigas Distributed.
1 Chapter 9 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2014 Synchronization Algorithms and Concurrent Programming Synchronization.
SEMINAR OPEN PROBLEMS IN DISTRIBUTED COMPUTING Winter Hagit Attiya & Faith Ellen Introduction1.
Maged M.Michael Michael L.Scott Department of Computer Science Univeristy of Rochester Presented by: Jun Miao.
Data Structure Introduction.
Common2 extended to stacks and unbound concurrency By:Yehuda Afek Eli Gafni Adam Morrison May 2007 Presentor: Dima Liahovitsky 1.
Non-Blocking Concurrent Data Objects With Abstract Concurrency By Jack Pribble Based on, “A Methodology for Implementing Highly Concurrent Data Objects,”
6.852: Distributed Algorithms Spring, 2008 Class 18.
Model Checking Linearizability via Refinement 1 ICFEM 2008 Model Checking Linearizability via Refinement Yang LIU, Wei CHEN, Yanhong A. LIU, and Jun SUN.
CS510 Concurrent Systems Jonathan Walpole. A Methodology for Implementing Highly Concurrent Data Objects.
Max Registers, Counters, and Monotone Circuits Keren Censor, Technion Joint work with: James Aspnes, Yale University Hagit Attiya, Technion (Slides
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 16: Distributed Shared Memory 1.
Distributed Algorithms (22903) Lecturer: Danny Hendler The wait-free hierarchy and the universality of consensus This presentation is based on the book.
“Towards Self Stabilizing Wait Free Shared Memory Objects” By:  Hopeman  Tsigas  Paptriantafilou Presented By: Sumit Sukhramani Kent State University.
Distributed Algorithms (22903) Lecturer: Danny Hendler The Atomic Snapshot Object The Renaming Problem This presentation is based on the book “Distributed.
Atomic snapshots in O(log³ n) steps using randomized helping James Aspnes, Yale Keren Censor-Hillel, Technion 1.
Distributed Algorithms (22903) Lecturer: Danny Hendler Shared objects: linearizability, wait-freedom and simulations Most of this presentation is based.
Distributed Algorithms (22903)
Distributed Algorithms (22903)
(Slides were added to Keren’s original presentation. DH.)
Distributed Algorithms (22903)
Distributed Algorithms (22903)
Distributed Algorithms (22903)
Distributed Algorithms (22903)
Distributed Algorithms (22903)
Distributed Algorithms (22903)
Deterministic Objects: Life Beyond Consensus
Distributed Algorithms (22903)
- Atomic register specification -
(Slides were added to Keren’s original presentation. DH.)
Presentation transcript:

Atomic Snapshots

Abstract Data Types Abstract representation of data & set of methods (operations) for accessing it Implement using primitives on base objects Introduction2 data

Correctness: Linearizability [Herlihy & Wing, 1990] For every concurrent execution there is a sequential execution that – Contains the same operations – Is legal (obeys the specification of the ADTs) – Preserves the real-time order of non-overlapping operations Each operation appears to takes effect instantaneously at some point between its invocation and its response (atomicity) Introduction3

Atomic Snapshot n components Update a single component Scan all the components “at once” (atomically) Provides an instantaneous view of the whole memory Introduction4 update ok scan v 1,…,v n

236825Introduction5 Atomic Snapshot Algorithm Update(v,k) A[k] =  v,seq i, i  Scan() repeat read A[1],…,A[n] if equal return A[1,…,n] Linearize: Updates with their writes Scans inside the double collects double collect [Afek, Attiya, Dolev, Gafni, Merritt, Shavit, JACM 1993]

Atomic Snapshot: Linearizability Double collect (read a set of values twice) If equal, there is no write between the collects – Assuming each write has a new value (seq#) Creates a “safe zone”, where the scan can be linearized Introduction6 read A[1],…,A[n] write A[j]

Liveness Conditions Wait-free: every operation completes within a finite number of (its own) steps  no starvation for mutex Nonblocking: some operation completes within a finite number of (some other process) steps  deadlock-freedom for mutex Obstruction-free: an operation (eventually) running solo completes within a finite number of (its own) steps – Also called solo termination wait-free  nonblocking  obstruction-free Introduction7

Wait-free Atomic Snapshot [Afek, Attiya, Dolev, Gafni, Merritt, Shavit, JACM 1993] Embed a scan within the Update Introduction8 Update(v,k) V = scan A[k] =  v,seq i, i,V  Scan() repeat read A[1],…,A[n] if equal return A[1,…,n] else record diff if twice p j return V j Linearize: Updates with their writes Direct scans as before Borrowed scans in place Linearize: Updates with their writes Direct scans as before Borrowed scans in place direct scan borrowed scan

Atomic Snapshot: Borrowed Scans Interference by process p j And another one…  p j does a scan inbeteween Linearizing with the borrowed scan is OK Introduction9 write A[j] read A[j] …… …… embedded scan write A[j] read A[j] …… ……

© Hagit Attiya (2013) 04: R/W simulations10 Complexity of Atomic Snapshots Scan needs O(n 2 ) reads and writes, why? Update needs O(n 2 ) reads and writes

O(nlogn) Atomic snapshots n components Scate - Update a single component and Scan all the components “at once” (atomically) Provides an instantaneous view of the whole memory 11 scate v 1,…,v n [Attiya, Rachman SIAM 1998]

One-shot Atomic Snapshot 12 scate v 1,…,v n

One-shot Atomic Snapshot 13 scate v 1,…,v n

The Classifier Procedure 14 K=2 1,1,1 lefties righties Local knowledge Original knowledge dominating knowledge Lemma: The output view of a righty dominates the union of the lefties outputs.

Atomic Snapshot from Classifiers Scate operation requires O(nlogn) operations on single-writer multireader registers.

Atomic Snapshot from Classifiers Scate(val) S i =(val) For j=1 to n current i,1 [j]=S j v=root For l=1 to log(n) current i,l+1 =Classifier(label(v),current i,l ) if righty then v = v.right if lefty then v = v.left Return current i,log(n)+1 16 Operations are ordered in the leaves : Operations arriving at different leaves are comparable. Operations arriving at the same leaf have exactly the same final knowledge.

Linearization scan update The views returned by the scate operations are comparable and ordered at the leaves from left to right