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

soyez efficace rembobinez be efficient rewind
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

09/04/2019 1

Soyez Efficace, Rembobinez Be efficient, Rewind

Stéphane Devismes (Verimag, UGA) Stephane.Devismes@univ-grenoble-alpes.fr Colette Johnen (LaBRI, Univ. Bordeaux) johnen@labri.fr

1

Distributed Algorithm

2

Initial Configuration Distributed Algorithm Goal of the algorithm

3

Each process u has a clock : c(u)

  • the difference of clock values between neighbors is

at most 1 (safety)

  • Each process increments its clock infinitely often

(liveness) Distributed algorithm using a bounded clock – a bound on network size is known (K)

K > size of networks

Unison : clocks synchronization

The initial configuration is a safe configuration

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

Unison : clocks synchronization

4

K > size of networks The initial configuration is a safe configuration

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

Unison : clocks synchronization

5

1

K > size of networks The initial configuration is a safe configuration

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

Unison : clocks synchronization

6

1 1 1

K > size of networks The initial configuration is a safe configuration

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

slide-2
SLIDE 2

09/04/2019 2 Unison : clocks synchronization

7

1 1 2 1 1

K > size of networks The initial configuration is a safe configuration

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

Unison : clocks synchronization

8

1 1 2 2 2 1 1

K > size of networks The initial configuration is a safe configuration

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

Unison : clocks synchronization

9

1 2 1 2 3 2 1 1 2

K > size of networks The initial configuration is a safe configuration

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

Unison : clocks synchronization

10

2 2 1 1 3 3 3 1 1 2 2

K > size of networks The initial configuration is a safe configuration

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

Unison : clocks synchronization

11

2 3 2 1 3 4 3 1 2 2 3

K > size of networks The initial configuration is a safe configuration

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

Unison : clocks synchronization

12

3 3 2 1 4 4 4 1 2 3 3

K > size of networks The initial configuration is a safe configuration

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

slide-3
SLIDE 3

09/04/2019 3 Unison : clocks synchronization

13

3 4 2 1 4 5 4 1 2 3 4

K > size of networks The initial configuration is a safe configuration

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

Unison : clocks synchronization

14

3 4 2 1 5 5 5 1 2 3 4

K > size of networks The initial configuration is a safe configuration

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

Unison : clocks synchronization

15

3 4 2 1 5 6 5 1 2 3 4

K > size of networks The initial configuration is a safe configuration

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

Self-stabilizing algorithm

16

Self-stabilizing algorithm

Chaos Goal of the algorithm

Unison : clocks synchronization

17

11 10 1 9 8 7 2 3 4 5 6

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

K > 12 DEADLOCK : the configuration is not a safe configuration

Unison algorithm is not self-stabilizing

To rewind (To reset) To reuse

18

Correct Configuration Distributed Algorithm Goal of the algorithm Chaos to reach an correct configuration

slide-4
SLIDE 4

09/04/2019 4 To rewind (To reset) To reuse

19

Distributed Algorithm Goal of the algorithm Chaos to reach a correct configuration

  • Awerbuch, Patt-Shamir, Varghese: self-stabilization by local

checking and global reset (extended abstract). FOCS ’91

  • Awerbuch, Patt-Shamir, Varghese, Dolev : self-stabilization

by local checking and global reset (extended abstract). WDAG’94

Self-stabilizing reseting algorithm

SDR algorithm - Self-stabilizing Distributed Reset algorithm

  • anonymous network,
  • no network knowledge
  • multi initiators
  • unfair scheduler
  • linear number of process moves
  • Unbounded timestamps

20

Arora, Gouda: Distributed reset. IEEE Trans. Computer. 1994

  • identified network
  • mono initiator
  • weakly fair scheduler

Self stabilizing reseting

21

Chaos Correct Configuration reseting

Total mess

Chaos  Correct behavior

COA DESCARTES/ESTATE - 2019 22

I : distributed algorithm solving a task (static or dynamic) from a correct configuration

