Consistent Global States of Distributed Systems: Fundamental Concepts and Mechanisms. CS 249 Project Fall 2005 Wing Wong

Size: px
Start display at page:

Download "Consistent Global States of Distributed Systems: Fundamental Concepts and Mechanisms. CS 249 Project Fall 2005 Wing Wong"

Transcription

1 Consistent Global States of Distributed Systems: Fundamental Concepts and Mechanisms CS 249 Project Fall 2005 Wing Wong

2 Outline Introduction Asynchronous distributed systems, distributed computations, consistency Two different strategies to construct global states Monitor passively observes the system (reactivearchitecture) Monitor actively interrogates the system (snapshot protocol) Properties of global predicates Sample applications: deadlock detection and debugging

3 Introduction global state = union of local states of individual processes many problems in distributed computing require: construction of a global state and evaluation of whether the state satisfies some predicate difficulties: uncertainties in message delays relative speeds of computations global state obtained can be obsolete, incomplete, or inconsistent

4 Distributed Systems collection of sequential processes p 1, p 2,, p n unidirectional communication channels between pairs of processes reliable channels messages may be delivered out of order network strongly connected (not necessarily completely)

5 Asynchronous Distributed Systems no bounds on relative process speeds no bounds on message delays no synchronized local clocks communication is the only possible mechanism for synchronization

6 Distributed Computations distributed program executed by a collection of processes each process executes a sequence of events communication through events send(m) and receive(m), m as message identifier

7 Distributed Computations h i = e i1 e i2 local history of process p i canonical enumeration total order imposed by sequential h execution h ik = e i1 e i2 e i k initial prefix of h i containing first k events H = h 1 U U h n global history containing all events does not specify relative timing between events

8 Distributed Computations to order events, define binary relation to capture cause-and-effect : ee if and only if e causally precedes e concurrent events: neither ee nor e e, write e e distributed computation = partially ordered set defined by (H, )

9 Distributed Computations e 21 e 36 ; e 22 e 3 6

10 Global States, Cuts and Runs i k local state of process p i after event e i k = ( 1,, n ) global state of distributed computation n-tuple of local states cut C = h 1 c 1 U U hn c n or (c1,, c n ) subset of global history H

11 Global States, Cuts and Runs ( 1 c 1,,n c n) global state correspond to cut C (e 1 c 1,,en c n) frontier of cut C set of last events run a total ordering R including all events in global history consistent with each local history

12 Global States, Cuts and Runs cut C = (5,2,4); cut C = (3,2,6) a consistent run R = e 31 e 11 e 32 e 21 e 33 e 34 e 22 e 12 e 35 e 13 e 14 e 15 e 36 e 23 e 1 6

13 Consistency cut C is consistent if for all events e and e closed under the causal precedence relation consistent global state corresponds to a consistent cut run R is consistent if for all events, ee implies e appears before e in R

14 Consistency run R = e 1 e 2 results in a sequence of global states i is obtained from i-1 by some process executing event e i, or i-1 leads to i denote the transitive closure of the leadsto relation by ~> R is reachable from in run R iff~> R

15 Lattice of Global States lattice = set of all consistent global states, along with leads-to relation k 1 k n = shorthand for global state ( 1 k 1,,n k n) k k n = level of lattice

16 Lattice of Global States path = sequence of global states of increasing level (downwards) each path corresponds to a consistent run a possible path:

17 Observing Distributed Computations (reactive-architecture) processes notify monitor process p 0 whenever they execute an event monitor constructs observation as the sequence of events corresponding to the notification messages problem: observation may be inconsistent due to variability in notification message delays

18 Observing Distributed Computations

19 Observing Distributed Computations any permutation of run R is a possible observation we need: delivery rule at monitor process to restore message order we have First-In-First-Out (FIFO) delivery using sequence number for all source-destination pair p i, p j : send i (m) send i (m ) => deliver j (m) deliver j (m )

20 Delivery Rule 1 assume: global real-time clock message delays bound by process includes timestamp (real-time clock value) when notifying p 0 of local event e DR1: At time t, deliver all received messages with timestamps up to t in increasing timestamp order

21 Delivery Rule 1 let RC(e) denotes value of global clock when e is executed real-time clock satisfies Clock Condition: ee => RC(e) < RC(e ) but logical clocks also satisfies clock condition

22 Logical Clocks event orderings based on increasing clock values LC(e i ) denotes value of logical clock when e i is executed by p i each sent message m contains timestamp TS(m) update rules by p i at occurrence of e i :

23 Logical Clocks

24 Delivery Rule 2 replace real-time clock by logical clock need gap-detection property: given events e, e where LC(e) < LC(e ), determine if some event e exists such that LC(e) < LC(e ) < LC(e ) message is stable at p if no future messages with timestamps smaller than TS(m) can be received by p

25 Delivery Rule 2 with FIFO, when p 0 receives m from p i with timestamp TS(m), can be certain no other message m from p i with TS(m ) TS(m) message m at p 0 guaranteed stable when p 0 has received at least one message from all other processes with timestamps > TS(m) DR2: Deliver all received messages that are stable at p 0 in increasing timestamp order

26 Strong Clock Condition DR1, DR2 assume RC(e) < RC(e ) (or LC(e) < LC(e )) => e e recall RC and LC guarantee clock condition: e e => RC(e) < RC(e ) DR1, DR2 can unnecessarily delay delivery want timing mechanism TC that gives Strong Clock Condition: ee TC(e) < TC(e )

27 Timing Mechanism 1 - Causal Histories causal history as clock value set of all events that causally precede event e: smallest consistent cut that includes e projection of (e) on process p i : i (e) =(e)h i

28 Timing Mechanism 1 - Causal Histories

29 Timing Mechanism 1 - Causal Histories To maintain causal histories: initially empty if e i is an internal or send event (e i ) = {e i } U (previous local event of p i ) if e i = receive of message m by p i from p j (e i ) = {e i } U (previous local event of p i ) U (corresponding send event at p j )

30 Timing Mechanism 1 - Causal Histories new send event: new event e 1 5 new receive event: new event e 2 3

