Presentation is loading. Please wait.

Presentation is loading. Please wait.

Outline Theoretical Foundations - continued Vector clocks - review

Similar presentations


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

1 Outline Theoretical Foundations - continued Vector clocks - review
Casual ordering of messages 11/29/2018 COP5611

2 Announcements This is no TA for this class
I will do the grading and everything else by myself Homework #1 is due this Thursday, Feb. 6, 2003 Turn your homework in hardcopy For the last problem, attach a hardcopy of your program Lab 1 will be assigned today You can work as a team with most two members on each team 11/29/2018 COP5611

3 Lamport’s Logical Clocks – review
Implementation rules [IR1] Clock Ci is incremented between any two successive events in process Pi Ci := Ci + 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 := max(Cj, tm + d) 11/29/2018 COP5611

4 An Example 11/29/2018 COP5611

5 Total Ordering Using Lamport’s Clocks
If a is any event at process Pi and b is any event at process Pj, then a => b if and only if either Where is any arbitrary relation that totally orders the processes to break ties 11/29/2018 COP5611

6 A Limitation of Lamport’s Clocks - review
11/29/2018 COP5611

7 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]) 11/29/2018 COP5611

8 Vector Clocks – cont. 11/29/2018 COP5611

9 Vector Clocks – cont. 11/29/2018 COP5611

10 Vector Clocks – cont. Assertion
At any instant, Events a and b are casually related if ta < tb or tb < ta. Otherwise, these events are concurrent In a system of vector clocks, 11/29/2018 COP5611

11 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 11/29/2018 COP5611

12 Causal Ordering of Messages – cont.
11/29/2018 COP5611

13 Causal Ordering of Messages – cont.
The basic idea It is very simple Deliver a message only when no causality constraints are violated Otherwise, the message is not delivered immediately but is buffered until all the preceding messages are delivered 11/29/2018 COP5611

14 Birman-Schiper-Stephenson Protocol
11/29/2018 COP5611

15 Schiper-Eggli-Sando Protocol
11/29/2018 COP5611

16 Schiper-Eggli-Sando Protocol – cont.
11/29/2018 COP5611

17 Schiper-Eggli-Sando Protocol – cont.
11/29/2018 COP5611

18 Regarding Lab 1 For this project, you can work as a team with at most two members per team Each team only needs to turn in one report However, all the members are required to understand all the parts as you may be tested on the midterm or the final exam Three processes Bank Account Server Bank Office Clients Bank Office Mutual Exclusion Processes 11/29/2018 COP5611


Download ppt "Outline Theoretical Foundations - continued Vector clocks - review"

Similar presentations


Ads by Google