Presentation is loading. Please wait.

Presentation is loading. Please wait.

Outline Theoretical Foundations - continued

Similar presentations


Presentation on theme: "Outline Theoretical Foundations - continued"— Presentation transcript:

1 Outline Theoretical Foundations - continued
Casual ordering of messages – review Global state Cuts Termination detection 4/22/2019 COP5611

2 Vector Clocks Implementation rules
[IR1] Clock Ci is incremented between any two successive events in process Pi Ci[i] := Ci[i] + d ( d > 0) [IR2] If event a is the sending of message m by process Pi, then message m is assigned a timestamp tm = Ci(a). On receiving the same message m by process Pj, Cj is set to Cj[k] := max(Cj[k], tm[k]) 4/22/2019 COP5611

3 Vector Clocks – cont. In a system of vector clocks, where 4/22/2019
COP5611

4 Causal Ordering of Messages
The causal ordering of messages tries to maintain the same causal relationship that holds among “message send” events with the corresponding “message receive” events In other words, if Send(M1) -> Send(M2), then Receive(M1) -> Receive(M2) This is different from causal ordering of events 4/22/2019 COP5611

5 Birman-Schiper-Stephenson Protocol
4/22/2019 COP5611

6 Schiper-Eggli-Sando Protocol
4/22/2019 COP5611

7 Schiper-Eggli-Sando Protocol – cont.
4/22/2019 COP5611

8 Schiper-Eggli-Sando Protocol – cont.
4/22/2019 COP5611

9 Global State 4/22/2019 COP5611

10 Local State Local state More notations
For a site Si, its local state at a given time is defined by the local context of the distributed application, denoted by LSi. More notations mij denotes a message sent by Si to Sj send(mij) and rec(mij) denote the corresponding sending and receiving event. 4/22/2019 COP5611

11 Definitions – cont. 4/22/2019 COP5611

12 Definitions – cont. 4/22/2019 COP5611

13 Global State – cont. 4/22/2019 COP5611

14 Definitions – cont. Strongly consistent global state:
A global state is strongly consistent if it is consistent and transitless 4/22/2019 COP5611

15 Global State – cont. 4/22/2019 COP5611

16 Chandy-Lamport’s Global State Recording Algorithm
4/22/2019 COP5611

17 Cuts of a Distributed Computation
A cut is a graphical representation of a global state A consistent cut is a graphical representation of a consistent global state Definition A cut of a distributed computation is a set C={c1, c2, ...., cn}, where ci is a cut event at site Si in the history of the distributed computation 4/22/2019 COP5611

18 Cuts of a Distributed Computation – cont.
4/22/2019 COP5611

19 Cuts of a Distributed Computation – cont.
4/22/2019 COP5611

20 Cuts of a Distributed Computation – cont.
4/22/2019 COP5611

21 Cuts of a Distributed Computation – cont.
4/22/2019 COP5611

22 Cuts of a Distributed Computation – cont.
4/22/2019 COP5611

23 Termination Detection
Termination detection is to detect when a distributed algorithm is terminated, such as election, a deadlock detection, or token generating algorithm A process can be active or idle A computation is said to have terminated if and only if all the processes are idle and there are no messages in transit Basic idea We are not going to cover the algorithm in detail 4/22/2019 COP5611

24 Summary The absence of global time and the absence of shared memory are two main characteristics of distributed systems Two schemes, Lamport’s logical clocks and vector clocks are used to order events Two algorithms for causal ordering of messages based on the vector clock-based ideas are discussed Global states and cuts of a distributed system are also covered These provide the theoretical foundations for other distributed algorithms 4/22/2019 COP5611


Download ppt "Outline Theoretical Foundations - continued"

Similar presentations


Ads by Google