Presentation is loading. Please wait.

Presentation is loading. Please wait.

Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Project Reference Some slides are in courtesy of Dr. Erciyes,

Similar presentations


Presentation on theme: "Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Project Reference Some slides are in courtesy of Dr. Erciyes,"— Presentation transcript:

1 Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Project Reference Some slides are in courtesy of Dr. Erciyes, CSU San Marcos / Dr. Prabhakaran, UT-Dallas Fall 2014 COMP 4605 / CISG 5605 Computer Networks

2 Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Inherent Limitation of Distributed Systems Absence of a global clock (system-wide common clock) Difficult to decide which event occurred first inside a distributed system Absence of shared memory No individual process has an up-to-date state of the entire system A view of a system is coherent if all the observations of different processes are made at the same physical time A process in a distributed system can be obtain a coherent but partial view of the system or a complete but incoherent view of the system. A complete view is also referred to as a global state. 2

3 Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Impact of Lack of Global View 3 $500$200 $450$200 $500$250

4 Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Lamport’s Logical Clocks 4

5 Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Lamport’s Logical Clocks – cont’ Space-time Diagram 5 Time Space Internal Events Messages

6 Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Lamport’s Logical Clocks – cont’ 6

7 Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Lamport’s Logical Clocks – cont’ Example of Logical Clocks 7 (1) (2) (3) (4) (5=max(4+1,2+1) (6) (7=max(6+1,4+1) (1) (2) (3=max(2+1,2+1)) (4) (7=max(6+1,4+1))

8 Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Limitation of Lamport’s Logical Clocks 8 (1) (2) (3) (4) (6) (1) (2) (3) (4) (7) (5)(7)

9 Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Vector Clocks Keep track of transitive dependencies among processes for recovery purposes. is a “vector” clock at process whose entries are the “assumed”/”best guess” clock values of different processes. is the best guess of for ’s clock for Vector clock rules: 1. for successive events in 2.For all k,, when a message m with time stamp is received by from. 9

10 Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University 10 (1,0,0) (2,0,0) (3,4,1) (0,1,0) (2,2,0) (2,4,1) (2,3,1) (0,0,1) (0,0,2) Equal: iff Not equal: iff Less than or equal: iff Not less than or equal: iff Less than: iff and Not less than: iff ( and ) Concurrent: iff and Vector Clocks – cont’

11 Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Causal Ordering of Messages 11 Events a and b are causally related if or. Otherwise, these events are concurrent. In the system of vector clocks, iff. Casual ordering of messages If, then every recipient of both messages must receive before. (Otherwise, postpones to process until is received) (2) (1)

12 Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University BSS Protocol for Causal Ordering of Messages 12 BSS: Birman-Schiper-Stephenson Protocol Broadcast based: a message sent is received by all other processes. Deliver a message to a process only if the message preceding it immediately, has been delivered to the process. Otherwise, buffer the message. Accomplished by using a vector accompanying the message.

13 Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University BSS Protocol for Causal Ordering of Messages – cont’ 13 1.Process increments the vector time, timestamps, and broadcasts the message m. denotes the number of messages preceding m. 2.A process receives m. m is delivered when: a. b. for all k in, n is the total number of processes. Delayed message are queued in a sorted manner. c.Concurrent messages are ordered by time of receipt. 3.When m is delivered at, updated according Rule 2 of vector clocks. a. has received all ’s messages preceding m. b. has received all other messages received by before sending m.

14 Fall 2012 CISG 5500 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University BSS Protocol for Causal Ordering of Messages – cont’ 14 (buffer) (0,0,1) (0,1,1) (0,0,1)(0,1,1) (0,0,1)(0,1,1) deliver from buffer (0,0,0)


Download ppt "Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Project Reference Some slides are in courtesy of Dr. Erciyes,"

Similar presentations


Ads by Google