avoiding coordination announcements o ffi ce hours
play

Avoiding Coordination Announcements O ffi ce Hours No office hours - PowerPoint PPT Presentation

Avoiding Coordination Announcements O ffi ce Hours No office hours on 11/15: I am not here. O ffi ce Hours No office hours on 11/15: I am not here. No office hours on 11/22: Everyone should be out having and . O ffi ce Hours


  1. Djikstra's Example x 0 =1 0 x 1 =2 1 4 x 4 =0 • Assuming a fair execution. 3 2 x 2 =3 x 3 =4 • Lemma 1 : At least every n rounds x 0 changes its value. At process 0 do { • Lemma 2 : There is some value c in 0..(n+1) s.t. x i ≠ c ∀ i if (x 4 == x 0 ) { x 0 = (x 0 + 1) % 5; } • Theorem : Get to all x i s being equal in O(n 2 ) rounds. } while (true); At process n do { • Why? if (x n != x n-1 ) { x n = x n-1 ; } } while (true);

  2. Other Self Stabilizing Algorithms?

  3. Finding a Minimal Spanning Tree

  4. Finding a Minimal Spanning Tree

  5. Finding a Minimal Spanning Tree

  6. Thoughts on how?

  7. Finding a Minimal Spanning Tree At root do { for n in nbr { send(n, <d=0, parent=false>) } } d=0 } while (true); At process n do { n[i], parent = recv(nbr i) d = min(n) parent = find(i s.t. n[i] = d-1) send(parent, <d=d, parent=true>) for n in nbr { if n!= parent { send(n, <d = d, parent=false>) } } } while (true);

  8. Finding a Minimal Spanning Tree d=8 d=0 Why does this work? d=100 d=22

  9. Finding a Minimal Spanning Tree d=1 d=8 d=0 Why does this work? d=100 d=22 d=1 d=23

  10. Finding a Minimal Spanning Tree d=1 d=8 d=0 Why does this work? d=100 d=22 d=1 d=2 d=23

  11. Finding a Minimal Spanning Tree d=1 d=2 d=0 Why does this work? d=100 d=22 d=1 d=2 d=23

  12. Finding a Minimal Spanning Tree d=1 d=2 d=0 Why does this work? d=100 d=2 d=1 d=2 d=23

  13. Finding a Minimal Spanning Tree d=1 d=2 d=0 Why does this work? d=3 d=2 d=1 d=2 d=23

  14. Maximal Matching

  15. Maximal Matching

  16. Maximal Matching

  17. How?

  18. partner = null do { broadcast(id, partner) collect partners for id if partner = null and exists j s.t. partners[j]=id { partner = j } if partner = null and exists j s.t. partners[j] = null { partner = j } if partner = j and partners[j] != id { partner = null } } while (true);

  19. Why?

  20. CRDTs

  21. Revisiting RSMs Application Application Application Application Ordering Ordering Ordering Ordering

  22. Revisiting RSMs Application Application Application Application Ordering Ordering Ordering Ordering Client Client Client Client

  23. Revisiting RSMs Application Application Application Application Ordering Ordering Ordering Ordering Client Client Client Client

  24. Revisiting RSMs Application Application Application Application Ordering Ordering Ordering Ordering Client Client Client Client

  25. What if we didn't care about ordering Application Application Application Application Gossip Gossip Gossip Gossip

  26. What if we didn't care about ordering Application Application Application Application Gossip Gossip Gossip Gossip Client Client Client Client

  27. What if we didn't care about ordering Application Application Application Application Gossip Gossip Gossip Gossip Client Client Client Client

  28. What if we didn't care about ordering Application Application Application Application Gossip Gossip Gossip Gossip Client Client Client Client

  29. Challenge: Ensuring correctness despite reordering

  30. Challenge A X Y Z Peer 3 Peer 0 Peer 1 Peer 2

  31. Challenge merge(X, A) merge(Z, X) merge(X, Y) merge(Y, Z) A X Y Z Peer 3 Peer 0 Peer 1 Peer 2

  32. Challenge m(Y,m(X, A)) m(Y,m(Z, X)) m(A,m(X, Y)) m(X,m(Y, Z)) merge(X, A) merge(Z, X) merge(X, Y) merge(Y, Z) A X Y Z Peer 3 Peer 0 Peer 1 Peer 2

  33. Challenge m(A, m(Z, m(A, m(Z, m(Y,m(Z, X))) m(A,m(X, Y))) m(X,m(Y, Z))) m(Y, m(X, A))) m(Y,m(X, A)) m(Y,m(Z, X)) m(A,m(X, Y)) m(X,m(Y, Z)) merge(X, A) merge(Z, X) merge(X, Y) merge(Y, Z) A X Y Z Peer 3 Peer 0 Peer 1 Peer 2

  34. Challenge m(A, m(Z, m(A, m(Z, m(Y,m(Z, X))) m(A,m(X, Y))) m(X,m(Y, Z))) m(Y, m(X, A))) m(Y,m(X, A)) m(Y,m(Z, X)) m(A,m(X, Y)) m(X,m(Y, Z)) merge(X, A) Need all of these to be equal. merge(Z, X) merge(X, Y) merge(Y, Z) A X Y Z Peer 3 Peer 0 Peer 1 Peer 2

  35. Modelling a Merge Function

  36. Modelling a Merge Function • Treat updates as a set.

  37. Modelling a Merge Function • Treat updates as a set. • For previous example {A, X, Y, Z}

  38. Modelling a Merge Function • Treat updates as a set. • For previous example {A, X, Y, Z} • Define merge function to be the least upper bound (similar to supremum).

  39. Modelling a Merge Function • Treat updates as a set. • For previous example {A, X, Y, Z} • Define merge function to be the least upper bound (similar to supremum). • Commutative, associative and idempotent.

  40. Modelling a Merge Function • Treat updates as a set. • For previous example {A, X, Y, Z} • Define merge function to be the least upper bound (similar to supremum). • Commutative, associative and idempotent. • Thus LUB(A, LUB(X, LUB(Y, Z)))) = LUB(X, LUB(A, LUB(Y, Z)))) = ...

  41. Modelling a Merge Function • Treat updates as a set. • For previous example {A, X, Y, Z} • Define merge function to be the least upper bound (similar to supremum). • Commutative, associative and idempotent. • Thus LUB(A, LUB(X, LUB(Y, Z)))) = LUB(X, LUB(A, LUB(Y, Z)))) = ... • In abstract algebra posets with LUBs are called semilattices.

  42. Is this enough?

  43. Modelling a Merge Function

  44. Modelling a Merge Function • Sufficient for consistency.

  45. Modelling a Merge Function • Sufficient for consistency. • Not sufficient to make sure all semantics are preserved.

  46. Modelling a Merge Function • Sufficient for consistency. • Not sufficient to make sure all semantics are preserved. • In particular picking the least upper bound might loose operations.

  47. Counters x = [0, 0, 0] x = [0, 0, 0] x = [0, 0, 0] Peer 0 Peer 1 Peer 3 Is element wise max a LUB?

  48. Counters x = [0, 0, 0] x = [0, 0, 0] x = [0, 0, 0] + Peer 0 Peer 1 Peer 3 Is element wise max a LUB?

  49. Counters x = [0, 0, 0] x = [1, 0, 0] x = [0, 0, 0] + Peer 0 Peer 1 Peer 3 Is element wise max a LUB?

  50. Counters x = [0, 0, 0] x = [1, 0, 0] x = [0, 0, 0] + - Peer 0 Peer 1 Peer 3 Is element wise max a LUB?

  51. Counters x = [0, 0, 0] x = [1, 0, 0] x = [0, 0, -1] + - Peer 0 Peer 1 Peer 3 Is element wise max a LUB?

  52. Counters x = [0, 0, 0] x = [1, 0, 0] x = [0, 0, -1] + - Peer 0 Peer 1 Peer 3 Suppose we use element wise max as LUB. Is element wise max a LUB?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend