soyez efficace rembobinez be efficient rewind
play

Soyez Efficace, Rembobinez Be efficient, Rewind Stphane Devismes - PDF document

09/04/2019 Distributed Algorithm Soyez Efficace, Rembobinez Be efficient, Rewind Stphane Devismes (Verimag, UGA) Stephane.Devismes@univ-grenoble-alpes.fr Initial Configuration Colette Johnen (LaBRI, Univ. Bordeaux) johnen@labri.fr Goal of


  1. 09/04/2019 Distributed Algorithm Soyez Efficace, Rembobinez Be efficient, Rewind Stéphane Devismes (Verimag, UGA) Stephane.Devismes@univ-grenoble-alpes.fr Initial Configuration Colette Johnen (LaBRI, Univ. Bordeaux) johnen@labri.fr Goal of the algorithm Distributed Algorithm 1 2 Unison : clocks synchronization Unison : clocks synchronization  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K} Each process u has a clock : c(u)  c(u) := (c(u)+1) %K • the difference of clock values between neighbors is at most 1 (safety) • Each process increments its clock infinitely often 0 0 0 0 0 (liveness) 0 0 Distributed algorithm using a bounded clock – 0 0 0 0 0 a bound on network size is known (K)  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K The initial configuration is a safe configuration The initial configuration is a safe configuration K > size of networks K > size of networks 3 4 Unison : clocks synchronization Unison : clocks synchronization  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K  c(u) := (c(u)+1) %K 1 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 The initial configuration is a safe configuration The initial configuration is a safe configuration K > size of networks K > size of networks 5 6 1

  2. 09/04/2019 Unison : clocks synchronization Unison : clocks synchronization  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K  c(u) := (c(u)+1) %K 1 2 1 1 2 2 2 1 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 The initial configuration is a safe configuration The initial configuration is a safe configuration K > size of networks K > size of networks 7 8 Unison : clocks synchronization Unison : clocks synchronization  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K  c(u) := (c(u)+1) %K 2 2 3 2 2 2 3 2 3 3 1 2 1 2 1 0 0 0 1 1 1 0 1 1 The initial configuration is a safe configuration The initial configuration is a safe configuration K > size of networks K > size of networks 9 10 Unison : clocks synchronization Unison : clocks synchronization  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K  c(u) := (c(u)+1) %K 4 3 3 4 4 3 3 3 3 4 2 3 2 3 2 1 0 1 2 2 1 0 1 2 The initial configuration is a safe configuration The initial configuration is a safe configuration K > size of networks K > size of networks 11 12 2

  3. 09/04/2019 Unison : clocks synchronization Unison : clocks synchronization  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K  c(u) := (c(u)+1) %K 4 5 4 4 5 5 5 4 4 4 3 3 3 3 0 1 2 0 1 2 2 1 2 1 The initial configuration is a safe configuration The initial configuration is a safe configuration K > size of networks K > size of networks 13 14 Self-stabilizing algorithm Unison : clocks synchronization  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K} Chaos  c(u) := (c(u)+1) %K Self-stabilizing algorithm 5 4 4 5 6 3 3 2 1 0 1 2 Goal of the algorithm The initial configuration is a safe configuration K > size of networks 15 16 To rewind (To reset) To reuse Unison : clocks synchronization  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K} Chaos  c(u) := (c(u)+1) %K to reach an correct configuration 8 7 6 10 9 Correct Configuration 5 11 0 1 2 3 4 Goal of the algorithm DEADLOCK : the configuration is not a safe configuration Distributed Algorithm Unison algorithm is not self-stabilizing K > 12 17 18 3

  4. 09/04/2019 To rewind (To reset) To reuse Self-stabilizing reseting algorithm Chaos to reach a correct configuration Arora, Gouda: Distributed reset. IEEE Trans. Computer. 1994 • identified network • mono initiator Goal of the algorithm Distributed • weakly fair scheduler Algorithm SDR algorithm - Self-stabilizing Distributed Reset algorithm • Awerbuch, Patt-Shamir, Varghese: self-stabilization by local • anonymous network, checking and global reset (extended abstract). FOCS ’91 • no network knowledge • multi initiators • Awerbuch, Patt-Shamir, Varghese, Dolev : self-stabilization • unfair scheduler by local checking and global reset (extended abstract). • linear number of process moves WDAG’94 • Unbounded timestamps 19 20 Chaos  Correct behavior Self stabilizing reseting Total mess I : distributed algorithm solving a task (static or dynamic) from a correct configuration Chaos Correct Configuration Chaos SDR o I reseting 21 COA DESCARTES/ESTATE - 2019 22 Correct configuration of I Local reseting in I I : distributed algorithm solving a task (static or dynamic) I : distributed algorithm solving a task (static or dynamic) from a correct configuration from a correct configuration Correct configuration of I Local reseting in I P_ICorrect(u) : predicate on u and u’s neighbor variables reset(u) : macro reseting the value of u’ variables P_ICorrect(u) is closed along I P_reset(u) : predicate on u’s variable : it is true iff u’s variable are reseted  u we have (P_ICorrect(u) == true)  the configuration is correct ( ≠ legitimate) If u and all u’s neighbors verify P_reset then P_ICorrect(u) == true Pr(u) is closed along I iff Pr(u) stays verified along any execution of I 23 24 4

  5. 09/04/2019 Unison – resetable ? SDR – Overall presentation  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K} • A process u starts the reseting because  c(u) := (c(u)+1) %K P_ICorrect(u) != true • The reseting is propagated (a DAG rooted at u is P_ICorrect(u) is the safety predicate built)  v in the neighborhood of u, we have c(v)  {c(u)-1%K, c(u), c(u)+1%K} • The DAG is frozen from the leaves to the initiator of reset(u) : c(u) := 0 the reseting (u) P_reset(u) : c(u) == 0 If u and all u’s neighbors verify c==0 then • Processes go back to the Initial algorithm/task from P_ICorrect(u)==true the initiator (u) to the leaves of the DAG K > size of networks 25 26 SDR – variables on u SDR – variables on u • To store the DAG structure : • To store the DAG structure : – d(u) : distance to an initiator of the reseting – d(u) : distance to an initiator of the reseting 27 0 18 27 28 SDR – variables on u SDR – variables on u • To store the DAG structure : • To store the DAG structure : – d(u) : distance to an initiator of the reseting – d(u) : distance to an initiator of the reseting • The status of the reseting : st(u) : RB, RF, or C • The status of the reseting : st(u) : RB, RF, or C – a reseting is in progress – a reseting is in progress • RB : propagation of the reseting • RB : propagation phase • RF : propagation of the ending of broadcast • RF : freezing phase phase – no reseting is in progress : C – no reseting is in progress : C 29 30 5

  6. 09/04/2019 SDR – Self-stabilizing Distributed Reset SDR – Self-stabilizing Distributed Reset R_R : a process u starts the reseting because R_B : the reseting is propagated (a DAG is built) P_ICorrect(u) != true or … R_B : If (st (u)==C) and a’ u neighbor v verified ( st(v)==RB)  R_R: If (st(u)==C) and  P_ICorrect(u)  reset(u); st(u) := RB; d(u) := d(v)+1; reset(u); st(u) := RB; d(u) := 0; A process cannot join two times the same DAG structure A process performs at most one time R_R rule a process can be the root of a single DAG At most n DAG structure is built during any execution A process performs at most n-1 times the rule R_B ( n being the network size) ( n being the network size) 31 32 SDR – Self-stabilizing Distributed Reset SDR – Self-stabilizing Distributed Reset R_C : Processes goes back to the Initial algorithm/task R_F: the DAG is frozen from the leaves to the initiator of the reseting R_C: If (st(u)==RF), u is a root of the DAG and R_F: If (st(u)==RB) and the reseting is over in the u-DAG  the reseting propagation is over in the DAG rooted at u st(u) := C;  reset(u); st(u) := RF; A process takes the status RB at most n times A process takes the status RF at most n times A process performs at most n+1 times the rule R_F A process performs at most n times the rule R_C ( n being the network size) ( n being the network size) 33 34 Unison : clocks synchronization Unison : clocks synchronization  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K  c(u) := (c(u)+1) %K 8 7 6 8 7 6 10 9 10 9 5 5 11 0 0 0 1 2 3 4 0 1 2 3 4 0 st= RB st= RF st= RB st= RF st= c st= c K > 12 K > 12 d d d d An Unsafe Configuration Reseting Propagation phase 35 36 6

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