DOC PREVIEW
U of I CS 425 - Lecture 4

This preview shows page 1-2-19-20 out of 20 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Computer Science 425 Distributed Systems (Fall2009)AcknowledgementAdministrative Plan for Today ReviewChandy-Lamport “Snapshot” Algorithm Chandy-Lamport Snapshot Algorithm (2) Snapshot ExampleAnother Example: TradingExecution of the Processes Reachability between States in Snapshot AlgorithmCausality Violation Detecting Causality Violation Multicast CommunicationCommunication Modes in DS Slide Number 16What’re we designing in this classOpen and closed groupsBasic Multicast (B-multicast)SummaryLecture 4-1Computer Science 425Distributed Systems(Fall2009)Lecture 4Chandy-Lamport Snapshot Algorithm andMulticast Communication Reading: Section 11.5&12.4Klara NahrstedtLecture 4-2Acknowledgement• 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-3Administrative • Form Groups for MP projects – Up to 3 members per group– Email 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 websiteLecture 4-4Plan for Today • Chandy-Lamport Global Snapshot Algorithm• New Topic: Multicast CommunicationLecture 4-5Review• A run is a total ordering of events in H that is consistent with each hi’s ordering– E.g., <e10, e11, e12, e13, e20, e21, e22, e30e31, e32>• A linearization is a run consistent with happens-before () relation in H – E.g., < e10, e11,e30, e20,…>, < e10, e30, e11, e20 , …>– Concurrent events are ordered arbitrarily– Linearizations pass through consistent global statesP1P2P3e10e11e12e13e20e21e22e30e31e32C3C2C1C0Lecture 4-6Chandy-Lamport “Snapshot” Algorithm  “Snapshot” is a set of process and channel states for set of processes Pi (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 executionLecture 4-7Chandy-Lamport Snapshot Algorithm (2) 1. Initiator process P0records its state locally2. Marker sending rule for process Pi:After Pihas recorded its state, for each outgoing channel Chij, Pi sends one marker message over Chij(before Pisends any other message over Chij)3. Marker receiving rule for process Pi:Process Pi on receipt of a marker over channel ChjiIf (Pihas not yet recorded its state) it Records its process state now;Records the state of Chjias empty set;Starts recording messages arriving over other incoming channels;else (Pi has already recorded its state)Pi records the state of Chjias the set of all messages it has received over Chji since it saved its stateLecture 4-8Snapshot ExampleP1P2P3e10e20e23e30e13abMe11,2M1- P1 initiates snapshot: records its state (S1); sends Markers to P2 & P3; turns on recording for channels Ch21and Ch31e21,2,3MM2- P2 receives Marker over Ch12, records its state (S2), sets state(Ch12) = {} sends Marker to P1 & P3; turns on recording for channel Ch32e143- P1 receives Marker over Ch21, sets state(Ch21) = {a}e32,3,4MM4- P3 receives Marker over Ch13, records its state (S3), sets state(Ch13) = {} sends Marker to P1 & P2; turns on recording for channel Ch23e245- P2 receives Marker over Ch32, sets state(Ch32) = {b}e316- P3 receives Marker over Ch23, sets state(Ch23) = {}e137- P1 receives Marker over Ch31, sets state(Ch31) = {}Lecture 4-9Another Example: Tradingp1p2c2c1accountwidgets$1000 (none)account widgets$50 2000Lecture 4-10Execution of the Processesp1p2(empty)<$1000, 0><$50, 2000>(empty)c2c11. Global state S02. Global state S13. Global state S24. Global state S3p1p2(Order 10, $100), M<$900, 0><$50, 2000>(empty)c2c1p1p2(Order 10, $100), M<$900, 0><$50, 1995>(five widgets)c2c1p1p2(Order 10, $100)<$900, 5><$50, 1995>(empty)c2c1Send 5 widgets(M = Marker Message)Lecture 4-11Reachability between States in Snapshot AlgorithmSinitSfinalSsnapactual execution e0,e1,...recording recording beginsendspre-snap: e'0,e'1,...e'R-1post-snap: e'R,e'R+1,...Let eiand ejbe events occurring at piand pj, respectively such that ei ej The snapshot algorithm ensures that • if ejis in the cut then eiis also in the cut.• if ejoccurred before pjrecorded its state, then eimust have occurred before pirecorded its state.Lecture 4-12Causality ViolationP1P2P31 234500012Physical Time46Send obj1obj1.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 importantLecture 4-13Detecting Causality ViolationP1P2P3(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,00,0,00,0,01,0,02,0,12,2,22,1,22,0,22,0,0Violation: (1,0,0) < (2,1,2)Lecture 4-14Multicast CommunicationLecture 4-15Communication 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 severalprocesses on the network. Reliable multicast can be implemented “above” (i.e., “using”) a reliable unicast.Lecture 4-16Lecture 4-17What’re we designing in this classApplication(at process p)MULTICAST PROTOCOLsendmulticast Incomingmessagesdelivermulticast One process pp1p2p3Send/multicastDelivermulticastDelivermulticastLecture 4-18Open and closed groupsClosed groupOpen groupLecture 4-19Basic Multicast (B-multicast)• A straightforward way to


View Full Document

U of I CS 425 - Lecture 4

Documents in this Course
Lecture 8

Lecture 8

23 pages

TIPS

TIPS

3 pages

The Grid

The Grid

41 pages

Lecture 4

Lecture 4

27 pages

The Grid

The Grid

41 pages

LECTURE 5

LECTURE 5

25 pages

Multicast

Multicast

23 pages

LECTURE

LECTURE

34 pages

Load more
Download Lecture 4
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 4 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 4 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?