1 Global State $500$200 A B C1: Empty C2: Empty Global State 1 $450$200 A B C1: Tx $50 C2: Empty Global State 2 $450$250 A B C1: Empty C2: Empty Global.

Slides:



Advertisements
Similar presentations
Distributed Snapshots: Determining Global States of Distributed Systems - K. Mani Chandy and Leslie Lamport.
Advertisements

Virtual Time “Virtual Time and Global States of Distributed Systems” Friedmann Mattern, 1989 The Model: An asynchronous distributed system = a set of processes.
SES Algorithm SES: Schiper-Eggli-Sandoz Algorithm. No need for broadcast messages. Each process maintains a vector V_P of size N - 1, N the number of processes.
Uncoordinated Checkpointing The Global State Recording Algorithm.
Uncoordinated Checkpointing The Global State Recording Algorithm Cristian Solano.
Time and Global States Part 3 ECEN5053 Software Engineering of Distributed Systems University of Colorado, Boulder.
Termination Detection of Diffusing Computations Chapter 19 Distributed Algorithms by Nancy Lynch Presented by Jamie Payton Oct. 3, 2003.
CS542 Topics in Distributed Systems Diganta Goswami.
Distributed Computing 5. Snapshot Shmuel Zaks ©
Theoretical Aspects Logical Clocks Causal Ordering
OSU CIS Lazy Snapshots Nigamanth Sridhar and Paul A.G. Sivilotti Computer and Information Science The Ohio State University
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Logical Clocks and Global State.
S NAPSHOT A LGORITHM. W HAT IS A S NAPSHOT - INTUITION Given a system of processors and communication channels between them, we want each processor to.
Causality & Global States. P1 P2 P Physical Time 4 6 Include(obj1 ) obj1.method() P2 has obj1 Causality violation occurs when order.
Ordering and Consistent Cuts Presented By Biswanath Panda.
Distributed Systems Fall 2009 Logical time, global states, and debugging.
Computer Science Lecture 11, page 1 CS677: Distributed OS Last Class: Clock Synchronization Logical clocks Vector clocks Global state.
Ordering and Consistent Cuts Presented by Chi H. Ho.
Cloud Computing Concepts
1 Distributed Process Management: Distributed Global States and Distributed Mutual Exclusion.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Clock Synchronization Physical clocks Clock synchronization algorithms –Cristian’s.
Consistent Global States of Distributed Systems: Fundamental Concepts and Mechanisms CS 249 Project Fall 2005 Wing Wong.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Logical Clocks and Global State.
Chapter 5.
CIS 720 Distributed algorithms. “Paint on the forehead” problem Each of you can see other’s forehead but not your own. I announce “some of you have paint.
1 Distributed Systems CS 425 / CSE 424 / ECE 428 Global Snapshots Reading: Sections 11.5 (4 th ed), 14.5 (5 th ed)  2010, I. Gupta, K. Nahrtstedt, S.
Distributed Computing 5. Snapshot Shmuel Zaks ©
1 Consistent Global States of Distributed Systems: Fundamental Concepts and Mechanisms Author: Ozalp Babaoglu and Keith Marzullo Distributed Systems: 526.
Chapter 9 Global Snapshot. Global state  A set of local states that are concurrent with each other Concurrent states: no two states have a happened before.
Lecture 6-1 Computer Science 425 Distributed Systems CS 425 / ECE 428 Fall 2013 Indranil Gupta (Indy) September 12, 2013 Lecture 6 Global Snapshots Reading:
Distributed Snapshot. Think about these -- How many messages are in transit on the internet? --What is the global state of a distributed system of N processes?
“Virtual Time and Global States of Distributed Systems”
Distributed Systems Fall 2010 Logical time, global states, and debugging.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Global States Steve Ko Computer Sciences and Engineering University at Buffalo.
Distributed Snapshot. One-dollar bank Let a $1 coin circulate in a network of a million banks. How can someone count the total $ in circulation? If not.
Hwajung Lee. -- How many messages are in transit on the internet? --What is the global state of a distributed system of N processes? How do we compute.
D ISTRIBUTED S YSTEM UNIT-2 Theoretical Foundation for Distributed Systems Prepared By: G.S.Mishra.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
CSE 486/586 CSE 486/586 Distributed Systems Global States Steve Ko Computer Sciences and Engineering University at Buffalo.
Lecture 4-1 Computer Science 425 Distributed Systems (Fall2009) Lecture 4 Chandy-Lamport Snapshot Algorithm and Multicast Communication Reading: Section.
1 Chapter 11 Global Properties (Distributed Termination)
Hwajung Lee. -- How many messages are in transit on the internet? --What is the global state of a distributed system of N processes? How do we compute.
Distributed Systems Lecture 6 Global states and snapshots 1.
Global state and snapshot
Global State Recording
Global state and snapshot
Lecture 3: State, Detection
CSE 486/586 Distributed Systems Global States
Theoretical Foundations
Distributed Snapshots & Termination detection
Global State Recording
湖南大学-信息科学与工程学院-计算机与科学系
Slides for Chapter 14: Time and Global States
Logical Clocks and Casual Ordering
Outline Theoretical Foundations - continued Lab 1
Distributed Snapshot Distributed Systems.
Chapter 5 (through section 5.4)
Uncoordinated Checkpointing
Slides for Chapter 11: Time and Global State
Slides for Chapter 14: Time and Global States
Outline Theoretical Foundations - continued
ITEC452 Distributed Computing Lecture 8 Distributed Snapshot
CSE 486/586 Distributed Systems Global States
Jenhui Chen Office number:
Distributed algorithms
CIS825 Lecture 5 1.
Slides for Chapter 14: Time and Global States
Chandy-Lamport Example
Distributed Snapshot.
Presentation transcript:

