Lecture 4-1 Computer Science 425 Distributed Systems (Fall2009) Lecture 4 Chandy-Lamport Snapshot Algorithm and Multicast Communication Reading: Section.

Slides:



Advertisements
Similar presentations
1 Process groups and message ordering If processes belong to groups, certain algorithms can be used that depend on group properties membership create (
Advertisements

Global States.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 14: Time and.
CS425/CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 6 Instructor: Haifeng YU.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Reliable Multicast Steve Ko Computer Sciences and Engineering University at Buffalo.
CS542 Topics in Distributed Systems Diganta Goswami.
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.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
CS542 Topics in Distributed Systems Diganta Goswami.
Lab 2 Group Communication Andreas Larsson
CS514: Intermediate Course in Operating Systems Professor Ken Birman Vivek Vishnumurthy: TA.
CS 582 / CMPE 481 Distributed Systems
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.
CMPT 431 Dr. Alexandra Fedorova Lecture VIII: Time And Global Clocks.
Distributed Systems Fall 2009 Logical time, global states, and debugging.
Slides for Chapter 10: Time and Global State
Group Communication Phuong Hoai Ha & Yi Zhang Introduction to Lab. assignments March 24 th, 2004.
Lecture 13 Synchronization (cont). EECE 411: Design of Distributed Software Applications Logistics Last quiz Max: 69 / Median: 52 / Min: 24 In a box outside.
Ordering and Consistent Cuts Presented by Chi H. Ho.
EEC-681/781 Distributed Computing Systems Lecture 11 Wenbing Zhao Cleveland State University.
Cloud Computing Concepts
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Clock Synchronization Physical clocks Clock synchronization algorithms –Cristian’s.
Lecture 2-1 CS 425/ECE 428 Distributed Systems Lecture 2 Time & Synchronization Reading: Klara Nahrstedt.
Lecture 3-1 Computer Science 425 Distributed Systems Lecture 3 Logical Clock and Global States/ Snapshots Reading: Chapter 11.4&11.5 Klara Nahrstedt.
Computer Science 425 Distributed Systems (Fall 2009) Lecture 5 Multicast Communication Reading: Section 12.4 Klara Nahrstedt.
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.
Lab 2 Group Communication Farnaz Moradi Based on slides by Andreas Larsson 2012.
CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
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:
Computer Science 425 Distributed Systems (Fall 2009) Lecture 10 The Consensus Problem Part of Section 12.5 and Paper: “Impossibility of Distributed Consensus.
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?
CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 8 Leader Election Section 12.3 Klara Nahrstedt.
Farnaz Moradi Based on slides by Andreas Larsson 2013.
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.
Lecture 11-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2010 Indranil Gupta (Indy) September 28, 2010 Lecture 11 Leader Election.
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.
CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 9 Consensus I Section Klara Nahrstedt.
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.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 5 Instructor: Haifeng YU.
Computer Science 425 Distributed Systems (Fall 2009) Lecture 6 Multicast/Group Communication and Mutual Exclusion Section &12.2.
Lecture 10: Coordination and Agreement (Chap 12) Haibin Zhu, PhD. Assistant Professor Department of Computer Science Nipissing University © 2002.
Lecture 12-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2012 Indranil Gupta (Indy) October 4, 2012 Lecture 12 Mutual Exclusion.
Lecture 7- 1 CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 7 Distributed Mutual Exclusion Section 12.2 Klara Nahrstedt.
CSE 486/586 CSE 486/586 Distributed Systems Global States Steve Ko Computer Sciences and Engineering University at Buffalo.
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.
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Lecture 9: Multicast Sep 22, 2015 All slides © IG.
Distributed Systems Lecture 7 Multicast 1. Previous lecture Global states – Cuts – Collecting state – Algorithms 2.
Distributed Systems Lecture 6 Global states and snapshots 1.
CSE 486/586 Distributed Systems Reliable Multicast --- 1
CSE 486/586 Distributed Systems Global States
Theoretical Foundations
Computer Science 425 Distributed Systems CS 425 / ECE 428 Fall 2013
COT 5611 Operating Systems Design Principles Spring 2012
EECS 498 Introduction to Distributed Systems Fall 2017
湖南大学-信息科学与工程学院-计算机与科学系
Slides for Chapter 14: Time and Global States
Slides for Chapter 11: Time and Global State
Slides for Chapter 14: Time and Global States
CSE 486/586 Distributed Systems Global States
Jenhui Chen Office number:
CIS825 Lecture 5 1.
Slides for Chapter 14: Time and Global States
COT 5611 Operating Systems Design Principles Spring 2014
CSE 486/586 Distributed Systems Reliable Multicast --- 1
Presentation transcript:

Lecture 4-1 Computer Science 425 Distributed Systems (Fall2009) Lecture 4 Chandy-Lamport Snapshot Algorithm and Multicast Communication Reading: Section 11.5&12.4 Klara Nahrstedt

Lecture 4-2 Acknowledgement The slides during this semester are based on ideas and material from the following sources: –Slides prepared by Professors M. Harandi, J. Hou, I. Gupta, N. Vaidya, Y-Ch. Hu, S. Mitra. –Slides from Professor S. Gosh’s course at University o Iowa.

Lecture 4-3 Administrative Form Groups for MP projects –Up to 3 members per group – names to TA today Homework 1 posted today, September 3 (Thursday) –Deadline, September 17 (Thursday) Introductory material to get introduced to the Eclipse/Android Programming Environment is posted – –Optional MP0 –Posted on the class website

Lecture 4-4 Plan for Today Chandy-Lamport Global Snapshot Algorithm New Topic: Multicast Communication

Lecture 4-5 Review A run is a total ordering of events in H that is consistent with each h i ’s ordering –E.g., A linearization is a run consistent with happens- before (  ) relation in H –E.g.,, –Concurrent events are ordered arbitrarily –Linearizations pass through consistent global states P1 P2 P3 e10e10 e11e11 e12e12 e13e13 e20e20 e21e21 e22e22 e30e30 e31e31 e32e32 C3 C2 C1 C0

Lecture 4-6 Chandy-Lamport “Snapshot” Algorithm  “Snapshot” is a set of process and channel states for set of processes P i (i=1,…N) such that the recorded global state is consistent  Even those the combination of recorded states may never occurred at the same time  Chandy-Lamport Algorithm records a set of process and channel states such that the combination is a consistent global state.  Assumptions:  No failure, all messages arrive intact, exactly once  Communication channels are unidirectional and FIFO-ordered  There is a comm. channel between each pair of processes  Any process may initiate the snapshot (send “Marker”)  Snapshot does not interfere with normal execution

Lecture 4-7 Chandy-Lamport Snapshot Algorithm (2) 1.Initiator process P 0 records its state locally 2.Marker sending rule for process P i : After P i has recorded its state, for each outgoing channel Ch ij, P i sends one marker message over Ch ij (before P i sends any other message over Ch ij ) 3.Marker receiving rule for process P i : Process P i on receipt of a marker over channel Ch ji If (P i has not yet recorded its state) it Records its process state now; Records the state of Ch ji as empty set; Starts recording messages arriving over other incoming channels; else (P i has already recorded its state) P i records the state of Ch ji as the set of all messages it has received over Ch ji since it saved its state

Lecture 4-8 Snapshot Example P1 P2 P3 e10e10 e20e20 e23e23 e30e30 e13e13 a b M e 1 1,2 M 1- P1 initiates snapshot: records its state (S1); sends Markers to P2 & P3; turns on recording for channels Ch 21 and Ch 31 e 2 1,2,3 M M 2- P2 receives Marker over Ch 12, records its state (S2), sets state(Ch 12 ) = {} sends Marker to P1 & P3; turns on recording for channel Ch 32 e14e14 3- P1 receives Marker over Ch 21, sets state(Ch 21 ) = {a} e 3 2,3,4 M M 4- P3 receives Marker over Ch 13, records its state (S3), sets state(Ch 13 ) = {} sends Marker to P1 & P2; turns on recording for channel Ch 23 e24e24 5- P2 receives Marker over Ch 32, sets state(Ch 32 ) = {b} e31e31 6- P3 receives Marker over Ch 23, sets state(Ch 23 ) = {} e13e13 7- P1 receives Marker over Ch 31, sets state(Ch 31 ) = {}

Lecture 4-9 Another Example: Trading

Lecture 4-10 Execution of the Processes p 1 p 2 (empty) (empty) c 2 c 1 1. Global state S 0 2. Global state S 1 3. Global state S 2 4. Global state S 3 p 1 p 2 (Order 10, $100), M (empty) c 2 c 1 p 1 p 2 (Order 10, $100), M (five widgets) c 2 c 1 p 1 p 2 (Order 10, $100) (empty) c 2 c 1 Send 5 widgets (M = Marker Message)

Lecture 4-11 Reachability between States in Snapshot Algorithm Let e i and e j be events occurring at p i and p j, respectively such that e i  e j The snapshot algorithm ensures that if e j is in the cut then e i is also in the cut. if e j occurred before p j recorded its state, then e i must have occurred before p i recorded its state.

Lecture 4-12 Causality Violation P1 P2 P Physical Time 4 6 Send obj1 obj1.method() Send obj1 Causality violation occurs when order of messages causes an action based on information that another host has not yet received. In designing a DS, potential for causality violation is important

Lecture 4-13 Detecting Causality Violation P1 P2 P3 (1,0,0) (2,0,0) Physical Time (2,0,2) Potential causality violation can be detected by vector timestamps. If the vector timestamp of a message is less than the local vector timestamp, on arrival, there is a potential causality violation. 0,0,0 1,0,0 2,0,1 2,2,2 2,1,2 2,0,2 2,0,0 Violation: (1,0,0) < (2,1,2)

Lecture 4-14 Multicast Communication

Lecture 4-15 Communication Modes in DS  Unicast (best effort or reliable)  Messages are sent from exactly one process to one process.  Best effort guarantees that if a message is delivered it would be intact.  Reliable guarantees delivery of messages.  Broadcast  Messages are sent from exactly one process to all processes on the network.  Reliable broadcast protocols are not practical.  Multicast  Messages are sent from exactly one process to several processes on the network.  Reliable multicast can be implemented “above” (i.e., “using”) a reliable unicast.

Lecture 4-16

Lecture 4-17 What’re we designing in this class Application (at process p) MULTICAST PROTOCOL send multicast Incoming messages deliver multicast One process p p1 p2 p3 Send/ multicast Deliver multicast Deliver multicast

Lecture 4-18 Open and closed groups

Lecture 4-19 Basic Multicast (B-multicast) A straightforward way to implement B-multicast is to use a reliable one-to-one send operation: B-multicast(g,m): for each process p in g, send (p,m). On receive(m) at p: B-deliver(m) at p. A “correct” process= a “non-faulty” process Basic multicast (B-multicast) primitive guarantees a correct (i.e., non-faulty) process will eventually deliver the message, as long as the sender (multicasting process) does not crash. –Can we provide reliability even when the sender crashes (after it has sent the multicast )?

Lecture 4-20 Summary Multicast is operation of sending one message to multiple processes Reliable multicast algorithm built using reliable unicast Introduction to Ordering – FIFO, total, causal Next week Read Sections 12.4 Homework 1 due September 17 –Come by office hours with your questions