31 Timing Mechanism 1 - Causal Histories can interpret clock comparison as set inclusion: ee (e) (e ) (why not set membership, [ee e (e )]?) unfortunately, causal histories grow too rapidly

32 Timing Mechanism 2 - Vector Clocks note: projection i (e) = h ik for some unique k e ir i (e) for all r < k can use single number k to represent i (e) (e) = 1 (e) U U n (e) represent entire causal history by n-dimensional vector clock VC(e), where for all 1 in VC(e)[i] = k, if and only if i (e) = h i k

33 Timing Mechanism 2 - Vector Clocks

34 Timing Mechanism 2 - Vector Clocks To maintain vector clock: each process p i initializes VC to contain all zeros update rules by p i at occurrence of e i : VC(e i )[i] number of events p i has executed up to and including e i VC(e i )[j] number of events of p j that causally precede event e i of p i

35 Timing Mechanism 2 - Vector Clocks causal histories vector clocks new send event: new receive event:

36 Vector Clock Comparison Define less than relation: V < V (V V ) ( 1 kn: V[k] V [k])

37 Properties of Vector Clocks 1. Strong Clock Condition: ee VC(e) < VC(e ) 2. Simple Strong Clock Condition: given event e i of p i and event e j of p j, ij e i e j VC(e i )[i] VC(e j )[i]

38 Properties of Vector Clocks 3. Test for Concurrency: given event e i of p i and event e j of p j e i e j (VC(e i )[i] > VC(e j )[i]) (VC(e j )[j] > VC(e i )[j]) 4. Pairwise Inconsistent: given event e i of p i and e j of p j, ij if e i, e j cannot belong to the frontier of the same consistent cut (VC(e i )[i] < VC(e j )[i]) (VC(e j )[j] < VC(e i )[j]) (concurrent)

39 Properties of Vector Clocks 5. Consistent Cut: frontier contains no pairwise inconsistent events VC(e i c i)[i] VC(ej c j)[i], 1 i, jn 6. Counting # of events causally precede e i : #(e i ) = ( j=1.. n VC(e i )[j]) 1 # events = = 7

40 Properties of Vector Clocks 7. Weak Gap-Detection: given event e i of p i and e j of p j, if VC(e i )[k] < VC(e j )[k] for some kj, there exists event e k such that (e k e i ) (e k e j )

41 Causal Delivery and Vector Clocks assume processes increment local component of VC only for events notified to monitor p 0 p 0 maintains set M for messages received but not yet delivered suppose we have: message m from p j m = last message delivered from process p k, kj

42 Causal Delivery and Vector Clocks To deliver m, p 0 must verify: 1. no earlier message from p j is undelivered (i.e. TS(m)[j] 1 messages have been delivered from p j ) 2. no undelivered message m from p k s.t. send k (m )send k (m )send j (m), kj (i.e. whether TS(m )[k] TS(m)[k] for all k)

43 Causal Delivery and Vector Clocks p 0 maintains array D[1 n] where D[i] = TS(m i )[i], m i being last message delivered from p i e.g. on right, delivery of m is delayed until m is received and delivered P 0 P k P j m' m ' (0, 0) (1, 0) (2, 0) m (2, 1) (0, 0) (1, 0) (2, 0) (2, 1)

44 Delivery Rule 3 Causal Delivery: for all messages m, m, sending processes p i, p j and destination process p k send i (m) send j (m ) => deliver k (m) deliver k (m ) DR3 (Causal Delivery): Deliver message m from process p j as soon as D[j] = TS(m)[j] 1, and D[k] TS(m)[k], kj p 0 set D[j] to TS(m)[j] after delivery of m

45 Causal Delivery and Hidden Channels should apply to closed systems incorrect conclusion with hidden channels (communication channel external to the system)

46 Active Monitoring - Distributed Snapshots monitor p 0 requests states of other processes and combine into global state assume channels implement FIFO delivery channel state i,j for channel p i to p j : messages sent by p i not yet received by p j

47 Distributed Snapshots notations: IN i = set of processes having direct channels to p i OUT i = set of processes to which p i has a channel for each execution of the snapshot protocol, process p i record its local state i and the states of its incoming channels ( j,i for all p j IN i )

48 Distributed Snapshots Snapshot Protocol (Chandy-Lamport) 1. p 0 starts the protocol by sending itself a take snapshot message 2. when receiving the take snapshot message for the first time from process p f p i records local state i and relays the take snapshot message along all outgoing channels channel state f,i is set to empty p i starts recording messages on other incoming channels

49 Distributed Snapshots Snapshot Protocol (Chandy-Lamport) 3. when receiving the take snapshot message beyond the first time from process p s : p i stops recording messages along channel from p s channel state s,i are messages that have been recorded

50 Distributed Snapshots p 1 done p 2 done dash arrows indicate take snapshot messages constructed global state: 23 ; 1,2 empty; 2,1 = {m}

51 Properties of Snapshots Let s = global state constructed a = global state when protocol initiated f = global state when protocol terminated s is guaranteed to be consistent actual run that the system followed may not pass through s but a run R such that a ~> R s ~> R f

52 Properties of Snapshots a = 21 f = 55 r does not pass through s ( = 23 )

53 Properties of Snapshots but 21 ~> 23 ~> 55

54 Properties of Global Predicates Now we have two methods for global predicate evaluation: monitor passively observing runs monitor actively constructing snapshots utility of either approach depends (in part) on properties of the predicate

55 Stable Predicates communication delays => s can only reflect some past state of the system stable predicate: once become true, remain true e.g. deadlock, termination, loss of all tokens, unreachable storage if is stable, then ( is true in s ) => ( is true in f ) and ( is false in s ) => ( is false in a )

56 Stable Predicates deadlock detection through snapshots (p.29, 30)

57 Stable Predicates deadlock detection using reactive protocol (p.31, 32)

58 Nonstable Predicates e.g. debugging, checking if queue lengths exceed some thresholds Two problems: 1. condition may not persist long enough for it to be true when the predicate is evaluated 2. if a predicate is found true, do not know whether ever held during the actual run

59 Nonstable Predicates e.g. monitoring condition (x = y) 7 states where (x = y) holds but no longer hold after state 54 e.g. (y x) = 2 condition hold only in 31 and 41 monitor might detect (y - x) = 2 even if actual run never goes through 31 or 41

60 Nonstable Predicates very little value to detect nonstable predicate

61 Nonstable Predicates With observations, can extend predicates: Possibly(): There exist a consistent observation O of the computation such that holds in a global state of O Definitely(): For every consistent observation O of the computation, there exists a global state of O in which holds e.g. Possibly((y x) = 2), Definitely(x = y)

62 Nonstable Predicates use of extended predicate in debugging: if = some erroneous state, then Possibly() indicates a bug, even if it is not observed during an actual run if predicate is stable, then Possibly() Definitely()

63 Detecting Possibly and Definitely detection based on the lattice of consistent global states If any global state in the lattice satisfies, then Possibly() holds Definitely() requires all possible runs to pass through a global state that satisfies

64 Detecting Possibly and Definitely Possibly((y x) = 2) Definitely(y = x) (why?)

65 Detecting Possibly and Definitely set of global state current with progressively increasing levels any member of current satisfies => Possibly() true

66 Detecting Possibly and Definitely iteratively construct set of global states of level l without passing through a state that satisfies set empty => Definitely() true set contains the final state => Definitely() true

67 Conclusions many distributed system problems require recognizing certain global conditions two approaches to constructing global states: reactive-architecture based snapshot based timing mechanism that captures causal precedence relation applying to distributed deadlock detection and debugging solutions can be adapted to deal with nonstable predicates, multiple observations and failures

Cuts. Cuts. Consistent cuts and consistent global states. Global states and cuts. A cut C is a subset of the global history of H

Cuts. Cuts. Consistent cuts and consistent global states. Global states and cuts. A cut C is a subset of the global history of H Cuts Cuts A cut C is a subset of the global history of H C = h c 1 1 hc 2 2...hc n n A cut C is a subset of the global history of H The frontier of C is the set of events e c 1 1,ec 2 2,...ec n n C = h

More information

Distributed Algorithms Time, clocks and the ordering of events

Distributed Algorithms Time, clocks and the ordering of events Distributed Algorithms Time, clocks and the ordering of events Alberto Montresor University of Trento, Italy 2016/04/26 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International

More information

A subtle problem. An obvious problem. An obvious problem. An obvious problem. No!

A subtle problem. An obvious problem. An obvious problem. An obvious problem. No! A subtle problem An obvious problem when LC = t do S doesn t make sense for Lamport clocks! there is no guarantee that LC will ever be S is anyway executed after LC = t Fixes: if e is internal/send and

More information

Time is an important issue in DS

Time is an important issue in DS Chapter 0: Time and Global States Introduction Clocks,events and process states Synchronizing physical clocks Logical time and logical clocks Global states Distributed debugging Summary Time is an important

More information

Our Problem. Model. Clock Synchronization. Global Predicate Detection and Event Ordering

Our Problem. Model. Clock Synchronization. Global Predicate Detection and Event Ordering Our Problem Global Predicate Detection and Event Ordering To compute predicates over the state of a distributed application Model Clock Synchronization Message passing No failures Two possible timing assumptions:

More information

Agreement. Today. l Coordination and agreement in group communication. l Consensus

Agreement. Today. l Coordination and agreement in group communication. l Consensus Agreement Today l Coordination and agreement in group communication l Consensus Events and process states " A distributed system a collection P of N singlethreaded processes w/o shared memory Each process

More information

Clocks in Asynchronous Systems

Clocks in Asynchronous Systems Clocks in Asynchronous Systems The Internet Network Time Protocol (NTP) 8 Goals provide the ability to externally synchronize clients across internet to UTC provide reliable service tolerating lengthy

More information

Snapshots. Chandy-Lamport Algorithm for the determination of consistent global states <$1000, 0> <$50, 2000> mark. (order 10, $100) mark

Snapshots. Chandy-Lamport Algorithm for the determination of consistent global states <$1000, 0> <$50, 2000> mark. (order 10, $100) mark 8 example: P i P j (5 widgets) (order 10, $100) cji 8 ed state P i : , P j : , c ij : , c ji : Distributed Systems

More information

Chapter 11 Time and Global States

Chapter 11 Time and Global States CSD511 Distributed Systems 分散式系統 Chapter 11 Time and Global States 吳俊興 國立高雄大學資訊工程學系 Chapter 11 Time and Global States 11.1 Introduction 11.2 Clocks, events and process states 11.3 Synchronizing physical

More information

Distributed Algorithms (CAS 769) Dr. Borzoo Bonakdarpour

Distributed Algorithms (CAS 769) Dr. Borzoo Bonakdarpour Distributed Algorithms (CAS 769) Week 1: Introduction, Logical clocks, Snapshots Dr. Borzoo Bonakdarpour Department of Computing and Software McMaster University Dr. Borzoo Bonakdarpour Distributed Algorithms

More information

Slides for Chapter 14: Time and Global States

Slides for Chapter 14: Time and Global States Slides for Chapter 14: Time and Global States From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, Addison-Wesley 2012 Overview of Chapter Introduction Clocks,

More information

Logical Time. 1. Introduction 2. Clock and Events 3. Logical (Lamport) Clocks 4. Vector Clocks 5. Efficient Implementation

Logical Time. 1. Introduction 2. Clock and Events 3. Logical (Lamport) Clocks 4. Vector Clocks 5. Efficient Implementation Logical Time Nicola Dragoni Embedded Systems Engineering DTU Compute 1. Introduction 2. Clock and Events 3. Logical (Lamport) Clocks 4. Vector Clocks 5. Efficient Implementation 2013 ACM Turing Award:

More information

Distributed Systems Fundamentals

Distributed Systems Fundamentals February 17, 2000 ECS 251 Winter 2000 Page 1 Distributed Systems Fundamentals 1. Distributed system? a. What is it? b. Why use it? 2. System Architectures a. minicomputer mode b. workstation model c. processor

More information

Figure 10.1 Skew between computer clocks in a distributed system

Figure 10.1 Skew between computer clocks in a distributed system Figure 10.1 Skew between computer clocks in a distributed system Network Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001