SDR o I

Chaos

Correct configuration of I

23

I : distributed algorithm solving a task (static or dynamic) from a correct configuration Correct configuration of I P_ICorrect(u) : predicate on u and u’s neighbor variables P_ICorrect(u) is closed along I  u we have (P_ICorrect(u) == true)  the configuration is correct (≠ legitimate)

Pr(u) is closed along I iff Pr(u) stays verified along any execution of I

Local reseting in I

24

I : distributed algorithm solving a task (static or dynamic) from a correct configuration Local reseting in I reset(u) : macro reseting the value of u’ variables P_reset(u) : predicate on u’s variable : it is true iff u’s variable are reseted If u and all u’s neighbors verify P_reset then P_ICorrect(u) == true

slide-5
SLIDE 5

09/04/2019 5 Unison – resetable ?

25

P_ICorrect(u) is the safety predicate v in the neighborhood of u, we have c(v)  {c(u)-1%K, c(u), c(u)+1%K} reset(u) : c(u) := 0 P_reset(u) : c(u) == 0 If u and all u’s neighbors verify c==0 then P_ICorrect(u)==true

K > size of networks

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

  • A process u starts the reseting because

P_ICorrect(u) != true

26

SDR – Overall presentation

  • The reseting is propagated (a DAG rooted at u is

built)

  • The DAG is frozen from the leaves to the initiator of

the reseting (u)

  • Processes go back to the Initial algorithm/task from

the initiator (u) to the leaves of the DAG

SDR – variables on u

  • To store the DAG structure :

– d(u) : distance to an initiator of the reseting

27

SDR – variables on u

  • To store the DAG structure :

– d(u) : distance to an initiator of the reseting

28

18 27

SDR – variables on u

  • To store the DAG structure :

– d(u) : distance to an initiator of the reseting

  • The status of the reseting : st(u) : RB, RF, or C

– a reseting is in progress

  • RB : propagation of the reseting
  • RF : propagation of the ending of broadcast

phase – no reseting is in progress : C

29

SDR – variables on u

  • To store the DAG structure :

– d(u) : distance to an initiator of the reseting

  • The status of the reseting : st(u) : RB, RF, or C

– a reseting is in progress

  • RB : propagation phase
  • RF : freezing phase

– no reseting is in progress : C

30

slide-6
SLIDE 6

09/04/2019 6 SDR – Self-stabilizing Distributed Reset

R_R: If (st(u)==C) and P_ICorrect(u)  reset(u); st(u) := RB; d(u) := 0;

31

R_R : a process u starts the reseting because P_ICorrect(u) != true or … 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 (n being the network size)

SDR – Self-stabilizing Distributed Reset

R_B : If (st(u)==C) and a’ u neighbor v verified (st(v)==RB) reset(u); st(u) := RB; d(u) := d(v)+1;

32

R_B : the reseting is propagated (a DAG is built) A process cannot join two times the same DAG structure A process performs at most n-1 times the rule R_B (n being the network size)

SDR – Self-stabilizing Distributed Reset

R_F: If (st(u)==RB) and the reseting propagation is over in the DAG rooted at u  reset(u); st(u) := RF;

33

R_F: the DAG is frozen from the leaves to the initiator

  • f the reseting

A process takes the status RB at most n times A process performs at most n+1 times the rule R_F (n being the network size)

SDR – Self-stabilizing Distributed Reset

R_C: If (st(u)==RF), u is a root of the DAG and the reseting is over in the u-DAG  st(u) := C;

34

R_C : Processes goes back to the Initial algorithm/task A process takes the status RF at most n times A process performs at most n times the rule R_C (n being the network size)

Unison : clocks synchronization

35

11 10 1 9 8 7 2 3 4 5 6

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

d d K > 12

st= RB st= RF st= c

An Unsafe Configuration

Unison : clocks synchronization

36

10 1 9 8 7 2 3 4 5 6

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

K > 12

