The Wait-Free Hierarchy

Size: px
Start display at page:

Download "The Wait-Free Hierarchy"

Transcription

1 Jennifer L. Welch

2 References 1 M. Herlihy, Wait-Free Synchronization, ACM TOPLAS, 13(1): (1991) M. Fischer, N. Lynch, and M. Paterson, Impossibility of Distributed Consensus with One Faulty Process, JACM 32(2): (1985)

3 Implementing Shared Objects 2 Consider a concurrent (parallel distributed) system that is asynchronous (no timing guarantees) failure-prone (processes can crash unannounced) provides some kind of shared memory building blocks What kinds of additional shared memory objects can we build?

4 Preview of the Answer 3 Depends on the semantics of the shared objects Is related to the ability of the objects to solve the consensus problem Data types can be organized into a hierarchy based on the number of processes for which they can solve consensus Data types at one level of the hierarchy cannot implement data types at a higher level of the hierarchy (roughly speaking)

5 The Consensus Problem 4 Each process has an input for simplicity, assume 0 or 1 Each (non-crashed) process should terminate and decide on an output such that Agreement: All decisions are the same Validity: The (common) decision is one of the inputs

6 Wait-Free Algorithms 5 An algorithm for n processors is wait-free if it can tolerate n - 1 failures. Intuition is that a nonfaulty processor does not wait for other processors to do something: it cannot, because it might be the only processor left alive.

7 Negative Result About Shared Read-Write Registers 6 Theorem: There is no wait-free asynchronous algorithm for consensus using shared r/w registers. Proof: By contradiction. Assume there is such an algorithm. Show there exists an initial system state in which the decision cannot be pre-determined. Show inductively how to go from an undetermined state to another undetermined state. Thus we can construct an infinitely long execution in which a decision cannot be made.

8 Notion of Valency 7 For any system state, consider all decision values that are reachable from that system state in all the different futures just 0, just 1, or both 0 and 1 Note: because of the asynchrony, there are many possible executions starting at any point, depending on the order in which processes take steps and when processes crash If both 0 and 1 are reachable, the state is called bivalent, otherwise it is univalent (0-valent or 1- valent).

9 Valency of a System State 8 C 0/1 0 0/1 1 0/1 D E F G decisions 0/1 : bivalent 1 : 1-valent 0 : 0-valent

10 Univalent Similarity 9 Lemma 1: If C 1 and C 2 are both univalent and they are similar w.r.t. process p (shared memory state is same, p s local state is same), then they have the same valency. Proof: only p takes steps C 1 v-valent p takes same number of steps p eventually decides v C 2 w-valent p behaves same and decides v

11 Bivalent Initial System State 10 Lemma 2: There exists a bivalent initial system state. Proof: By contradiction. Suppose all initial system states are univalent. The one with all 0 s input (call it C 0 ) is 0-valent, by validity. The one with all 1 s input (call it C 1 ) is 1-valent, by validity The one with half 0 s and half 1 s input (call it D): should be 0-valent by Lemma 1, comparing D and C 0 should be 1-valent by Lemma 1, comparing D and C 1

12 Critical Processors 11 Def: If C is bivalent and p(c) (result of p taking one step) is univalent, then p is critical in C. Lemma 3: If C is bivalent, then at least one processor is not critical in C, i.e., there is a bivalent extension. Proof: Suppose in contradiction all processors are critical. C bival. p q p(c) 0-val. q(c) 1-val. Rest of proof is case analysis of what p and q do in their two steps

13 Critical Processors 12 Case 1: p and q access different registers. p p(c) 0-val. q C bival. q q(c) 1-val. p Case 2: p and q read same register. Same proof.

14 Critical Processors 13 Case 3: p writes to a register R and q reads from R. C bival. p writes to R q reads from R p(c) 0-val q(c) 1-val p writes to R p(q(c)) 1-val similar w.r.t. p

15 Critical Processors 14 Case 4: What if p and q both write to the same shared variable? Can "assume away" the problem by assuming we only have single-writer shared variables. Or, can do a similar proof for this case.

16 Finishing the Impossibility Proof 15 Create an execution C 0,p 1,C 1,p 2,C 2, in which all system states are bivalent. contradicts termination requirement Start with bivalent initial system state (from Lemma 2). Suppose we have bivalent C k. To get bivalent C k+1 : Let p k+1 be a processor that is not critical in C k (exists by Lemma 3). Let C k+1 be p k+1 (C k ).

17 Data Types Beyond Registers 16 Registers support the operations read and write What about (wait-free) implementing a significantly different kind of data type out of registers? More generally, what about (wait-free) implementing an object of type X out of objects of type Y?

18 Key Insight 17 Ability of objects of type Y to be used to implement an object of type X is related to the ability of those data types to solve consensus! We are focusing on systems that are asynchronous shared memory wait-free

19 FIFO Queue Example 18 Sequential specification of a FIFO queue: operation with invocation enq(x) and response ack operation with invocation deq and response return(x) a sequence of operations is legal iff each deq returns the oldest enqueued value that has not yet been dequeued (returns if queue is empty)

20 19 Consensus Algorithm for 2 Processes (p 0 and p 1 ) Using FIFO Queue Initially Q = [0] and Prefer[i] = one shared FIFO queue two shared registers Prefer[i] := p i 's input val := deq(q) if val = 0 then decide on p i 's input else temp := Prefer[1 i] decide temp write my input into my register use shared queue to arbitrate between the 2 procs: first one to dequeue the initial 0 wins, decision value is its input loser obtains decision value from other proc's register

21 Implications of Consensus Algorithm 20 Using FIFO Queue Suppose we want to wait-free implement a FIFO queue using read/write registers. Is this possible? No! If it were possible, we could solve consensus: implement a FIFO queue using registers use implemented queue and previous algorithm to solve consensus

22 Extend Algorithm to More Procs? 21 Can we use FIFO queues to solve consensus with more than 2 processes? The ability to atomically dequeue a value was key to the 2-process alg: one process learns it is the winner the other learns it is the loser, therefore the id of the winner is obvious Not clear how to handle 3 processes. Suppose we have a different data type:

23 Compare & Swap Specification 22 compare&swap(x : shared memory address, old: value, new: value) previous := X // previous is a local var. if previous = old then X := new return previous X old new

24 Consensus Algorithm for n Processes 23 Using Compare-and-Swap Initially First = one shared C&S object val := compare&swap(first,, my input) if val = then decide on my input else decide val if First = then replace with my input simultaneously indicate the winner and the value to be decided by all the losers

25 Impossibility of 3-Process Consensus 24 with FIFO Queue Theorem: Wait-free consensus is impossible using FIFO queues and registers if n > 2. Proof: Same structure as for registers. Key difference is when considering situation when C is bivalent p(c) is 0-valent and q(c) is 1-valent.

26 Impossibility of 3-Process Consensus 25 with FIFO Queues p and q must be accessing the same FIFO queue. Case 1: Both steps are deq's. 0/1 C p deq's q deq's q deq's look same to r p deq's

27 Impossibility Proof 26 Case 2: p deq's and q enq's. Case 2.1: The queue is not empty in C 0/1 C p deq's q enq's 0 1 q enq's p deq's?

28 Impossibility Proof 27 Case 2: p deq's and q enq's. Case 2.2: The queue is empty in C p deq's queue is still empty 0/1 C 0 look the same to r queue is empty q enq's 1 p deq's queue is empty again 1

29 Impossibility Proof 28 Case 3: Both p and q enq (on same queue). p enq's A q enq's B σ: p takes steps until deq'ing A C 0/1 q enq's B 0 1 p enq's A σ: p takes steps until deq'ing B why do σ and τ exist? τ: q takes steps until deq'ing B τ: q takes steps until deq'ing A 0 look the same to r 1

30 Impossibility Proof 29 Case 3 cont'd: Suppose σ does not exist: p enq's A q enq's B C 0/1 q enq's B 0 1 p enq's A p takes steps until deciding but never deq's A; decides 0 p takes same number of steps as on the left; never deq's B; also decides 0 0 1

31 Impossibility Proof 30 Case 3 cont'd: Prove existence of τ similarly. Thus there is no wait-free algorithm for consensus with 3 processes using FIFO queues and registers.

32 Implications 31 Suppose we want to wait-free implement a compare&swap object using FIFO queues (and registers). Is this possible? Not if n > 2! If it were possible, we could solve consensus using FIFO queues (and registers): implement a compare&swap object using FIFO queues (and registers) use implemented compare&swap object and c&s algorithm to solve consensus

33 Generalize these Arguments 32 Previous results concerning FIFO queues and compare&swap suggest a criterion for determining if wait-free implementations exist: based on ability of the data types to solve consensus for a certain number of processes.

34 Consensus Number 33 Data type X has consensus number n if n is the largest number of processes for which consensus can be solved using only objects of type X and read/write registers. data type consensus number read/write register 1 FIFO queue 2 compare&swap

35 Using Consensus Numbers 34 Theorem: If data type X has consensus number m and data type Y has consensus number n with n > m, then there is no wait-free implementation of an object of type Y using objects of type X and read/write registers in a system with more than m procs. X X X reg reg reg Y

36 Using Consensus Numbers 35 Proof: Suppose in contradiction there is a wait-free implementation S of Y using X and registers in a system with k processes, where m < k n. Construct consensus algorithm for k > m processes using objects of type X (and registers): Use S to implement some objects of type Y using objects of type X (and registers) Use the (implemented) type Y objects (and registers) in the k-process consensus algorithm that exists since CN(Y) = n.

37 Corollaries 36 There is no wait-free implementation of any object with consensus number > 1 using just read/write registers. There is no wait-free implementation of any object with consensus number > 2 using just FIFO queues and read/write registers.

38 Universality 37 Let's now consider positive results relating to consensus number. A data type is universal if objects of that type (together with read/write registers) can wait-free implement any data type. Theorem: If data type X has consensus number n, then it is universal in a system with at most n processes.

39 Proving Universality Result Describe an algorithm that implements any data type uses compare&swap (instead of any object with consensus number n) implementation is only non-blocking, weaker than wait-free 2. Modify to use any object with consensus number n 3. Modify to be wait-free 4. Modify to bound shared memory used

40 Non-Blocking 39 Non-blocking vs. wait-free is analogous to nodeadlock vs. no-lockout for mutual exclusion. Non-blocking implementation: at any point in an execution, if at least one operation is pending (response is not yet ready to be done), then there is a finite sequence of steps by a single proc that completes one of the pending operations. Does not ensure that every pending operation is eventually completed.

41 Universal Construction 40 Keep history of operations that have been applied to the implemented object as a shared linked list. To apply an operation on the implemented object, the invoking proc. must insert an appropriate "node" into the linked list: it is convenient to put the newest node at the head of the list A compare&swap object is used to keep track of the head of the list

42 Details on Linked List 41 Each linked list node has operation invocation new state of the implemented object operation response pointer to previous node (previous op) anchor Head invocation state invocation state initial state response response before before

43 Implementation 42 Initially Head points to anchor node represents initial state of implemented object When inv is invoked: allocate a new linked list node in shared memory, pointed to by local var point point.inv := inv repeat h := Head // h is a local var point.state, point.response := apply(inv,h.state) point.before := h until compare&swap(head,h,point) = h do the output indicated by point.response depends on implemented data type if Head still points to same node h points to, then make Head point to new node.

44 Implementation Figure 43 invocation state response before point h p i Head invocation state response before if compare&swap indicates that Head has moved on, then try again to insert the new node, at the new location

45 Strengthenings of Algorithm 44 To replace compare&swap object with any object with consensus number n (the number of procs): define a consensus object (data type version of consensus problem) get around the difficulty that a consensus object can only be used once by adding a consensus object to each linked list node that points to next node in the list

46 Strengthenings of Algorithm 45 To get a wait-free implementation, use idea of helping: procs help each other to finish pending operations (not just their own) To reduce the size of the linked list (so it doesn't grow without bound), need to keep track of which list nodes can be recycled.

47 Effect of Randomization 46 Suppose we relax the liveness condition for linearizable shared memory: operations must terminate with high probability Now a randomized consensus algorithm can be used to implement any data type out of any other data type, including read/write registers I.e., hierarchy collapses.

The Relative Power of Synchronization Methods

The Relative Power of Synchronization Methods Chapter 5 The Relative Power of Synchronization Methods So far, we have been addressing questions of the form: Given objects X and Y, is there a wait-free implementation of X from one or more instances

More information

6.852: Distributed Algorithms Fall, Class 21

6.852: Distributed Algorithms Fall, Class 21 6.852: Distributed Algorithms Fall, 2009 Class 21 Today s plan Wait-free synchronization. The wait-free consensus hierarchy Universality of consensus Reading: [Herlihy, Wait-free synchronization] (Another

More information

Generic Proofs of Consensus Numbers for Abstract Data Types

Generic Proofs of Consensus Numbers for Abstract Data Types Generic Proofs of Consensus Numbers for Abstract Data Types Edward Talmage and Jennifer Welch Parasol Laboratory, Texas A&M University College Station, Texas, USA etalmage@tamu.edu, welch@cse.tamu.edu

More information

Generic Proofs of Consensus Numbers for Abstract Data Types

Generic Proofs of Consensus Numbers for Abstract Data Types Generic Proofs of Consensus Numbers for Abstract Data Types Edward Talmage 1 and Jennifer Welch 2 1 Parasol Laboratory, Texas A&M University, College Station, USA etalmage@tamu.edu 2 Parasol Laboratory,

More information

DD2451 Parallel and Distributed Computing --- FDD3008 Distributed Algorithms

DD2451 Parallel and Distributed Computing --- FDD3008 Distributed Algorithms DD2451 Parallel and Distributed Computing --- FDD3008 Distributed Algorithms Lecture 4 Consensus, I Mads Dam Autumn/Winter 2011 Slides: Much material due to M. Herlihy and R Wa8enhofer Last Lecture Shared

More information

Section 4 Concurrent Objects Correctness, Progress and Efficiency

Section 4 Concurrent Objects Correctness, Progress and Efficiency Section 4 Concurrent Objects Correctness, Progress and Efficiency CS586 - Panagiota Fatourou 1 Concurrent Objects A concurrent object is a data object shared by concurrently executing processes. Each object

More information

A Non-Blocking Concurrent Queue Algorithm

A Non-Blocking Concurrent Queue Algorithm A Non-Blocking Concurrent Queue Algorithm Bruno Didot bruno.didot@epfl.ch June 2012 Abstract This report presents a new non-blocking concurrent FIFO queue backed by an unrolled linked list. Enqueue and

More information

A class C of objects is universal for some set E of classes if and only if any object in E can be implemented with objects of C (and registers)

A class C of objects is universal for some set E of classes if and only if any object in E can be implemented with objects of C (and registers) Universality A class C of objects is universal for some set E of classes if and only if any object in E can be implemented with objects of C (and registers) n-consensus is universal for n-objects (objects

More information

Consensus Problem. Pradipta De

Consensus Problem. Pradipta De Consensus Problem Slides are based on the book chapter from Distributed Computing: Principles, Paradigms and Algorithms (Chapter 14) by Kshemkalyani and Singhal Pradipta De pradipta.de@sunykorea.ac.kr

More information

From Bounded to Unbounded Concurrency Objects and Back

From Bounded to Unbounded Concurrency Objects and Back From Bounded to Unbounded Concurrency Objects and Back Yehuda Afek afek@post.tau.ac.il Adam Morrison adamx@post.tau.ac.il School of Computer Science Tel Aviv University Guy Wertheim vgvertex@gmail.com

More information

Solo-Valency and the Cost of Coordination

Solo-Valency and the Cost of Coordination Solo-Valency and the Cost of Coordination Danny Hendler Nir Shavit November 21, 2007 Abstract This paper introduces solo-valency, a variation on the valency proof technique originated by Fischer, Lynch,

More information

Consensus. Chapter Two Friends. 2.3 Impossibility of Consensus. 2.2 Consensus 16 CHAPTER 2. CONSENSUS

Consensus. Chapter Two Friends. 2.3 Impossibility of Consensus. 2.2 Consensus 16 CHAPTER 2. CONSENSUS 16 CHAPTER 2. CONSENSUS Agreement All correct nodes decide for the same value. Termination All correct nodes terminate in finite time. Validity The decision value must be the input value of a node. Chapter

More information

Concurrent Computing. January 21, 2018

Concurrent Computing. January 21, 2018 Concurrent Computing Rachid Guerraoui Petr Kuznetsov January 21, 2018 Contents 1. Introduction 7 1.1. A broad picture: the concurrency revolution........................ 7 1.2. The topic: shared objects..................................

More information

Concurrent Objects and Linearizability

Concurrent Objects and Linearizability Chapter 3 Concurrent Objects and Linearizability 3.1 Specifying Objects An object in languages such as Java and C++ is a container for data. Each object provides a set of methods that are the only way

More information

Concurrent specifications beyond linearizability

Concurrent specifications beyond linearizability Concurrent specifications beyond linearizability Éric Goubault Jérémy Ledent Samuel Mimram École Polytechnique, France OPODIS 2018, Hong Kong December 19, 2018 1 / 14 Objects Processes communicate through

More information

DREU Research. Alyssa Byrnes, Graduate Mentor: Edward Talmage, Faculty Mentor: Jennifer Welch August 26, 2015

DREU Research. Alyssa Byrnes, Graduate Mentor: Edward Talmage, Faculty Mentor: Jennifer Welch August 26, 2015 DREU Research Alyssa Byrnes, Graduate Mentor: Edward Talmage, Faculty Mentor: Jennifer Welch August 26, 2015 Abstract Cloud computing has increased interest in implementing shared data objects in messagepassing

More information

Point-Set Topology for Impossibility Results in Distributed Computing. Thomas Nowak

Point-Set Topology for Impossibility Results in Distributed Computing. Thomas Nowak Point-Set Topology for Impossibility Results in Distributed Computing Thomas Nowak Overview Introduction Safety vs. Liveness First Example: Wait-Free Shared Memory Message Omission Model Execution Trees

More information

Synchrony Weakened by Message Adversaries vs Asynchrony Enriched with Failure Detectors. Michel Raynal, Julien Stainer

Synchrony Weakened by Message Adversaries vs Asynchrony Enriched with Failure Detectors. Michel Raynal, Julien Stainer Synchrony Weakened by Message Adversaries vs Asynchrony Enriched with Failure Detectors Michel Raynal, Julien Stainer Synchrony Weakened by Message Adversaries vs Asynchrony Enriched with Failure Detectors

More information

Fork Sequential Consistency is Blocking

Fork Sequential Consistency is Blocking Fork Sequential Consistency is Blocking Christian Cachin Idit Keidar Alexander Shraer May 14, 2008 Abstract We consider an untrusted server storing shared data on behalf of clients. We show that no storage

More information

Fork Sequential Consistency is Blocking

Fork Sequential Consistency is Blocking Fork Sequential Consistency is Blocking Christian Cachin Idit Keidar Alexander Shraer Novembe4, 008 Abstract We consider an untrusted server storing shared data on behalf of clients. We show that no storage

More information

The Universality of Consensus

The Universality of Consensus Chapter 6 The Universality of Consensus 6.1 Introduction In the previous chapter, we considered a simple technique for proving statements of the form there is no wait-free implementation of X by Y. We

More information

Nesting-Safe Recoverable Linearizability: Modular Constructions for Non-Volatile Memory

Nesting-Safe Recoverable Linearizability: Modular Constructions for Non-Volatile Memory Nesting-Safe Recoverable Linearizability: Modular Constructions for Non-Volatile Memory Hagit Attiya Department of Computer Science, Technion hagit@cs.technion.ac.il Ohad Ben-Baruch Department of Computer

More information

A simple correctness proof of the MCS contention-free lock. Theodore Johnson. Krishna Harathi. University of Florida. Abstract

A simple correctness proof of the MCS contention-free lock. Theodore Johnson. Krishna Harathi. University of Florida. Abstract A simple correctness proof of the MCS contention-free lock Theodore Johnson Krishna Harathi Computer and Information Sciences Department University of Florida Abstract Mellor-Crummey and Scott present

More information

RESEARCH ARTICLE. A Simple Byzantine Fault-Tolerant Algorithm for a Multi-Writer Regular Register

RESEARCH ARTICLE. A Simple Byzantine Fault-Tolerant Algorithm for a Multi-Writer Regular Register The International Journal of Parallel, Emergent and Distributed Systems Vol., No.,, 1 13 RESEARCH ARTICLE A Simple Byzantine Fault-Tolerant Algorithm for a Multi-Writer Regular Register Khushboo Kanjani,

More information

k-abortable Objects: Progress under High Contention

k-abortable Objects: Progress under High Contention k-abortable Objects: Progress under High Contention Naama Ben-David 1, David Yu Cheng Chan 2, Vassos Hadzilacos 2, and Sam Toueg 2 Carnegie Mellon University 1 University of Toronto 2 Outline Background

More information

Time and Space Lower Bounds for Implementations Using k-cas

Time and Space Lower Bounds for Implementations Using k-cas Time and Space Lower Bounds for Implementations Using k-cas Hagit Attiya Danny Hendler September 12, 2006 Abstract This paper presents lower bounds on the time- and space-complexity of implementations

More information

Non-blocking Array-based Algorithms for Stacks and Queues!

Non-blocking Array-based Algorithms for Stacks and Queues! Non-blocking Array-based Algorithms for Stacks and Queues! Niloufar Shafiei! Department of Computer Science and Engineering York University ICDCN 09 Outline! Introduction! Stack algorithm! Queue algorithm!

More information

Cache-Aware Lock-Free Queues for Multiple Producers/Consumers and Weak Memory Consistency

Cache-Aware Lock-Free Queues for Multiple Producers/Consumers and Weak Memory Consistency Cache-Aware Lock-Free Queues for Multiple Producers/Consumers and Weak Memory Consistency Anders Gidenstam Håkan Sundell Philippas Tsigas School of business and informatics University of Borås Distributed

More information

Consensus. Chapter Two Friends. 8.3 Impossibility of Consensus. 8.2 Consensus 8.3. IMPOSSIBILITY OF CONSENSUS 55

Consensus. Chapter Two Friends. 8.3 Impossibility of Consensus. 8.2 Consensus 8.3. IMPOSSIBILITY OF CONSENSUS 55 8.3. IMPOSSIBILITY OF CONSENSUS 55 Agreement All correct nodes decide for the same value. Termination All correct nodes terminate in finite time. Validity The decision value must be the input value of

More information

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 Concurrent Objects Companion slides for The by Maurice Herlihy & Nir Shavit Concurrent Computation memory object object 2 Objectivism What is a concurrent object? How do we describe one? How do we implement

More information

Consensus a classic problem. Consensus, impossibility results and Paxos. Distributed Consensus. Asynchronous networks.

Consensus a classic problem. Consensus, impossibility results and Paxos. Distributed Consensus. Asynchronous networks. Consensus, impossibility results and Paxos Ken Birman Consensus a classic problem Consensus abstraction underlies many distributed systems and protocols N processes They start execution with inputs {0,1}

More information

Shared Objects. Shared Objects

Shared Objects. Shared Objects Shared Objects Shared Objects Invoked operations have a non-zero duration Invocations can overlap Useful for: modeling distributed shared memory Objects can be combined together to implement higher level

More information

Relationships Between Broadcast and Shared Memory in Reliable Anonymous Distributed Systems

Relationships Between Broadcast and Shared Memory in Reliable Anonymous Distributed Systems Relationships Between Broadcast and Shared Memory in Reliable Anonymous Distributed Systems James Aspnes, Yale University Faith Ellen Fich, University of Toronto Eric Ruppert, York University Anonymity

More information

Consensus, impossibility results and Paxos. Ken Birman

Consensus, impossibility results and Paxos. Ken Birman Consensus, impossibility results and Paxos Ken Birman Consensus a classic problem Consensus abstraction underlies many distributed systems and protocols N processes They start execution with inputs {0,1}

More information

Impossibility of Agreement in Asynchronous Systems

Impossibility of Agreement in Asynchronous Systems Consensus protocol P 8 schedule from C finite or infinite sequence σ of events that can be applied, in turn, from C a run is the sequence of steps associated with a schedule let σ finite, then C' = σ(c)

More information

6.852 Lecture 17. Atomic objects Reading: Chapter 13 Next lecture: Atomic snapshot, read/write register

6.852 Lecture 17. Atomic objects Reading: Chapter 13 Next lecture: Atomic snapshot, read/write register 6.852 Lecture 17 Atomic objects Reading: Chapter 13 Next lecture: Atomic snapshot, read/write register Shared-memory model Single I/O automaton with locality restrictions doesn't exploit I/O automaton

More information

arxiv: v1 [cs.dc] 6 May 2014

arxiv: v1 [cs.dc] 6 May 2014 Consensus with an Abstract MAC Layer Calvin Newport Georgetown University cnewport@cs.georgetown.edu arxiv:1405.1382v1 [cs.dc] 6 May 2014 Abstract In this paper, we study distributed consensus in the radio

More information

Computing with Infinitely Many Processes under assumptions on concurrency and participation -M.Merritt&G.Taubenfeld. Dean Christakos & Deva Seetharam

Computing with Infinitely Many Processes under assumptions on concurrency and participation -M.Merritt&G.Taubenfeld. Dean Christakos & Deva Seetharam Computing with Infinitely Many Processes under assumptions on concurrency and participation -M.Merritt&G.Taubenfeld Dean Christakos & Deva Seetharam November 25, 2003 Abstract This paper explores four

More information

Unit 6: Indeterminate Computation

Unit 6: Indeterminate Computation Unit 6: Indeterminate Computation Martha A. Kim October 6, 2013 Introduction Until now, we have considered parallelizations of sequential programs. The parallelizations were deemed safe if the parallel

More information

1 The comparison of QC, SC and LIN

1 The comparison of QC, SC and LIN Com S 611 Spring Semester 2009 Algorithms for Multiprocessor Synchronization Lecture 5: Tuesday, 3rd February 2009 Instructor: Soma Chaudhuri Scribe: Jianrong Dong 1 The comparison of QC, SC and LIN Pi

More information

Byzantine Consensus in Directed Graphs

Byzantine Consensus in Directed Graphs Byzantine Consensus in Directed Graphs Lewis Tseng 1,3, and Nitin Vaidya 2,3 1 Department of Computer Science, 2 Department of Electrical and Computer Engineering, and 3 Coordinated Science Laboratory

More information

Initial Assumptions. Modern Distributed Computing. Network Topology. Initial Input

Initial Assumptions. Modern Distributed Computing. Network Topology. Initial Input Initial Assumptions Modern Distributed Computing Theory and Applications Ioannis Chatzigiannakis Sapienza University of Rome Lecture 4 Tuesday, March 6, 03 Exercises correspond to problems studied during

More information

arxiv: v1 [cs.dc] 13 May 2017

arxiv: v1 [cs.dc] 13 May 2017 Which Broadcast Abstraction Captures k-set Agreement? Damien Imbs, Achour Mostéfaoui, Matthieu Perrin, Michel Raynal, LIF, Université Aix-Marseille, 13288 Marseille, France LINA, Université de Nantes,

More information

Non-blocking Array-based Algorithms for Stacks and Queues. Niloufar Shafiei

Non-blocking Array-based Algorithms for Stacks and Queues. Niloufar Shafiei Non-blocking Array-based Algorithms for Stacks and Queues Niloufar Shafiei Outline Introduction Concurrent stacks and queues Contributions New algorithms New algorithms using bounded counter values Correctness

More information

Semi-Passive Replication in the Presence of Byzantine Faults

Semi-Passive Replication in the Presence of Byzantine Faults Semi-Passive Replication in the Presence of Byzantine Faults HariGovind V. Ramasamy Adnan Agbaria William H. Sanders University of Illinois at Urbana-Champaign 1308 W. Main Street, Urbana IL 61801, USA

More information

arxiv: v1 [cs.dc] 8 May 2017

arxiv: v1 [cs.dc] 8 May 2017 Towards Reduced Instruction Sets for Synchronization arxiv:1705.02808v1 [cs.dc] 8 May 2017 Rati Gelashvili MIT gelash@mit.edu Alexander Spiegelman Technion sashas@tx.technion.ac.il Idit Keidar Technion

More information

On the Importance of Synchronization Primitives with Low Consensus Numbers

On the Importance of Synchronization Primitives with Low Consensus Numbers On the Importance of Synchronization Primitives with Low Consensus Numbers ABSTRACT Pankaj Khanchandani ETH Zurich kpankaj@ethz.ch The consensus number of a synchronization primitive is the maximum number

More information

Shared Memory Seif Haridi

Shared Memory Seif Haridi Shared Memory Seif Haridi haridi@kth.se Real Shared Memory Formal model of shared memory No message passing (No channels, no sends, no delivers of messages) Instead processes access a shared memory Models

More information

Shared Memory. Chapter Model

Shared Memory. Chapter Model Chapter 5 Shared Memory In distributed computing, various different models exist. So far, the focus of the course was on loosely-coupled distributed systems such as the Internet, where nodes asynchronously

More information

Distributed Algorithms 6.046J, Spring, Nancy Lynch

Distributed Algorithms 6.046J, Spring, Nancy Lynch Distributed Algorithms 6.046J, Spring, 205 Nancy Lynch What are Distributed Algorithms? Algorithms that run on networked processors, or on multiprocessors that share memory. They solve many kinds of problems:

More information

Temporal Logic of Actions (TLA) (a brief introduction) Shmuel Katz Computer Science Department The Technion

Temporal Logic of Actions (TLA) (a brief introduction) Shmuel Katz Computer Science Department The Technion Temporal Logic of Actions (TLA) (a brief introduction) Shmuel Katz Computer Science Department The Technion CS236368 Formal Specifications Lecture-- TLA 1 Basic Idea Combine transitions with temporal logic

More information

Review of last lecture. Goals of this lecture. DPHPC Overview. Lock-based queue. Lock-based queue

Review of last lecture. Goals of this lecture. DPHPC Overview. Lock-based queue. Lock-based queue Review of last lecture Design of Parallel and High-Performance Computing Fall 2013 Lecture: Linearizability Instructor: Torsten Hoefler & Markus Püschel TA: Timo Schneider Cache-coherence is not enough!

More information

On the Space Complexity of Randomized Synchronization

On the Space Complexity of Randomized Synchronization On the Space Complexity of Randomized Synchronization FAITH FICH University of Toronto, Toronto, Ont., Canada MAURICE HERLIHY Brown University, Providence, Rhode Island AND NIR SHAVIT Tel-Aviv University,

More information

Parallélisme. Aim of the talk. Decision tasks. Example: consensus

Parallélisme. Aim of the talk. Decision tasks. Example: consensus Parallélisme Aim of the talk Geometry and Distributed Systems Can we implement some functions on some distributed architecture, even if there are some crashes? Eric Goubault Commissariat à l Energie Atomique

More information

DD2451 Parallel and Distributed Computing --- FDD3008 Distributed Algorithms

DD2451 Parallel and Distributed Computing --- FDD3008 Distributed Algorithms DD2451 Parallel and Distributed Computing --- FDD3008 Distributed Algorithms Lecture 8 Leader Election Mads Dam Autumn/Winter 2011 Previously... Consensus for message passing concurrency Crash failures,

More information

Review of last lecture. Peer Quiz. DPHPC Overview. Goals of this lecture. Lock-based queue

Review of last lecture. Peer Quiz. DPHPC Overview. Goals of this lecture. Lock-based queue Review of last lecture Design of Parallel and High-Performance Computing Fall 2016 Lecture: Linearizability Motivational video: https://www.youtube.com/watch?v=qx2driqxnbs Instructor: Torsten Hoefler &

More information

A Timing Assumption and a t-resilient Protocol for Implementing an Eventual Leader Service in Asynchronous Shared Memory Systems

A Timing Assumption and a t-resilient Protocol for Implementing an Eventual Leader Service in Asynchronous Shared Memory Systems A Timing Assumption and a t-resilient Protocol for Implementing an Eventual Leader Service in Asynchronous Shared Memory Systems Antonio FERNÁNDEZ y Ernesto JIMÉNEZ z Michel RAYNAL? Gilles TRÉDAN? y LADyR,

More information

Linearizability of Persistent Memory Objects

Linearizability of Persistent Memory Objects Linearizability of Persistent Memory Objects Michael L. Scott Joint work with Joseph Izraelevitz & Hammurabi Mendes www.cs.rochester.edu/research/synchronization/ Workshop on the Theory of Transactional

More information

Asynchronous Models. Chapter Asynchronous Processes States, Inputs, and Outputs

Asynchronous Models. Chapter Asynchronous Processes States, Inputs, and Outputs Chapter 3 Asynchronous Models 3.1 Asynchronous Processes Like a synchronous reactive component, an asynchronous process interacts with other processes via inputs and outputs, and maintains an internal

More information

Concurrent Programming: Algorithms, Principles, and Foundations

Concurrent Programming: Algorithms, Principles, and Foundations Concurrent Programming: Algorithms, Principles, and Foundations Algorithms, Principles, and Foundations Bearbeitet von Michel Raynal 1. Auflage 2012. Buch. xxxii, 516 S. Hardcover ISBN 978 3 642 32026

More information

ACONCURRENT system may be viewed as a collection of

ACONCURRENT system may be viewed as a collection of 252 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 10, NO. 3, MARCH 1999 Constructing a Reliable Test&Set Bit Frank Stomp and Gadi Taubenfeld AbstractÐThe problem of computing with faulty

More information

Two-Phase Atomic Commitment Protocol in Asynchronous Distributed Systems with Crash Failure

Two-Phase Atomic Commitment Protocol in Asynchronous Distributed Systems with Crash Failure Two-Phase Atomic Commitment Protocol in Asynchronous Distributed Systems with Crash Failure Yong-Hwan Cho, Sung-Hoon Park and Seon-Hyong Lee School of Electrical and Computer Engineering, Chungbuk National

More information

Lock-free Serializable Transactions

Lock-free Serializable Transactions Lock-free Serializable Transactions Jeff Napper jmn@cs.utexas.edu Lorenzo Alvisi lorenzo@cs.utexas.edu Laboratory for Advanced Systems Research Department of Computer Science The University of Texas at

More information

Reuse, don t Recycle: Transforming Lock-free Algorithms that Throw Away Descriptors

Reuse, don t Recycle: Transforming Lock-free Algorithms that Throw Away Descriptors Reuse, don t Recycle: Transforming Lock-free Algorithms that Throw Away Descriptors Maya Arbel-Raviv and Trevor Brown Technion, Computer Science Department, Haifa, Israel mayaarl@cs.technion.ac.il, me@tbrown.pro

More information

Important Lessons. A Distributed Algorithm (2) Today's Lecture - Replication

Important Lessons. A Distributed Algorithm (2) Today's Lecture - Replication Important Lessons Lamport & vector clocks both give a logical timestamps Total ordering vs. causal ordering Other issues in coordinating node activities Exclusive access to resources/data Choosing a single

More information

Self Stabilization. CS553 Distributed Algorithms Prof. Ajay Kshemkalyani. by Islam Ismailov & Mohamed M. Ali

Self Stabilization. CS553 Distributed Algorithms Prof. Ajay Kshemkalyani. by Islam Ismailov & Mohamed M. Ali Self Stabilization CS553 Distributed Algorithms Prof. Ajay Kshemkalyani by Islam Ismailov & Mohamed M. Ali Introduction There is a possibility for a distributed system to go into an illegitimate state,

More information

Distributed systems. Lecture 6: distributed transactions, elections, consensus and replication. Malte Schwarzkopf

Distributed systems. Lecture 6: distributed transactions, elections, consensus and replication. Malte Schwarzkopf Distributed systems Lecture 6: distributed transactions, elections, consensus and replication Malte Schwarzkopf Last time Saw how we can build ordered multicast Messages between processes in a group Need

More information

Review. Review. Review. Constructing Reliable Registers From Unreliable Byzantine Components 12/15/08. Space of registers: Transformations:

Review. Review. Review. Constructing Reliable Registers From Unreliable Byzantine Components 12/15/08. Space of registers: Transformations: Review Constructing Reliable Registers From Unreliable Byzantine Components Space of registers: Dimension 1: binary vs. multivalued Dimension 2: safe vs. regular vs. atomic Seth Gilbert Dimension 3: SRSW

More information

Programming Paradigms for Concurrency Lecture 3 Concurrent Objects

Programming Paradigms for Concurrency Lecture 3 Concurrent Objects Programming Paradigms for Concurrency Lecture 3 Concurrent Objects Based on companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Modified by Thomas Wies New York University

More information

Robust Data Sharing with Key-Value Stores

Robust Data Sharing with Key-Value Stores Robust Data Sharing with Key-Value Stores Cristina Bǎsescu Christian Cachin Ittay Eyal Robert Haas Alessandro Sorniotti Marko Vukolić Ido Zachevsky Abstract A key-value store (KVS) offers functions for

More information

On the inherent weakness of conditional primitives

On the inherent weakness of conditional primitives Distrib. Comput. (2006) 18(4): 267 277 DOI 10.1007/s00446-005-0136-5 SPECIAL ISSUE PODC 04 Faith Ellen Fich Danny Hendler Nir Shavit On the inherent weakness of conditional primitives Received: 8 November

More information

Constant RMR Transformation to Augment Reader-Writer Locks with Atomic Upgrade/Downgrade Support

Constant RMR Transformation to Augment Reader-Writer Locks with Atomic Upgrade/Downgrade Support Constant RMR Transformation to Augment Reader-Writer Locks with Atomic Upgrade/Downgrade Support Jake Stern Leichtling Thesis Advisor: Prasad Jayanti With significant contributions from Michael Diamond.

More information

Asynchronous Reconfiguration for Paxos State Machines

Asynchronous Reconfiguration for Paxos State Machines Asynchronous Reconfiguration for Paxos State Machines Leander Jehl and Hein Meling Department of Electrical Engineering and Computer Science University of Stavanger, Norway Abstract. This paper addresses

More information

Verteilte Systeme/Distributed Systems Ch. 5: Various distributed algorithms

Verteilte Systeme/Distributed Systems Ch. 5: Various distributed algorithms Verteilte Systeme/Distributed Systems Ch. 5: Various distributed algorithms Holger Karl Computer Networks Group Universität Paderborn Goal of this chapter Apart from issues in distributed time and resulting

More information

Quasi-Linearizability Relaxed Consistency For Improved Concurrency

Quasi-Linearizability Relaxed Consistency For Improved Concurrency TEL-AVIV UNIVERSITY RAYMOND AND BEVERLY SACKLER FACULTY OF EXACT SCIENCES SCHOOL OF COMPUTER SCIENCE Quasi-Linearizability Relaxed Consistency For Improved Concurrency Dissertation submitted in partial

More information

Anonymous Agreement: The Janus Algorithm

Anonymous Agreement: The Janus Algorithm Anonymous Agreement: The Janus Algorithm Zohir Bouzid 1, Pierre Sutra 1, and Corentin Travers 2 1 University Pierre et Marie Curie - Paris 6, LIP6-CNRS 7606, France. name.surname@lip6.fr 2 LaBRI University

More information

Treewidth and graph minors

Treewidth and graph minors Treewidth and graph minors Lectures 9 and 10, December 29, 2011, January 5, 2012 We shall touch upon the theory of Graph Minors by Robertson and Seymour. This theory gives a very general condition under

More information

How Live Can a Transactional Memory Be?

How Live Can a Transactional Memory Be? How Live Can a Transactional Memory Be? Rachid Guerraoui Michał Kapałka February 18, 2009 Abstract This paper asks how much liveness a transactional memory (TM) implementation can guarantee. We first devise

More information

Shared Memory Synchronization

Shared Memory Synchronization Shared Memory Synchronization Gadi Taubenfeld The Interdisciplinary Center, P.O.Box 167, Herzliya 46150, Israel, tgadi@idc.ac.il, http://www.faculty.idc.ac.il/gadi/ September 1, 2008 Abstract. Synchronization

More information

Coordination and Agreement

Coordination and Agreement Coordination and Agreement Nicola Dragoni Embedded Systems Engineering DTU Informatics 1. Introduction 2. Distributed Mutual Exclusion 3. Elections 4. Multicast Communication 5. Consensus and related problems

More information

Ownership of a queue for practical lock-free scheduling

Ownership of a queue for practical lock-free scheduling Ownership of a queue for practical lock-free scheduling Lincoln Quirk May 4, 2008 Abstract We consider the problem of scheduling tasks in a multiprocessor. Tasks cannot always be scheduled independently

More information

6.852: Distributed Algorithms Fall, Class 12

6.852: Distributed Algorithms Fall, Class 12 6.852: Distributed Algorithms Fall, 2009 Class 12 Today s plan Weak logical time and vector timestamps Consistent global snapshots and stable property detection. Applications: Distributed termination.

More information

Multi-writer Regular Registers in Dynamic Distributed Systems with Byzantine Failures

Multi-writer Regular Registers in Dynamic Distributed Systems with Byzantine Failures Multi-writer Regular Registers in Dynamic Distributed Systems with Byzantine Failures Silvia Bonomi, Amir Soltani Nezhad Università degli Studi di Roma La Sapienza, Via Ariosto 25, 00185 Roma, Italy bonomi@dis.uniroma1.it

More information

Consensus and agreement algorithms

Consensus and agreement algorithms CHAPTER 4 Consensus and agreement algorithms 4. Problem definition Agreement among the processes in a distributed system is a fundamental requirement for a wide range of applications. Many forms of coordination

More information

Thread Synchronization: Foundations. Properties. Safety properties. Edsger s perspective. Nothing bad happens

Thread Synchronization: Foundations. Properties. Safety properties. Edsger s perspective. Nothing bad happens Edsger s perspective Testing can only prove the presence of bugs Thread Synchronization: Foundations Properties Property: a predicate that is evaluated over a run of the program (a trace) every message

More information

CS6450: Distributed Systems Lecture 11. Ryan Stutsman

CS6450: Distributed Systems Lecture 11. Ryan Stutsman Strong Consistency CS6450: Distributed Systems Lecture 11 Ryan Stutsman Material taken/derived from Princeton COS-418 materials created by Michael Freedman and Kyle Jamieson at Princeton University. Licensed

More information

Self-stabilizing Byzantine Digital Clock Synchronization

Self-stabilizing Byzantine Digital Clock Synchronization Self-stabilizing Byzantine Digital Clock Synchronization Ezra N. Hoch, Danny Dolev and Ariel Daliot The Hebrew University of Jerusalem We present a scheme that achieves self-stabilizing Byzantine digital

More information

Shared memory model" Shared memory guarantees" Read-write register" Wait-freedom: unconditional progress " Liveness" Shared memory basics"

Shared memory model Shared memory guarantees Read-write register Wait-freedom: unconditional progress  Liveness Shared memory basics Shared memory basics INF346, 2014 Shared memory model Processes communicate by applying operations on and receiving responses from shared objects! A shared object is a state machine ü States ü Operations/Responses

More information

CSE 486/586 Distributed Systems

CSE 486/586 Distributed Systems CSE 486/586 Distributed Systems Mutual Exclusion Steve Ko Computer Sciences and Engineering University at Buffalo CSE 486/586 Recap: Consensus On a synchronous system There s an algorithm that works. On

More information

The Complexity of Renaming

The Complexity of Renaming The Complexity of Renaming Dan Alistarh EPFL James Aspnes Yale Seth Gilbert NUS Rachid Guerraoui EPFL Abstract We study the complexity of renaming, a fundamental problem in distributed computing in which

More information

What Can be Computed in a Distributed System?

What Can be Computed in a Distributed System? What Can be Computed in a Distributed System? Michel Raynal Institut Universitaire de France &IRISA,Université de Rennes, France & Department of Computing, Polytechnic University, Hong Kong raynal@irisa.fr

More information

CS 241 Honors Concurrent Data Structures

CS 241 Honors Concurrent Data Structures CS 241 Honors Concurrent Data Structures Bhuvan Venkatesh University of Illinois Urbana Champaign March 27, 2018 CS 241 Course Staff (UIUC) Lock Free Data Structures March 27, 2018 1 / 43 What to go over

More information

Algorithm 23 works. Instead of a spanning tree, one can use routing.

Algorithm 23 works. Instead of a spanning tree, one can use routing. Chapter 5 Shared Objects 5.1 Introduction Assume that there is a common resource (e.g. a common variable or data structure), which different nodes in a network need to access from time to time. If the

More information

6.852: Distributed Algorithms Fall, Instructor: Nancy Lynch TAs: Cameron Musco, Katerina Sotiraki Course Secretary: Joanne Hanley

6.852: Distributed Algorithms Fall, Instructor: Nancy Lynch TAs: Cameron Musco, Katerina Sotiraki Course Secretary: Joanne Hanley 6.852: Distributed Algorithms Fall, 2015 Instructor: Nancy Lynch TAs: Cameron Musco, Katerina Sotiraki Course Secretary: Joanne Hanley What are Distributed Algorithms? Algorithms that run on networked

More information

Brewer's Conjecture and the Feasibility of Consistent, Available, Partition-Tolerant Web Services

Brewer's Conjecture and the Feasibility of Consistent, Available, Partition-Tolerant Web Services PODC 2004 The PODC Steering Committee is pleased to announce that PODC 2004 will be held in St. John's, Newfoundland. This will be the thirteenth PODC to be held in Canada but the first to be held there

More information

Wait-Free Regular Storage from Byzantine Components

Wait-Free Regular Storage from Byzantine Components Wait-Free Regular Storage from Byzantine Components Ittai Abraham Gregory Chockler Idit Keidar Dahlia Malkhi July 26, 2006 Abstract We consider the problem of implementing a wait-free regular register

More information

Proving linearizability using forward simulations

Proving linearizability using forward simulations Proving linearizability using forward simulations Ahmed Bouajjani 1, Michael Emmi 2, Constantin Enea 1, and Suha Orhun Mutluergil 3 1 IRIF, Univ. Paris Diderot, {abou,cenea}@irif.fr 2 Nokia Bell Labs,

More information

Last time. Distributed systems Lecture 6: Elections, distributed transactions, and replication. DrRobert N. M. Watson

Last time. Distributed systems Lecture 6: Elections, distributed transactions, and replication. DrRobert N. M. Watson Distributed systems Lecture 6: Elections, distributed transactions, and replication DrRobert N. M. Watson 1 Last time Saw how we can build ordered multicast Messages between processes in a group Need to

More information

Distributed Systems. Lec 11: Consistency Models. Slide acks: Jinyang Li, Robert Morris

Distributed Systems. Lec 11: Consistency Models. Slide acks: Jinyang Li, Robert Morris Distributed Systems Lec 11: Consistency Models Slide acks: Jinyang Li, Robert Morris (http://pdos.csail.mit.edu/6.824/notes/l06.txt, http://www.news.cs.nyu.edu/~jinyang/fa09/notes/ds-consistency.pdf) 1

More information

Mutual Exclusion Algorithms with Constant RMR Complexity and Wait-Free Exit Code

Mutual Exclusion Algorithms with Constant RMR Complexity and Wait-Free Exit Code Mutual Exclusion Algorithms with Constant RMR Complexity and Wait-Free Exit Code Rotem Dvir 1 and Gadi Taubenfeld 2 1 The Interdisciplinary Center, P.O.Box 167, Herzliya 46150, Israel rotem.dvir@gmail.com

More information