More information

Today. Vector Clocks and Distributed Snapshots. Motivation: Distributed discussion board. Distributed discussion board. 1. Logical Time: Vector clocks

Today. Vector Clocks and Distributed Snapshots. Motivation: Distributed discussion board. Distributed discussion board. 1. Logical Time: Vector clocks Vector Clocks and Distributed Snapshots Today. Logical Time: Vector clocks 2. Distributed lobal Snapshots CS 48: Distributed Systems Lecture 5 Kyle Jamieson 2 Motivation: Distributed discussion board Distributed

More information

Ordering and Consistent Cuts Nicole Caruso

Ordering and Consistent Cuts Nicole Caruso Ordering and Consistent Cuts Nicole Caruso Cornell University Dept. of Computer Science Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport Stanford Research Institute About

More information

Chandy-Lamport Snapshotting

Chandy-Lamport Snapshotting Chandy-Lamport Snapshotting COS 418: Distributed Systems Precept 8 Themis Melissaris and Daniel Suo [Content adapted from I. Gupta] Agenda What are global snapshots? The Chandy-Lamport algorithm Why does

More information

Time. Today. l Physical clocks l Logical clocks

Time. Today. l Physical clocks l Logical clocks Time Today l Physical clocks l Logical clocks Events, process states and clocks " A distributed system a collection P of N singlethreaded processes without shared memory Each process p i has a state s

More information

Causality and Time. The Happens-Before Relation

Causality and Time. The Happens-Before Relation Causality and Time The Happens-Before Relation Because executions are sequences of events, they induce a total order on all the events It is possible that two events by different processors do not influence

More information

CS505: Distributed Systems

CS505: Distributed Systems Cristina Nita-Rotaru CS505: Distributed Systems Ordering events. Lamport and vector clocks. Global states. Detecting failures. Required reading for this topic } Leslie Lamport,"Time, Clocks, and the Ordering

More information

CptS 464/564 Fall Prof. Dave Bakken. Cpt. S 464/564 Lecture January 26, 2014

CptS 464/564 Fall Prof. Dave Bakken. Cpt. S 464/564 Lecture January 26, 2014 Overview of Ordering and Logical Time Prof. Dave Bakken Cpt. S 464/564 Lecture January 26, 2014 Context This material is NOT in CDKB5 textbook Rather, from second text by Verissimo and Rodrigues, chapters

More information

Distributed Systems Principles and Paradigms. Chapter 06: Synchronization

Distributed Systems Principles and Paradigms. Chapter 06: Synchronization Distributed Systems Principles and Paradigms Maarten van Steen VU Amsterdam, Dept. Computer Science Room R4.20, steen@cs.vu.nl Chapter 06: Synchronization Version: November 16, 2009 2 / 39 Contents Chapter

More information

Distributed Systems Principles and Paradigms

Distributed Systems Principles and Paradigms Distributed Systems Principles and Paradigms Chapter 6 (version April 7, 28) Maarten van Steen Vrije Universiteit Amsterdam, Faculty of Science Dept. Mathematics and Computer Science Room R4.2. Tel: (2)

More information

Time. To do. q Physical clocks q Logical clocks

Time. To do. q Physical clocks q Logical clocks Time To do q Physical clocks q Logical clocks Events, process states and clocks A distributed system A collection P of N single-threaded processes (p i, i = 1,, N) without shared memory The processes in

More information

416 Distributed Systems. Time Synchronization (Part 2: Lamport and vector clocks) Jan 27, 2017

416 Distributed Systems. Time Synchronization (Part 2: Lamport and vector clocks) Jan 27, 2017 416 Distributed Systems Time Synchronization (Part 2: Lamport and vector clocks) Jan 27, 2017 1 Important Lessons (last lecture) Clocks on different systems will always behave differently Skew and drift

More information

DISTRIBUTED COMPUTER SYSTEMS

DISTRIBUTED COMPUTER SYSTEMS DISTRIBUTED COMPUTER SYSTEMS SYNCHRONIZATION Dr. Jack Lange Computer Science Department University of Pittsburgh Fall 2015 Topics Clock Synchronization Physical Clocks Clock Synchronization Algorithms

More information

Efficient Notification Ordering for Geo-Distributed Pub/Sub Systems

Efficient Notification Ordering for Geo-Distributed Pub/Sub Systems R. BALDONI ET AL. 1 Efficient Notification Ordering for Geo-Distributed Pub/Sub Systems Supplemental material Roberto Baldoni, Silvia Bonomi, Marco Platania, and Leonardo Querzoni 1 ALGORITHM PSEUDO-CODE

More information

CS505: Distributed Systems

CS505: Distributed Systems Department of Computer Science CS505: Distributed Systems Lecture 5: Time in Distributed Systems Overview Time and Synchronization Logical Clocks Vector Clocks Distributed Systems Asynchronous systems:

More information

7680: Distributed Systems

7680: Distributed Systems Cristina Nita-Rotaru 7680: Distributed Systems Physical and logical clocks. Global states. Failure detection. Ordering events in distributed systems } Time is essential for ordering events in a distributed

More information

Distributed Systems. 06. Logical clocks. Paul Krzyzanowski. Rutgers University. Fall 2017

Distributed Systems. 06. Logical clocks. Paul Krzyzanowski. Rutgers University. Fall 2017 Distributed Systems 06. Logical clocks Paul Krzyzanowski Rutgers University Fall 2017 2014-2017 Paul Krzyzanowski 1 Logical clocks Assign sequence numbers to messages All cooperating processes can agree

More information

MAD. Models & Algorithms for Distributed systems -- 2/5 -- download slides at

MAD. Models & Algorithms for Distributed systems -- 2/5 -- download slides at MAD Models & Algorithms for Distributed systems -- /5 -- download slides at http://people.rennes.inria.fr/eric.fabre/ 1 Today Runs/executions of a distributed system are partial orders of events We introduce

More information

Causality and physical time

Causality and physical time Logical Time Causality and physical time Causality is fundamental to the design and analysis of parallel and distributed computing and OS. Distributed algorithms design Knowledge about the progress Concurrency

More information

