1 / 19

M ultiprocess Synchronization Algorithms (20225241)

M ultiprocess Synchronization Algorithms (20225241). Global Computation. Lecturer: Danny Hendler. Model. P 1 : 17. P 3 : 46. P 0 : 4. P 2 : -6. Processes are represented by graph nodes, each node stores an input value Bi-directional communication links Asynchronous

troy-hays
Download Presentation

M ultiprocess Synchronization Algorithms (20225241)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Model P1:17 P3:46 P0:4 P2:-6 • 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.

  3. Global computation P1:17 P3:46 P0:4 P2:-6 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,v1, …, vn, such that the following holds: i {1,…. n}  ui: F(v1,…, vi,…vn) ≠ F(v1,…, ui,…vn) To compute a global sensitive function, we need to see ALL inputs.

  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,v1, …, vn, such that the following holds: i {1,…. n}  ui: F(v1,…, vi,…vn) ≠ F(v1,…, ui,…vn) Max, sum, xor, … Examples:

  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. 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. Global Computation in a ring Computation starts here p0 e1 e2 e3 en-1 p1 p2 p3 p4 Pn-1 Pn 7

  8. BP1 Global Computation in a ring (cont'd) Computation starts here p0 e3n/4 en/4 e1 en-1 p3n/4 p3n/4+1 pn/4+1 pn/4 p1 p2 Pn-1 Pn UV1 8

  9. Bpi+1={el, em} Bpi+1={em, er} el em em er Execution Evolution BPi={el, er} el em er UVi 9

  10. BPi Proof of Lemma 3 p0 er el em e1 en-1 pr pr+1 pl+1 pl p1 p2 Pn-1 Pn Execution El involves these processes only Execution Er involves these processes only 10 10

  11. BPi Proof of Lemma 3 (cont'd) p0 er el em e1 en-1 pr pr+1 pl+1 pl p1 p2 Pn-1 Pn Execution ElEr results when we connect both el and er and block em By failing em we prove the algorithm incorrect. 11 11

  12. Generalizing to networks other than rings Theorem For every n, mO(n2), 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. The graph G(n,m) p0 k=√m tl1 tl2 tl3 tlk tr1 tr2 tr3 trk CutR CutL bl1 bl2 bl3 blk br1 br2 br3 brk e1 e2 e3 en-1 p1 p2 p3 p4 Pn-1 Pn Path

  14. BP1 UV0 Phase 0 p0 k=√m tl1 tl2 tl3 tlk tr1 tr2 tr3 trk CutR CutL bl1 bl2 bl3 blk br1 br2 br3 brk e3n/4 en/4 e1 en-1 p3n/4 p3n/4+1 pn/4+1 pn/4 p1 p2 Pn-1 Pn

  15. BP1 UV0 Messages delay rule p0 Disable communication between p0 and path until either CUTL or CUTRis saturated k=√m tl1 tl2 tl3 tlk tr1 tr2 tr3 trk CutR CutL bl1 bl2 bl3 blk br1 br2 br3 brk e3n/4 en/4 e1 en-1 p3n/4 p3n/4+1 pn/4+1 pn/4 p1 p2 Pn-1 Pn

  16. BP1 UV0 Messages delay rule (cont’d) p0 Disable communication between p0 and path until either CUTL or CUTRis saturated k=√m tl1 tl2 tl3 tlk tr1 tr2 tr3 trk CutR CutL bl1 bl2 bl3 blk br1 br2 br3 brk e3n/4 en/4 e1 en-1 p3n/4 p3n/4+1 pn/4+1 pn/4 p1 p2 Pn-1 Pn

  17. BP1 UV0 Messages delay rule (cont’d) p0 Then unblock all edges except for BPi k=√m tl1 tl2 tl3 tlk tr1 tr2 tr3 trk CutR CutL bl1 bl2 bl3 blk br1 br2 br3 brk e3n/4 en/4 e1 en-1 p3n/4 p3n/4+1 pn/4+1 pn/4 p1 p2 Pn-1 Pn

  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 Ω(n2). 18

  19. Key Argument of Lemma 7: Since n is unknown, can’t distinguish between these p0 el e1 er en-1 pr pr+1 pl+1 pl p1 p2 Pn-1 Pn er el e1 en-1 pr pr+1 pl+1 pl p1 p2 Pn-1 Pn er el e1 en-1 pr pr+1 pl+1 pl p1 p2 Pn-1 Pn er er el el e1 e1 en-1 en-1 pr pr pr+1 pr+1 pl+1 pl+1 pl pl p1 p1 p2 p2 Pn-1 Pn Pn-1 Pn 19 19 19

More Related