{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

L6.sp11 - CS 525 Advanced Distributed Systems Spring 2011...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CS 525 Advanced Distributed Systems Spring 2011 Indranil Gupta (Indy) Lecture 6 Distributed Systems Fundamentals February 1-3, 2011 All Slides © IG
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 Agenda I. Synchronous versus Asynchronous systems II. Lamport Timestamps III. Global Snapshots IV. Impossibility of Consensus proof
Background image of page 2
3 I. Two Different System Models S ynchronous Distributed System Each message is received within bounded time Drift of each process’ local clock has a known bound Each step in a process takes lb < time < ub Ex:A collection of processors connected by a communication bus, e.g., a Cray supercomputer or a multicore machine Asynchronous Distributed System No bounds on process execution The drift rate of a clock is arbitrary No bounds on message transmission delays Ex:The Internet is an asynchronous distributed system, so are ad-hoc and sensor networks This is a more general (and thus challenging) model than the synchronous system model. A protocol for an asynchronous system will also work for a synchronous system (though not vice-versa) It would be im possible to accurately synchronize the clocks of two communicating processes in an asynchronous system
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 II. Logical Clocks But is accurate (or approximate) clock sync. even required? Wouldn’t a logical ordering among events at processes suffice? Lamport’s happens-before ( ) among events : On the same process: a b , if time(a) < time(b) If p1 sends m to p2: send(m) receive(m) If a b and b c then a c Lamport’s logical timestamps preserve causality: All processes use a local counter (logical clock) with initial value of zero Just before each event , the local counter is incremented by 1 and assigned to the event as its timestamp A send (message) event carries its timestamp For a receive (message) event, the counter is updated by max(receiver’s-local-counter, message-timestamp) + 1
Background image of page 4
5 Example p 1 p 2 p 3 a b c d e f m 1 m 2 Physical time
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
6 Lamport Timestamps a b c d e f m 1 m 2 2 1 3 4 5 1 p 1 p 2 p 3 Physical time Logical Time Logical timestamps preserve causality of events , i.e., a b ==> TS(a) < TS(b) Can be used instead of physical timestamps
Background image of page 6
7 Lamport Timestamps a b c d e f m 1 m 2 2 1 3 4 5 1 p 1 p 2 p 3 Physical time Logical Time Logical timestamps preserve causality of events , i.e., a b ==> TS(a) < TS(b) Other way implication may not be true! (since concurrent events) logically concurrent events
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
8 III. Global Snapshot Algorithm Can you capture (record) the states of all processes and communication channels at exactly 10:04:50 am? Is it even necessary to take such an exact snapshot? Chandy and Lamport snapshot algorithm: records a logical (or causal) snapshot of the system. System Model: No failures, all messages arrive intact, exactly once, eventually Communication channels are unidirectional and FIFO- ordered There is a communication path between every process pair
Background image of page 8
9 Chandy and Lamport Snapshot Algorithm 1. Marker
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}