Distributed Systems Time and Global State

Distributed Systems Time and Global State Distributed Systems Time and Global State Allan Clark School of Informatics University of Edinburgh http://www.inf.ed.ac.uk/teaching/courses/ds Autumn Term 2012 Distributed Systems Time and Global State

More information

Causality & Concurrency. Time-Stamping Systems. Plausibility. Example TSS: Lamport Clocks. Example TSS: Vector Clocks

Causality & Concurrency. Time-Stamping Systems. Plausibility. Example TSS: Lamport Clocks. Example TSS: Vector Clocks Plausible Clocks with Bounded Inaccuracy Causality & Concurrency a b exists a path from a to b Brad Moore, Paul Sivilotti Computer Science & Engineering The Ohio State University paolo@cse.ohio-state.edu

More information

1 Introduction During the execution of a distributed computation, processes exchange information via messages. The message exchange establishes causal

1 Introduction During the execution of a distributed computation, processes exchange information via messages. The message exchange establishes causal Quasi-Synchronous heckpointing: Models, haracterization, and lassication D. Manivannan Mukesh Singhal Department of omputer and Information Science The Ohio State University olumbus, OH 43210 (email: fmanivann,singhalg@cis.ohio-state.edu)

More information

On Equilibria of Distributed Message-Passing Games

On Equilibria of Distributed Message-Passing Games On Equilibria of Distributed Message-Passing Games Concetta Pilotto and K. Mani Chandy California Institute of Technology, Computer Science Department 1200 E. California Blvd. MC 256-80 Pasadena, US {pilotto,mani}@cs.caltech.edu

More information

Section 6 Fault-Tolerant Consensus

Section 6 Fault-Tolerant Consensus Section 6 Fault-Tolerant Consensus CS586 - Panagiota Fatourou 1 Description of the Problem Consensus Each process starts with an individual input from a particular value set V. Processes may fail by crashing.

More information

Absence of Global Clock

Absence of Global Clock Absence of Global Clock Problem: synchronizing the activities of different part of the system (e.g. process scheduling) What about using a single shared clock? two different processes can see the clock

More information

1 Introduction During the execution of a distributed computation, processes exchange information via messages. The message exchange establishes causal

1 Introduction During the execution of a distributed computation, processes exchange information via messages. The message exchange establishes causal TR No. OSU-ISR-5/96-TR33, Dept. of omputer and Information Science, The Ohio State University. Quasi-Synchronous heckpointing: Models, haracterization, and lassication D. Manivannan Mukesh Singhal Department

More information

Distributed Mutual Exclusion Based on Causal Ordering

Distributed Mutual Exclusion Based on Causal Ordering Journal of Computer Science 5 (5): 398-404, 2009 ISSN 1549-3636 2009 Science Publications Distributed Mutual Exclusion Based on Causal Ordering Mohamed Naimi and Ousmane Thiare Department of Computer Science,

More information

Time, Clocks, and the Ordering of Events in a Distributed System

Time, Clocks, and the Ordering of Events in a Distributed System Time, Clocks, and the Ordering of Events in a Distributed System Motivating example: a distributed compilation service FTP server storing source files, object files, executable file stored files have timestamps,

More information

Distributed Computing. Synchronization. Dr. Yingwu Zhu

Distributed Computing. Synchronization. Dr. Yingwu Zhu Distributed Computing Synchronization Dr. Yingwu Zhu Topics to Discuss Physical Clocks Logical Clocks: Lamport Clocks Classic paper: Time, Clocks, and the Ordering of Events in a Distributed System Lamport

More information

Automatic Synthesis of Distributed Protocols

Automatic Synthesis of Distributed Protocols Automatic Synthesis of Distributed Protocols Rajeev Alur Stavros Tripakis 1 Introduction Protocols for coordination among concurrent processes are an essential component of modern multiprocessor and distributed

More information

Time in Distributed Systems: Clocks and Ordering of Events

Time in Distributed Systems: Clocks and Ordering of Events Time in Distributed Systems: Clocks and Ordering of Events Clocks in Distributed Systems Needed to Order two or more events happening at same or different nodes (Ex: Consistent ordering of updates at different

More information

Asynchronous Models For Consensus

Asynchronous Models For Consensus Distributed Systems 600.437 Asynchronous Models for Consensus Department of Computer Science The Johns Hopkins University 1 Asynchronous Models For Consensus Lecture 5 Further reading: Distributed Algorithms

More information

Seeking Fastness in Multi-Writer Multiple- Reader Atomic Register Implementations

Seeking Fastness in Multi-Writer Multiple- Reader Atomic Register Implementations ΚΥΠΡΙΑΚΗ ΔΗΜΟΚΡΑΤΙΑ ΕΥΡΩΠΑΪΚΗ ΕΝΩΣΗ Η ΔΕΣΜΗ 29- ΣΥΓΧΡΗΜΑΤΟΔΟΤΕΙΤΑΙ ΑΠΟ ΤΗΝ ΚΥΠΡΙΑΚΗ ΔΗΜΟΚΡΑΤΙΑ ΚΑΙ ΤΟ ΕΥΡΩΠΑΪΚΟ ΤΑΜΕΙΟ ΠΕΡΙΦΕΡΕΙΑΚΗΣ ΑΝΑΠΤΥΞΗΣ ΤΗΣ ΕΕ Seeking Fastness in Multi-Writer Multiple- Reader Atomic

More information

Distributed Systems 8L for Part IB

Distributed Systems 8L for Part IB Distributed Systems 8L for Part IB Handout 2 Dr. Steven Hand 1 Clocks Distributed systems need to be able to: order events produced by concurrent processes; synchronize senders and receivers of messages;

More information

Distributed Algorithms

Distributed Algorithms Distributed Algorithms December 17, 2008 Gerard Tel Introduction to Distributed Algorithms (2 nd edition) Cambridge University Press, 2000 Set-Up of the Course 13 lectures: Wan Fokkink room U342 email:

More information

The Weakest Failure Detector to Solve Mutual Exclusion

The Weakest Failure Detector to Solve Mutual Exclusion The Weakest Failure Detector to Solve Mutual Exclusion Vibhor Bhatt Nicholas Christman Prasad Jayanti Dartmouth College, Hanover, NH Dartmouth Computer Science Technical Report TR2008-618 April 17, 2008

More information

Formal Methods for Monitoring Distributed Computations

Formal Methods for Monitoring Distributed Computations Formal Methods for Monitoring Distributed Computations Vijay K. Garg Parallel and Distributed Systems Lab, Department of Electrical and Computer Engineering, The University of Texas at Austin, FRIDA 15

More information

Efficient Dependency Tracking for Relevant Events in Concurrent Systems

Efficient Dependency Tracking for Relevant Events in Concurrent Systems Distributed Computing manuscript No. (will be inserted by the editor) Anurag Agarwal Vijay K. Garg Efficient Dependency Tracking for Relevant Events in Concurrent Systems Received: date / Accepted: date

More information

Fault-Tolerant Consensus

Fault-Tolerant Consensus Fault-Tolerant Consensus CS556 - Panagiota Fatourou 1 Assumptions Consensus Denote by f the maximum number of processes that may fail. We call the system f-resilient Description of the Problem Each process

More information

CS 425 / ECE 428 Distributed Systems Fall Indranil Gupta (Indy) Oct. 5, 2017 Lecture 12: Time and Ordering All slides IG

CS 425 / ECE 428 Distributed Systems Fall Indranil Gupta (Indy) Oct. 5, 2017 Lecture 12: Time and Ordering All slides IG CS 425 / ECE 428 Distributed Systems Fall 2017 Indranil Gupta (Indy) Oct. 5, 2017 Lecture 12: Time and Ordering All slides IG Why Synchronization? You want to catch a bus at 6.05 pm, but your watch is

More information

CS 347 Parallel and Distributed Data Processing

CS 347 Parallel and Distributed Data Processing CS 347 Parallel and Distributed Data Processing Spring 2016 & Clocks, Clocks, and the Ordering of Events in a Distributed System. L. Lamport, Communications of the ACM, 1978 Notes 15: & Clocks CS 347 Notes

More information

Clock Synchronization

Clock Synchronization Today: Canonical Problems in Distributed Systems Time ordering and clock synchronization Leader election Mutual exclusion Distributed transactions Deadlock detection Lecture 11, page 7 Clock Synchronization

More information

Verifying Programs that use Causally-ordered Message-passing

Verifying Programs that use Causally-ordered Message-passing Verifying Programs that use Causally-ordered Message-passing Scott D. Stoller Fred B. Schneider Department of Computer Science Cornell University Ithaca, New York 14853 December 29, 1995 Abstract We give

More information

A Communication-Induced Checkpointing Protocol that Ensures Rollback-Dependency Trackability

A Communication-Induced Checkpointing Protocol that Ensures Rollback-Dependency Trackability A Communication-Induced Checkpointing Protocol that Ensures Rollback-Dependency Trackability Roberto BALDONI Jean-Michel HELARY y Achour MOSTEFAOUI y Michel RAYNAL y Abstract Considering an application

More information

The Underlying Semantics of Transition Systems

The Underlying Semantics of Transition Systems The Underlying Semantics of Transition Systems J. M. Crawford D. M. Goldschlag Technical Report 17 December 1987 Computational Logic Inc. 1717 W. 6th St. Suite 290 Austin, Texas 78703 (512) 322-9951 1

More information

Genuine atomic multicast in asynchronous distributed systems

Genuine atomic multicast in asynchronous distributed systems Theoretical Computer Science 254 (2001) 297 316 www.elsevier.com/locate/tcs Genuine atomic multicast in asynchronous distributed systems Rachid Guerraoui, Andre Schiper Departement d Informatique, Ecole

More information

TECHNICAL REPORT YL DISSECTING ZAB

TECHNICAL REPORT YL DISSECTING ZAB TECHNICAL REPORT YL-2010-0007 DISSECTING ZAB Flavio Junqueira, Benjamin Reed, and Marco Serafini Yahoo! Labs 701 First Ave Sunnyvale, CA 94089 {fpj,breed,serafini@yahoo-inc.com} Bangalore Barcelona Haifa

More information

Dynamic Group Communication

Dynamic Group Communication Dynamic Group Communication André Schiper Ecole Polytechnique Fédérale de Lausanne (EPFL) 1015 Lausanne, Switzerland e-mail: andre.schiper@epfl.ch Abstract Group communication is the basic infrastructure

More information

Coordination. Failures and Consensus. Consensus. Consensus. Overview. Properties for Correct Consensus. Variant I: Consensus (C) P 1. v 1.

Coordination. Failures and Consensus. Consensus. Consensus. Overview. Properties for Correct Consensus. Variant I: Consensus (C) P 1. v 1. Coordination Failures and Consensus If the solution to availability and scalability is to decentralize and replicate functions and data, how do we coordinate the nodes? data consistency update propagation

More information

Petri nets. s 1 s 2. s 3 s 4. directed arcs.

Petri nets. s 1 s 2. s 3 s 4. directed arcs. Petri nets Petri nets Petri nets are a basic model of parallel and distributed systems (named after Carl Adam Petri). The basic idea is to describe state changes in a system with transitions. @ @R s 1

More information

S1 S2. checkpoint. m m2 m3 m4. checkpoint P checkpoint. P m5 P

S1 S2. checkpoint. m m2 m3 m4. checkpoint P checkpoint. P m5 P On Consistent Checkpointing in Distributed Systems Guohong Cao, Mukesh Singhal Department of Computer and Information Science The Ohio State University Columbus, OH 43201 E-mail: fgcao, singhalg@cis.ohio-state.edu

More information

Distributed systems Lecture 4: Clock synchronisation; logical clocks. Dr Robert N. M. Watson

Distributed systems Lecture 4: Clock synchronisation; logical clocks. Dr Robert N. M. Watson Distributed systems Lecture 4: Clock synchronisation; logical clocks Dr Robert N. M. Watson 1 Last time Started to look at time in distributed systems Coordinating actions between processes Physical clocks

More information

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Stavros Tripakis Abstract We introduce problems of decentralized control with communication, where we explicitly

More information

Immediate Detection of Predicates in Pervasive Environments

Immediate Detection of Predicates in Pervasive Environments Immediate Detection of redicates in ervasive Environments Ajay Kshemkalyani University of Illinois at Chicago November 30, 2010 A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates......

More information

Causal Consistency for Geo-Replicated Cloud Storage under Partial Replication

Causal Consistency for Geo-Replicated Cloud Storage under Partial Replication Causal Consistency for Geo-Replicated Cloud Storage under Partial Replication Min Shen, Ajay D. Kshemkalyani, TaYuan Hsu University of Illinois at Chicago Min Shen, Ajay D. Kshemkalyani, TaYuan Causal

More information

6.852: Distributed Algorithms Fall, Class 24

6.852: Distributed Algorithms Fall, Class 24 6.852: Distributed Algorithms Fall, 2009 Class 24 Today s plan Self-stabilization Self-stabilizing algorithms: Breadth-first spanning tree Mutual exclusion Composing self-stabilizing algorithms Making

More information

Do we have a quorum?

Do we have a quorum? Do we have a quorum? Quorum Systems Given a set U of servers, U = n: A quorum system is a set Q 2 U such that Q 1, Q 2 Q : Q 1 Q 2 Each Q in Q is a quorum How quorum systems work: A read/write shared register

More information

arxiv: v1 [cs.dc] 22 Oct 2018

arxiv: v1 [cs.dc] 22 Oct 2018 FANTOM: A SCALABLE FRAMEWORK FOR ASYNCHRONOUS DISTRIBUTED SYSTEMS A PREPRINT Sang-Min Choi, Jiho Park, Quan Nguyen, and Andre Cronje arxiv:1810.10360v1 [cs.dc] 22 Oct 2018 FANTOM Lab FANTOM Foundation

More information

Chapter 4 Deliberation with Temporal Domain Models

Chapter 4 Deliberation with Temporal Domain Models Last update: April 10, 2018 Chapter 4 Deliberation with Temporal Domain Models Section 4.4: Constraint Management Section 4.5: Acting with Temporal Models Automated Planning and Acting Malik Ghallab, Dana

More information

Analysis of Bounds on Hybrid Vector Clocks

Analysis of Bounds on Hybrid Vector Clocks Analysis of Bounds on Hybrid Vector Clocks Sorrachai Yingchareonthawornchai 1, Sandeep Kulkarni 2, and Murat Demirbas 3 Michigan State University 1,2 University at Buffalo 3 (OPODIS 2015) Motivation A

More information

Reliable Broadcast for Broadcast Busses

Reliable Broadcast for Broadcast Busses Reliable Broadcast for Broadcast Busses Ozalp Babaoglu and Rogerio Drummond. Streets of Byzantium: Network Architectures for Reliable Broadcast. IEEE Transactions on Software Engineering SE- 11(6):546-554,

More information

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication 1

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication 1 Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication 1 Stavros Tripakis 2 VERIMAG Technical Report TR-2004-26 November 2004 Abstract We introduce problems of decentralized

More information

Early consensus in an asynchronous system with a weak failure detector*

Early consensus in an asynchronous system with a weak failure detector* Distrib. Comput. (1997) 10: 149 157 Early consensus in an asynchronous system with a weak failure detector* André Schiper Ecole Polytechnique Fe dérale, De partement d Informatique, CH-1015 Lausanne, Switzerland

More information

A VP-Accordant Checkpointing Protocol Preventing Useless Checkpoints

A VP-Accordant Checkpointing Protocol Preventing Useless Checkpoints A VP-Accordant Checkpointing Protocol Preventing Useless Checkpoints Roberto BALDONI Francesco QUAGLIA Bruno CICIANI Dipartimento di Informatica e Sistemistica, Università La Sapienza Via Salaria 113,

More information

Abstract. The paper considers the problem of implementing \Virtually. system. Virtually Synchronous Communication was rst introduced

Abstract. The paper considers the problem of implementing \Virtually. system. Virtually Synchronous Communication was rst introduced Primary Partition \Virtually-Synchronous Communication" harder than Consensus? Andre Schiper and Alain Sandoz Departement d'informatique Ecole Polytechnique Federale de Lausanne CH-1015 Lausanne (Switzerland)

More information

Rollback-Dependency Trackability: A Minimal Characterization and Its Protocol

Rollback-Dependency Trackability: A Minimal Characterization and Its Protocol Information and Computation 165, 144 173 (2001) doi:10.1006/inco.2000.2906, available online at http://www.idealibrary.com on Rollback-Dependency Trackability: A Minimal Characterization and Its Protocol

More information

Finally the Weakest Failure Detector for Non-Blocking Atomic Commit

Finally the Weakest Failure Detector for Non-Blocking Atomic Commit Finally the Weakest Failure Detector for Non-Blocking Atomic Commit Rachid Guerraoui Petr Kouznetsov Distributed Programming Laboratory EPFL Abstract Recent papers [7, 9] define the weakest failure detector

More information

Outline F eria AADL behavior 1/ 78

Outline F eria AADL behavior 1/ 78 Outline AADL behavior Annex Jean-Paul Bodeveix 2 Pierre Dissaux 3 Mamoun Filali 2 Pierre Gaufillet 1 François Vernadat 2 1 AIRBUS-FRANCE 2 FéRIA 3 ELLIDIS SAE AS2C Detroit Michigan April 2006 FéRIA AADL

More information

Using Happens-Before Relationship to debug MPI non-determinism. Anh Vo and Alan Humphrey

Using Happens-Before Relationship to debug MPI non-determinism. Anh Vo and Alan Humphrey Using Happens-Before Relationship to debug MPI non-determinism Anh Vo and Alan Humphrey {avo,ahumphre}@cs.utah.edu Distributed event ordering is crucial Bob receives two undated letters from his dad One

More information

arxiv: v2 [cs.dc] 18 Feb 2015

arxiv: v2 [cs.dc] 18 Feb 2015 Consensus using Asynchronous Failure Detectors Nancy Lynch CSAIL, MIT Srikanth Sastry CSAIL, MIT arxiv:1502.02538v2 [cs.dc] 18 Feb 2015 Abstract The FLP result shows that crash-tolerant consensus is impossible

More information

Monitoring Functions on Global States of Distributed Programs. The University of Texas at Austin, Austin, Texas June 10, 1994.

Monitoring Functions on Global States of Distributed Programs. The University of Texas at Austin, Austin, Texas June 10, 1994. Monitoring Functions on Global States of Distributed Programs Alexander I. Tomlinson alext@pine.ece.utexas.edu Vijay K. Garg garg@ece.utexas.edu Department of Electrical and Computer Engineering The University

More information

COMP 633: Parallel Computing Fall 2018 Written Assignment 1: Sample Solutions

COMP 633: Parallel Computing Fall 2018 Written Assignment 1: Sample Solutions COMP 633: Parallel Computing Fall 2018 Written Assignment 1: Sample Solutions September 12, 2018 I. The Work-Time W-T presentation of EREW sequence reduction Algorithm 2 in the PRAM handout has work complexity

More information

Logic Model Checking

Logic Model Checking Logic Model Checking Lecture Notes 10:18 Caltech 101b.2 January-March 2004 Course Text: The Spin Model Checker: Primer and Reference Manual Addison-Wesley 2003, ISBN 0-321-22862-6, 608 pgs. the assignment

More information

6.852: Distributed Algorithms Fall, Class 10

6.852: Distributed Algorithms Fall, Class 10 6.852: Distributed Algorithms Fall, 2009 Class 10 Today s plan Simulating synchronous algorithms in asynchronous networks Synchronizers Lower bound for global synchronization Reading: Chapter 16 Next:

More information

Efficient Dependency Tracking for Relevant Events in Shared-Memory Systems

Efficient Dependency Tracking for Relevant Events in Shared-Memory Systems Efficient Dependency Tracking for Relevant Events in Shared-Memory Systems Anurag Agarwal Dept of Computer Sciences The University of Texas at Austin Austin, TX 78712-233, USA anurag@cs.utexas.edu Vijay

More information

Shared Memory vs Message Passing

Shared Memory vs Message Passing Shared Memory vs Message Passing Carole Delporte-Gallet Hugues Fauconnier Rachid Guerraoui Revised: 15 February 2004 Abstract This paper determines the computational strength of the shared memory abstraction

More information

Design of Distributed Systems Melinda Tóth, Zoltán Horváth

Design of Distributed Systems Melinda Tóth, Zoltán Horváth Design of Distributed Systems Melinda Tóth, Zoltán Horváth Design of Distributed Systems Melinda Tóth, Zoltán Horváth Publication date 2014 Copyright 2014 Melinda Tóth, Zoltán Horváth Supported by TÁMOP-412A/1-11/1-2011-0052

More information

A leader election algorithm for dynamic networks with causal clocks

A leader election algorithm for dynamic networks with causal clocks A leader election algorithm for dynamic networks with causal clocks The MIT Faculty has made this article openly available. Please share how this access benefits you. Your story matters. Citation As Published

More information

Checking Behavioral Conformance of Artifacts

Checking Behavioral Conformance of Artifacts Checking Behavioral Conformance of Artifacts Dirk Fahland Massimiliano de Leoni Boudewijn F. van Dongen Wil M.P. van der Aalst, Eindhoven University of Technology, The Netherlands (d.fahland m.d.leoni

More information

Design of a Sliding Window over Asynchronous Event Streams

Design of a Sliding Window over Asynchronous Event Streams 1 Design of a Sliding Window over Asynchronous Event Streams Yiling Yang 1,2, Yu Huang 1,2, Jiannong Cao 3, Xiaoxing Ma 1,2, Jian Lu 1,2 1 State Key Laboratory for Novel Software Technology Nanjing University,

More information

Consensus and Universal Construction"

Consensus and Universal Construction Consensus and Universal Construction INF346, 2015 So far Shared-memory communication: safe bits => multi-valued atomic registers atomic registers => atomic/immediate snapshot 2 Today Reaching agreement

More information

CS5412: REPLICATION, CONSISTENCY AND CLOCKS

CS5412: REPLICATION, CONSISTENCY AND CLOCKS 1 CS5412: REPLICATION, CONSISTENCY AND CLOCKS Lecture X Ken Birman Recall that clouds have tiers 2 Up to now our focus has been on client systems and the network, and the way that the cloud has reshaped

More information

I R I S A P U B L I C A T I O N I N T E R N E N o VIRTUAL PRECEDENCE IN ASYNCHRONOUS SYSTEMS: CONCEPT AND APPLICATIONS

I R I S A P U B L I C A T I O N I N T E R N E N o VIRTUAL PRECEDENCE IN ASYNCHRONOUS SYSTEMS: CONCEPT AND APPLICATIONS I R I P U B L I C A T I O N I N T E R N E 079 N o S INSTITUT DE RECHERCHE EN INFORMATIQUE ET SYSTÈMES ALÉATOIRES A VIRTUAL PRECEDENCE IN ASYNCHRONOUS SYSTEMS: CONCEPT AND APPLICATIONS JEAN-MICHEL HÉLARY,

More information

Asynchronous Communication 2

Asynchronous Communication 2 Asynchronous Communication 2 INF4140 22.11.12 Lecture 11 INF4140 (22.11.12) Asynchronous Communication 2 Lecture 11 1 / 37 Overview: Last time semantics: histories and trace sets specification: invariants

More information

MAD. Models & Algorithms for Distributed systems -- 2/5 -- download slides at h9p://people.rennes.inria.fr/eric.fabre/

MAD. Models & Algorithms for Distributed systems -- 2/5 -- download slides at h9p://people.rennes.inria.fr/eric.fabre/ MAD Models & Algorithms for Distributed systems -- /5 -- download slides at h9p://peoplerennesinriafr/ericfabre/ 1 Today Runs/execuDons of a distributed system are pardal orders of events We introduce

More information

Valency Arguments CHAPTER7

Valency Arguments CHAPTER7 CHAPTER7 Valency Arguments In a valency argument, configurations are classified as either univalent or multivalent. Starting from a univalent configuration, all terminating executions (from some class)

More information