Download presentation

Presentation is loading. Please wait.

Published byLuis Oliff Modified over 2 years ago

1
1 Distributed systems Causal Broadcast Prof R. Guerraoui Distributed Programming Laboratory

2
2 Overview Intuitions: why causal broadcast? Specifications of causal broadcast Algorithms: A non-blocking algorithm using the past and A blocking algorithm using vector clocks

3
3 Broadcast B A C m m deliver broadcast deliver

4
4 Intuitions (1) So far, we did not consider ordering among messages; In particular, we considered messages to be independent Two messages from the same process might not be delivered in the order they were broadcast A message m1 that causes a message m2 might be delivered by some process after m2

5
5 Intuitions (2) Consider a system of news where every new event that is displayed in the screen contains a reference to the event that caused it, e.g., a comment on some information includes a reference to the actual information Even uniform reliable broadcast does not guarantee such a dependency of delivery Causal broadcast alleviates the need for the application to deal with such dependencies

6
6 Modules of a process request indication request

7
7 Overview Intuitions: why causal broadcast? Specifications of causal broadcast Algorithms: A non-blocking algorithm using the past and A blocking algorithm using vector clocks

8
8 Causal broadcast Events Request: Indication: Property: Causal Order (CO)

9
9 Causality Let m1 and m2 be any two messages: m1 -> m2 (m1 causally precedes m2) iff C1 (FIFO order). Some process pi broadcasts m1 before broadcasting m2 C2 (Local order). Some process pi delivers m1 and then broadcasts m2 C3 (Transitivity). There is a message m3 such that m1 -> m3 and m3 - > m2

10
10 Causal broadcast Events Request: Indication: Property: CO: If any process pi delivers a message m2, then pi must have delivered every message m1 such that m1 -> m2

11
11 Causality ? p1 p2 p3 m2 delivery m1 delivery m2 delivery

12
12 Causality ? p1 p2 p3 m2 delivery m1 delivery m2 delivery

13
13 Causality ? p1 p2 p3 m2 delivery m1 delivery m2

14
14 Reliable causal broadcast (rcb) Events Request: Indication: Properties: RB1, RB2, RB3, RB4 + CO

15
15 Uniform causal broadcast (ucb) Events Request: Indication: Properties: URB1, URB2, URB3, URB4 + CO

16
16 Overview Intuitions: why causal broadcast? Specifications of causal broadcast Algorithms: A non-blocking algorithm using the past and A blocking algorithm using vector clocks

17
17 Algorithms We present reliable causal broadcast algorithms using reliable broadcast We obtain uniform causal broadcast algorithms by using instead an underlying uniform reliable broadcast

18
18 Algorithm 1 Implements: ReliableCausalOrderBroadcast (rco). Uses: ReliableBroadcast (rb). upon event do delivered := past := empty; upon event do trigger ; past := past U {[self,m]};

19
19 Algorithm 1 (cont’d) upon event do if m not in delivered then (*) forall [sn, n] in past m do if n not in delivered then trigger ; delivered := delivered U {n}; past := past U {[sn, n]};

20
20 Algorithm 1 (cont’d) (*) … trigger ; delivered := delivered U {m}; past := past U {[pi,m]};

21
21 Algorithm 1 p1 p2 p3 m2(m1) m2 m1 m2(m1) m2 m1

22
22 Algorithm 1 p1 p2 p3 m1 m2(m1) m2 m1 m2 m1

23
23 Uniformity Algorithm 1 ensures causal reliable broadcast If we replace reliable broadcast with uniform reliable broadcast, Algorithm 1 would ensure uniform causal broadcast

24
24 Algorithm 1’ (gc) Implements: GarbageCollection (+ Algo 1). Uses: ReliableBroadcast (rb). PerfectFailureDetector(P). upon event do delivered := past := empty; correct := S; ack m := (for all m);

25
25 Algorithm 1’ (gc – cont’d) upon event do correct := correct \ {pi} upon for some m delivered: self ack m do ack m := ack m U {self}; trigger ;

26
26 Algorithm 1’ (gc – cont’d) upon event do ack m := ack m U {pi}; if forall pj correct: pj ack m do past := past \ {[sm, m]};

27
27 Algorithm 2 Implements: ReliableCausalOrderBroadcast (rco). Uses: ReliableBroadcast (rb). upon event do for all pi S: VC[pi] := 0; upon event do VC[self] := VC[self] + 1. trigger ;

28
28 Algorithm 2 upon event do wait until ( (VC[pj] VCm[pj] – 1) and (for all pk ≠ pj: VC[pk] VCm[pk])); trigger ; if pj ≠ self then VC[pj] := VC[pj] + 1.

29
29 Algorithm 2 p1 p2 p3 m2 m1 m2 m1 [2,0,0] [1,0,0] m2 [2,0,0]

30
30 Algorithm 2 p1 p2 p3 m2 m1 m2 [1,0,0] [1,1,0] [1,0,0] m2 m1 m2

Similar presentations

OK

Dr. Kalpakis CMSC 621, Advanced Operating Systems. Logical Clocks and Global State.

Dr. Kalpakis CMSC 621, Advanced Operating Systems. Logical Clocks and Global State.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on high sea sales meaning Ppt on indian postal service Ppt on forward and future contracts Ppt on nursing leadership and management Ppt on american vs british accent Download ppt on the rime of ancient mariner part 1 Appt online Ppt on bluetooth communication system Ppt on object oriented concepts Ppt on switching network