st= RB st= RF st= c

Reseting Propagation phase

d d

slide-7
SLIDE 7

09/04/2019 7 Unison : clocks synchronization

37

9 8 7 2 3 4 5 6

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

K > 12

st= RB st= RF st= c

Reseting Propagation phase

d d 1 1

Unison : clocks synchronization

38

8 7 3 4 5 6

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

K > 12

st= RB st= RF st= c

Reseting Propagation phase

d d 1 1 2 2

Unison : clocks synchronization

39

7 4 5 6

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

K > 12

st= RB st= RF st= c

Reseting Propagation phase

d d 1 1 2 2 3 3

Unison : clocks synchronization

40

5 6

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

K > 12

st= RB st= RF st= c

Reseting Propagation phase

d d 1 1 2 2 3 3 4 4

Unison : clocks synchronization

41

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

K > 12

st= RB st= RF st= c

End of Reseting Propagation phase

d d 1 1 2 2 3 3 4 4 5 5

Unison : clocks synchronization

42

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

K > 12

st= RB st= RF st= c

Freezing phase

d d 1 1 2 2 3 3 4 4 5 5

slide-8
SLIDE 8

09/04/2019 8 Unison : clocks synchronization

43

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

K > 12

st= RB st= RF st= c

Freezing phase

d d 1 1 2 2 3 3 4 4 5 5

Unison : clocks synchronization

44

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

K > 12

st= RB st= RF st= c

Freezing phase

d d 1 1 2 2 3 3 4 4 5 5

Unison : clocks synchronization

45

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

K > 12

st= RB st= RF st= c

Freezing phase

d d 1 1 2 2 3 3 4 4 5 5

Unison : clocks synchronization

46

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

K > 12

st= RB st= RF st= c

Freezing phase

d d 1 1 2 2 3 3 4 4 5 5

Unison : clocks synchronization

47

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

K > 12

st= RB st= RF st= c

End of Freezing phase

d d 1 1 2 2 3 3 4 4 5 5

Unison : clocks synchronization

48

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

K > 12

st= RB st= RF st= c

Back to the Initial Algorithm

d d 1 1 2 2 3 3 4 4 5 5

slide-9
SLIDE 9

09/04/2019 9 Unison : clocks synchronization

49

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

K > 12

st= RB st= RF st= c

Back to the Initial Algorithm

d d 2 2 3 3 4 4 5 5

Unison : clocks synchronization

50

1 1

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

K > 12

st= RB st= RF st= c

Back to the Initial Algorithm

d d 3 3 4 4 5 5

Unison : clocks synchronization

51

1 1 1

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

1

K > 12

st= RB st= RF st= c

Back to the Initial Algorithm

d d 4 4 5 5

Unison : clocks synchronization

52

2 2 1 1 1

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

1

K > 12

st= RB st= RF st= c

Back to the Initial Algorithm

d d 5 5

Unison : clocks synchronization

53

2 2 2 1 1 1 1

v in the neighborhood of u, we have c(v)  {c(u), c(u)+1%K}  c(u) := (c(u)+1) %K

2

K > 12

st= RB st= RF st= c

A Safe Configuration

d d

Step/Round - illustration

54

1ist round - 3 steps 2rd round – 2 steps

unabled enabled triggered

slide-10
SLIDE 10

09/04/2019 10

algorithm memory stops rounds [1] O(n2)

  • O(Dn)

[Boulinier PhD] [2] O(n) O(Dn3) [3] O(n) SDR o I unbounded O(Dn2) 3n

Self-stabilizing Unison

55

[1] Couvreur, Francez, Gouda: Asynchonous unison (extended abstract), ICDCS‘92 [2] Boulinier, Petit, Villain: When graph theory helps self-stabilization, PODC‘04 [3] Devismes, Petit: On efficiency of Unison, TADDS’12 D : network Diameter n : network size

56

ICDCS’19 Technical report on HAL: Self Stabilizing Distributed Cooperative Reset.