1 Global State $500$200 A B C1: Empty C2: Empty Global State 1 $450$200 A B C1: Tx $50 C2: Empty Global State 2 $450$250 A B C1: Empty C2: Empty Global State 3

2 Recording Global State Send(Mij): message M sent from Si to Sj rec(Mij): message M received by Sj, from Si time(x): Time of event x LSi: local state at Si send(Mij) is in LSi iff (if and only if) time(send(Mij)) < time(LSi) rec(Mij) is in LSj iff time(rec(Mij)) < time(LSj) transit(LSi, LSj) : set of messages sent/recorded at LSi and NOT received/recorded at LSj

3 Recording Global State … inconsistent(LSi,LSj): set of messages NOT sent/recorded at LSi and received/recorded at LSj Global State, GS: {LS1, LS2,…., LSn} Consistent Global State, GS = {LS1,..LSn} AND for all i in n, inconsistent(LSi,LSj) is null. Transitless global state, GS = {LS1,…,LSn} AND for all I in n, transit(LSi,LSj) is null.

4 Recording Global State.. S1 S2 M1 M2 LS1 LS2 M1: transit M2: inconsistent

5 Recording Global State... Strongly consistent global state: consistent and transitless, i.e., all send and the corresponding receive events are recorded in all LSi. LS11 LS21 LS31 LS12 LS22 LS23 LS32 LS33

6 Chandy-Lamport Algorithm Distributed algorithm to capture a consistent global state. Communication channels assumed to be FIFO. Uses a marker to initiate the algorithm. Marker sort of dummy message, with no effect on the functions of processes. Recorded Global State is known as snapshot of the system state. Can be initiated by any number of processes by executing marker sending rule Sending Marker by P: – P records its state. For each outgoing channel C, P sends a marker on C with the state info. Receiving Marker by Q: – If Q has NOT recorded its state then (a) Record the state of C as an empty sequence and (b) Follow Marker Sending Rule. – Else (Q has recorded state before): Record the state of C as sequence of messages received along C, after Q’s state was recorded and before Q received the marker.

7 Chandy-Lamport Algorithm Initiation of marker can be done by any process, with its own unique marker:. Several processes can initiate state recording by sending markers. Concurrent sending of markers allowed. One possible way to collect global state: all processes send the recorded state information to the initiator of marker. Initiator process can sum up the global state. Si Sj Sc Seq Seq’

8 Chandy-Lamport Algorithm... Example: Pi Pk Pj Record channel state Send Marker Send Marker Record channel state Record channel state Channel state example: M1 sent to Px at t1, M2 sent to Py at t2, ….

9 Cuts Cuts: graphical representation of a global state. Cut C = {c1, c2,.., cn}; ci: cut event at Si. Consistent Cut: If every message received by a Si before a cut event, was sent before the cut event at Sender. One can prove: A cut is a consistent cut iff no two cut events are causally related, i.e., !(ci -> cj) and !(cj -> ci). S1 S2 S3 S4 c1 c2 c3 c4

10 Time of a Cut C = {c1, c2,.., cn} with vector time stamp VTci. Vector time of the cut, VTc = sup(VTc1, VTc2,.., VTcn). sup is a component-wise maximum, i.e., VTci = max(VTc1[I], VTc2[I],.., VTcn[I]). Now, a cut is consistent iff VTc = (VTc1[1], VTc2[2],.., VTcn[n]).

11 Termination Detection Termination: completion of the sequence of algorithm. (e.g.,) leader election, deadlock detection, deadlock resolution. Use a controlling agent or a monitor process. Initially, all processes are idle. Weight of controlling agent is 1 (0 for others). Start of computation: message from controller to a process. Weight: split into half (0.5 each). Repeat this: any time a process send a computation message to another process, split the weights between the two processes (e.g., 0.25 each for the third time). End of computation: process sends its weight to the controller. Add this weight to that of controller’s. Rule: Sum of W always 1. Termination: When weight of controller becomes 1 again.

12 Huang’s Algorithm B(DW): computation message, DW is the weight. C(DW): control/end of computation message; Rule 1: Before sending B, compute W1, W2 (such that W1 + W2 is W of the process). Send B(W2) to Pi, W = W1. Rule 2: Receiving B(DW) -> W = W + DW, process becomes active. Rule 3: Active to Idle -> send C(DW), W = 0. Rule 4: Receiving C(DW) by controlling agent -> W = W + DW, If W == 1, computation has terminated.