Presentation is loading. Please wait.

Presentation is loading. Please wait.

Multiprocess Synchronization Algorithms (20225241) Lecturer: Danny Hendler Global Computation.

Similar presentations


Presentation on theme: "Multiprocess Synchronization Algorithms (20225241) Lecturer: Danny Hendler Global Computation."— Presentation transcript:

1 Multiprocess Synchronization Algorithms (20225241) Lecturer: Danny Hendler Global Computation

2 2 Model P0: 4P0: 4 Processes are represented by graph nodes, each node stores an input value Bi-directional communication links Asynchronous Links may fail-stop but connectivity is assured (safe network) Failures cannot be detected. We let n, m respectively denote the number of nodes and links. P 1 : 17 P 2 : -6 P 3 : 46

3 3 Global computation We need to compute a global sensitive function of process inputs P0: 4P0: 4 P 1 : 17 P 2 : -6 P 3 : 46 Definition An n-variate function F is global sensitive, if there is an n-tuple, v 1, …, v n, such that the following holds:  i  {1,…. n}  u i : F(v 1,…, v i,…v n ) ≠ F(v 1,…, u i,…v n ) To compute a global sensitive function, we need to see ALL inputs.

4 4 Global computation We need to compute a global sensitive function of process inputs Definition An n-variate function F is global sensitive, if there is an n-tuple, v 1, …, v n, such that the following holds:  i  {1,…. n}  u i : F(v 1,…, v i,…v n ) ≠ F(v 1,…, u i,…v n ) Examples: Max, sum, xor, …

5 5 Global computation algorithm Every process broadcasts its input to all other processes. Worst-case message complexity: Ω(mn) Can we do better (in all networks)?

6 6 A lower bound for a ring Theorem The worst-case message complexity of any non-uniform global computation algorithm on a safe ring is Ω(n log n).

7 77 Global Computation in a ring p1p1 p2p2 p3p3 p4p4 P n-1 PnPn p0p0 e1e1 e2e2 e3e3 e n-1 Computation starts here

8 88 Global Computation in a ring (cont'd) p0p0 Computation starts here p1p1 p2p2 P n-1 PnPn e1e1 e n-1 p n/4 p n/4+1 p 3n/4 p 3n/4+1 e n/4 e 3n/4 BP 1 UV 1

9 99 elel emem erer BP i ={e l, e r } UV i elel emem Bp i+1 ={e l, e m } emem erer Bp i+1 ={e m, e r } Execution Evolution

10 10 Proof of Lemma 3 p0p0 p1p1 p2p2 P n-1 PnPn e1e1 e n-1 plpl p l+1 prpr p r+1 elel erer BP i emem Execution E r involves these processes only Execution E l involves these processes only

11 11 Proof of Lemma 3 (cont'd) p0p0 p1p1 p2p2 P n-1 PnPn e1e1 e n-1 plpl p l+1 prpr p r+1 elel erer BP i emem Execution E l E r results when we connect both e l and e r and block e m By failing e m we prove the algorithm incorrect.

12 12 Generalizing to networks other than rings Theorem For every n, m  O(n 2 ), there exists a safe network with θ(n) nodes and θ(m) links, on which the worst-case message complexity of any global computation is Ω(m log n).

13 13 The graph G(n,m) p1p1 p2p2 p3p3 p4p4 P n-1 PnPn p0p0 bl 1 bl 2 bl 3 bl k tl 1 tl 2 tl 3 tl k br 1 br 2 br 3 br k tr 1 tr 2 tr 3 tr k k= √ m Cut L Cut R Path e1e1 e2e2 e3e3 e n-1

14 14 Phase 0 p1p1 p2p2 P n-1 PnPn p0p0 bl 1 bl 2 bl 3 bl k tl 1 tl 2 tl 3 tl k br 1 br 2 br 3 br k tr 1 tr 2 tr 3 tr k k= √ m Cut L Cut R e1e1 e n-1 p n/4 p n/4+1 p 3n/4 p 3n/4+1 e n/4 e 3n/4 BP 1 UV 0

15 15 Messages delay rule p1p1 p2p2 P n-1 PnPn p0p0 bl 1 bl 2 bl 3 bl k tl 1 tl 2 tl 3 tl k br 1 br 2 br 3 br k tr 1 tr 2 tr 3 tr k k= √ m Cut L Cut R e1e1 e n-1 p n/4 p n/4+1 p 3n/4 p 3n/4+1 e n/4 e 3n/4 BP 1 UV 0 Disable communication between p 0 and path until either CUT L or CUT R is saturated

16 16 Messages delay rule (cont’d) p1p1 p2p2 P n-1 PnPn p0p0 bl 1 bl 2 bl 3 bl k tl 1 tl 2 tl 3 tl k br 1 br 2 br 3 br k tr 1 tr 2 tr 3 tr k k= √ m Cut L Cut R e1e1 e n-1 p n/4 p n/4+1 p 3n/4 p 3n/4+1 e n/4 e 3n/4 BP 1 UV 0 Disable communication between p 0 and path until either CUT L or CUT R is saturated

17 17 Messages delay rule (cont’d) p1p1 p2p2 P n-1 PnPn p0p0 bl 1 bl 2 bl 3 bl k tl 1 tl 2 tl 3 tl k br 1 br 2 br 3 br k tr 1 tr 2 tr 3 tr k k= √ m Cut L Cut R e1e1 e n-1 p n/4 p n/4+1 p 3n/4 p 3n/4+1 e n/4 e 3n/4 BP 1 UV 0 Then unblock all edges except for BPi

18 18 A lower bound for uniform global computation on a ring Theorem The worst-case message complexity of any uniform global computation algorithm on a safe ring is Ω(n 2 ).

19 19 Key Argument of Lemma 7: Since n is unknown, can’t distinguish between these p0p0 p1p1 p2p2 P n-1 PnPn e1e1 e n-1 plpl p l+1 prpr p r+1 elel erer p1p1 p2p2 P n-1 PnPn e1e1 e n-1 plpl p l+1 prpr p r+1 elel erer p1p1 p2p2 P n-1 PnPn e1e1 e n-1 plpl p l+1 prpr p r+1 elel erer p1p1 p2p2 P n-1 PnPn e1e1 e n-1 plpl p l+1 prpr p r+1 elel erer p1p1 p2p2 P n-1 PnPn e1e1 e n-1 plpl p l+1 prpr p r+1 elel erer


Download ppt "Multiprocess Synchronization Algorithms (20225241) Lecturer: Danny Hendler Global Computation."

Similar presentations


Ads by Google