Download presentation

Presentation is loading. Please wait.

Published byCaden Gaff Modified over 3 years ago

1
Franck Petit INRIA / LIP Lyon Stabilization, Synchronization of Logical Clocks and Applications

2
o G=(V,E) is a connected network o V: set of n nodes/processes o E: set of m bidirectional links o N p : set of neighboring nodes of p o Memory shared between neighboring nodes 2 Preliminaries Bidirectional links

3
o In each computation step: According to its variables and the variables of its neighbors, a node/process is either enabled to execute an action or not Synchronous system Every enabled nodes execute an action atomically Asynchronous system Some enabled nodes are chosen by an unfair adversary The chosen nodes execute an action atomically 3 Preliminaries, Distributed Algorithm

4
Logical Clock Synchronization o Synchronous/Asynchronous Environment 4 000000000 +4 +3 +2 +1 +0 111111111222222222333333333 o Each node p maintains a logical clock register r p r p := r p + 1

5
Logical Clock Synchronization o Synchronous/Asynchronous Environment 5 000000000 +4 +3 +2 +1 +0 o Each node p maintains a logical clock register r p r p := r p + 1 00 1 000 1 00 00 2 000 2 00 + Synchronizer

6
Global Synchronizer (asynchronous) distributed systems o Wave Algorithms, e.g., Propagation of Information with Feedback (PIF) Depth-First Token Circulation o Global Synchronization, e.g., (Group) Mutual Exclusion Leader Election Reset Logical Clock Synchronization Rooted Spanning Tree … 6 In systems with unique IDs or a particular node (root, leader, main server…)?

7
r Propagation of Information with Feedback

8
r

9
r

10
r Leaf processors Propagation of Information with Feedback

11
r A slow processor Propagation of Information with Feedback

12
r A slow processor Propagation of Information with Feedback

13
r

14
r

15
r

16
r

17
r

18
r

19
r o For One Puse: o Best Case: O(D) o Worst Case: O(N) Can we provide better complexities?

20
Logical Clock Synchronization o Synchronous/Asynchronous Environment 20 o Each node p maintains a phase clock register r p 000000000 00 1 000 1 000 111 00 1 00 0 1 2 1111 000 1 222 111 0 11 2 3 2 1 2 1 0 22 2 3 2 2 2 1 0 2 33333 2 1 0 2 3 444 3 2 1 0 +4 +3 +2 +1 +0 If q N p : r p r q then r p := r p + 1

21
Logical Clock Synchronization 21 o Each node maintains a phase clock register r in [0,…,K-1]=Z K o Safety: The gap between the phase clock of two neighboring nodes is at most equal to 1 (mod K). o No starvation (Vivacity): Each phase clock r is incremented by 1 (mod K) infinitely often. Unison

22
Logical Clock Synchronization 22 Unison 2 3 4 0 4 3 2 1 1 0 +4 +3 +2 +1 +0 K=5 000000000 00 1 000 1 000 111 00 1 00 0 1 2 1111 000 1 222 111 0 11 2 3 2 1 2 1 0 22 2 3 2 2 2 1 0 2 33333 2 1 0 2 3 444 3 2 1 0 Minimality of K ?

23
Logical Clock Synchronization 23 o K=2? o No possible order among the clocks 000000000 +1 +0 111111111000000000111111111 Synchronous 000000000111111111

24
Logical Clock Synchronization 24 o K=2? o No possible order among the clocks 000000000 +1 +0 Asynchronous 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

25
Logical Clock Synchronization 25 o Successor Function and Predecessor Function possible if K3 o K=3 o Local total order l over Z 3 ={0,1,2} a l b iff 0 b-a mod 3 1 0 l 1 ; 1 l 2 ; 2 l 0 ;

26
Logical Clock Synchronization 26 o K=3, Lifting 0 0 0 0 0 0 0 0 0 0 0 0 p.R, virtual register, it counts the number of increments of p 0 0 State of the virtual p.R lifted from Projection mod K 0 State of p.r

27
Logical Clock Synchronization 27 o K=3, Lifting 0 1 1 1 1 0 0 1 1 1 1 0 0 1 D0D0 D0D0

28
Logical Clock Synchronization 28 o K=3, Lifting 0 1 1 1 2 1 0 1 1 2 1 1 0 1 2 D0D0 D1D1 D0D0 D1D1

29
Logical Clock Synchronization 29 o K=3, Lifting 0 2 1 1 2 2 0 1 1 2 2 2 0 1 2 … D0D0 D1D1 D2D2 D0D0 D1D1 D2D2

30
Logical Clock Synchronization 30 o K=3, Lifting 0 0 1 1 2 2 0 1 1 2 3 2 0 1 2 … D0D0 D1D1 D2D2 D0D0 D1D1 D2D2

31
Logical Clock Synchronization 31 The lifting is compatible with the local ordering of Z K 0 1 2 … D0D0 D1D1 D2D2 D0D0 D1D1 D2D2 q.r p.r q.R p.R p.R q.R p.r l q.r Lifted execution Execution The lifting defines a global preorder over the nodes

32
32 1 0 K-1 K-2 Generalization over Z K o (Local) total order l over Z K ={0,1,2,…,K} o Let M 1 and K 2M+1 a l b iff 0 b-a mod K M With M=2 and K=5, then for 1 4 l 1 ; 0 l 1 ; 1 l 1 ; 1 l 2 ; 1 l 3 ;

33
33 Complexities o Space : O(1) o Time, for one pulse: o Best Case: O(1) o Worst Case: O(D) [DELAY]

34
34 Fault Tolerance Starting from an arbitrary configuration ?

35
Self-stabilization 35 A self-stabilizing system, regardless of its initial state, is guaranteed to converge to the intended behavior in finite time. [Dijkstra 74] correct stabilization phase Transient Fault Transient Faults

36
After a fault or an arbitrary initialization 36 o K=3 0 1 2 … D0D0 D1D1 D2D2 D0D0 D1D1 D2D2 0 0 1 1 2 2

37
After a fault or an arbitrary initialization 37 o K=3 0 1 2 … D0D0 D1D1 D2D2 D0D0 D1D1 D2D2 0 0 2 1 1 2 0 1 5 4 3 2 DEADLOCK!

38
After a fault or an arbitrary initialization 38 o K=6 0 1 2 3 0 5 4 0 1 2 34 5 6

39
After a fault or an arbitrary initialization 39 o K=6 1 1 2 3 0 5 4 0 1 2 34 5 6

40
After a fault or an arbitrary initialization 40 o K=6 1 1 2 3 0 5 4 0 1 2 34 5 6 MUTUAL EXCLUSION!

41
41 What are the conditions to be able to (re)- synchronize the system ? After a fault or an arbitrary initialization

42
42 System Configurations : The register values are arbitrary 30 1 1 2 1 1 0 No Deadlock 1 : The register of two neighboring process is less than or equal to 1 0 1 : There is no deadlock (there exists a compatible lifting to the configuration) 13 1 2 3 12 1 2 0 K=4

43
43 System Configurations o C G (C G n), the cyclomatic characteristic of the graph: Equal to the size of the greatest cycle in one of the cycle basis of G where the size of the greatest cycle is minimum (equal to 2 if G is acyclic) [Boulinier, Petit, and Villain, PODC 2004] THEOREM: K>C G > 1 = 1 0 : The register values are arbitrary 1 : The register of two neighboring process is less than or equal to 1 0 1 : There is no deadlock (there exists a compatible lifting to the configuration)

44
02/06/201444 Cyclomatic characteristic of G C G =4 in meches and tories

45
02/06/201445 C G =6 in honeycombs Cyclomatic characteristic of G

46
02/06/201446 C G =4 in hypercubes Cyclomatic characteristic of G

47
02/06/201447 C G =n on rings Cyclomatic characteristic of G

48
48 Logical Clock Synchronization o To avoid deadlock due arbitrary initial values, K must be greater than C G (C G n), the cyclomatic characteristic of the graph 1 0 K-2 K>C G Values of Register r

49
49 System Configurations 1 = 1 0 No Deadlock ? : The register values are arbitrary 1 : The register of two neighboring process is less than or equal to 1 0 1 : There is no deadlock (there exists a compatible lifting to the configuration)

50
Stabilization o Global Reset (Stabilizing PIF), implies a root or IDs o Local Reset (also woks in anonymous networks) QUESTION: What is the motivation behind anonymity? Only a few amount of bits allows to distinguish a huge number of nodes!

51
o Lack of (underlying) infrastructure No unique identifier assignation or no central process No maintenance of any distributed structure o Economic advantages o User privacy preserved [Delporte-Gallet, Fauconnier, Guerraoui, and Ruppert, OPODIS 2007] o No one-to-one routing 51 Advantages of Anonymous Solutions

52
52 Self-Stabilizing Logical Clock Synchronization o To avoid starvations due arbitrary initial values, K must be greater than C G (C G n), the cyclomatic characteristic of the graph o Safety eventually guaranteed using a reset mechanism: Register r is set in [-,…,0] o To avoid starvations due arbitrary initial values, must be greater than than H G +1 (H G n), the greatest chordless cycle of the graph [Boulinier, Petit, and Villain, PODC 2004] - K-1 -2 -3 > H G +1 1 0 K-2 K>C G Values of Register r

53
53 Self-Stabilizing Logical Clock Synchronization - K-1 -2 -3 > H G +1 1 0 K-2 K>C G Values of Register r SSSync AN: q N p : Correct p (q) >;r p := (r p ); AR: ( q N p : Correct p (q) ) (r p tail ) r p :=- ; //reset AC: r p init * ( q N p : r q init * r p (r q ) r p := (r p ):

54
54 Asynchronous, Anonymous Logical Clock, Related Works Gouda, Couvreur, Francez, 1992 # of states Stabilizing Time O(n²) O(nd) o SSSync(K,α,M) O(nd) α=0, K>M.C G, M>H G -2 O(n) α>H G -2, M=1, K>C G Sur un arbre Dolev, 2000 O(n²) O(d) O(1) O(d)

55
55 Wave Algorithms in Anonymous Networks o Anonymous global ( = Diam ) waves for non fault- tolerant systems [Tel, Concurrency88] o All existing solutions for coordination problems (either global, local or at distance ) are based on: Existence of unique IDs (or a root) Underlying wave mechanism QUESTION: Can we provide wave algorithms using neither IDS nor root, i.e., working in an anonymous system?

56
56 Logical Clock Synchronization in Asynchronous Settings o Let us observe a possible execution of the self-stabilizing phase clock synchronization again o The system (a chain of 4 nodes) is stabilized o K=5 1 1 1 1 2 2 2 3 3 3 2 4 4 4 34 0 0 0 0 P0P0 P1P1 P2P2 P3P3 P4P4 0 0 time During the execution, coherent phase cuts P i are built defined by the same value i on each clock register.

57
57 Logical Clock Synchronization in Asynchronous Settings o Let us observe a possible execution of the self-stabilizing phase clock synchronization again o The system (a chain of 4 nodes) is stabilized o K=5 1 1 1 1 2 2 2 3 3 3 2 4 4 4 34 0 0 0 0 P0P0 P1P1 P2P2 P3P3 P4P4 0 0 time During the execution, coherent phase cuts P i are built defined by the same value i on each clock register.

58
58 Phase Clock Synchronization in Asynchronous Settings o Observe that: 1. After stabilization, the phase clock synchronization algorithm provides a wave stream 0 0 0 0 1 1 1 1 2 2 2 2 D D D D D+1 D+2 Stabilization (Convergence) 2. In the future of a coherent phase P i, the d th phase clock incrementation causally depends on nodes at distance d.

59
o When the clock register r is equal to a particular value, e.g., 0, add a particular event DECIDE Self-Stabilizing -Wavelets THEOREM: The self-stabilizing phase clock synchronization provides a self-stabilizing -wavelet mechanism

60
60 Self-Stabilizing -Wavelets 0 0 0 0 D D D D 2D PropagationFeedback o For instance, if =Diam, the above protocol provides a Propagation of Information with Feedback over an anonymous network

61
61 Self-Stabilizing -Local Infimum Computation 0 0 0 0 D D D D 2D PropagationFeedback For instance, = {a,e} {b} {a,b,c,f} {d} {a,b,c,d,e,f} o An infimum over a set S is an associative, commutative, and idempotent (x x=x) binary operator.

62
62 Self-Stabilizing -Local Infimum Computation 0 0 0 0 D D D D 2D PropagationFeedback For instance, = min {9} {2} {6} {0} o An infimum over a set S is an associative, commutative, and idempotent (x x=x) binary operator.

63
63 Self-Stabilizing -Barrier Synchronization o A two-layer phase clock algorithm o The upper layer clock is driven by the lower layer clock o In other words, every node moves the upper layer clock r UP from i to i+1 (mod K UP ) each time the lower layer clock incremented the lower layer clock, r LOW, times o The upper layer implements a self-stabilizing -Barrier Synchronization, i.e., Phase i+1 (mod K UP ) is executed by each node only after all nodes at distance less than or equal to have completed Phase i (mod K UP )

64
64 Self-Stabilizing -Local Resource Allocation o Let be a reflexive binary compatibility relationship over A, a set of resources. o If (a,b), then a and b are compatible, otherwise a and b are conflicting. o The -Local Resource Allocation is specified as follows: o Safety: If two nodes at distance less than or equal to execute their critical section simultaneously, then both are using compatible resources o No starvation (Vivacity): If a node requests a resource to enter the critical section, then its request is eventually satisfied and it enters the critical section

65
65 An example : -Local Mutual Exclusion o Let A be a set of IDs s.t. for every pair ( a,b ) in A, a (resp. b ) is conflicting with b (resp. a ) (i.e., = ) o Given two neighboring nodes P,Q, r P (resp. r Q ) being the upper clock of P (resp. Q): (r P,ID P ) (r Q,ID Q ) iff (r P < (mod K) r Q ) or ((r P = (mod K) r Q ) and (ID P

66
Enabling Snap-Stabilization in Anonymous Networks QUESTION: Can we design snap-stabilizing waves algorithms in anonymous networks?

67
Self-stabilization 67 A self-stabilizing system, regardless of its initial state, is guaranteed to converge to the intended behavior in finite time. [Dijkstra 74] correct stabilization phase Transient Fault

68
Stabilization and Safety A self-stabilizing system, regardless of the initial state of the processors, is guaranteed to converge to the intended behavior in finite time. Dijkstra 1974 A priori, Safety is not guaranted during the faults A snap-stabilizing system, regardless of the initial state of the processors, is guaranteed to converge to the intended behavior in 0 times. Bui, Datta, Petit, Villain 1999 Safety is lost during faults and system stabilization. Safety is lost during faults only.

69
Users Point of View X F(X) Network F(.)

70
X F(X) ? F(.) Users Point of View

71
1.X F(X) F(.)2.X F(X) 3.X F(X) 4.X F(X) N.X F(X) Self-Stabilizing Systems Users Point of View

72
1.X F(X) F(.) Snap-Stabilizing Systems Users Point of View

73
correct stabilization phase illegitimate legitimate correct Transient Fault A general technique to deal with transient faults Self-Stabilization

74
correct stabilization phase illegitimate legitimate stabilization time enabled starting actionslegitimate initial configuration Request Self-Stabilization Transient Fault

75
correct abnormal normal first enabled starting action always correct Quality of Service Request can be abnormal NORMAL initial configuration Request but service is ok Snap-Stabilization Transient Fault

76
76 Coherent Cuts Detection 012 102 If I execute 3 consecutive normal actions, my neighbors execute at least one

77
77 If I execute x consecutive normal actions, then my neighbors execute at least x-2 012 102 012 10n n n-12 Generalization Coherent Cuts Detection

78
78 I can extend the phenomenon to my neighbors 01 1 nn-1 2n-2 3n-3 Coherent Cuts Detection

79
79 101112 11 20 19 1218 1317 14 15 16 1314 15 16171819 15 [C u, C u+D ] 16 14 After an enought long normal action sequence (NA), a coherent phase is guaranteed in the past. Coherent Cuts Detection

80
80 110 -α-α Reset 1 2 …0 0 can mask a reset. If I want to know the behavior of the network, I must avoid this value Coherent Cuts Detection

81
81 Snap-Stabilization Wave Protocol for Anonynous Networks After an enought long normal action sequence (NA), a coherent phase is guaranteed in the past. A wave can computed after a sequence of 2D+3 normal actions passing through 0 and with an initial value greater than D.

82
82 A wave is requested by an application D < clock < K-2D-4 2D+3 consecutive incrementations DECIDE No, a reset occured Yes No Yes Snap-Stabilization Wave Protocol for Anonynous Networks K > 3D+5

83
83 Enabling Snap-Stabilization in Anonymous Networks Snap-Wave Toolbox Underlayer Unison Application layer RequestAnswer

84
Some references 84 UNISON and its applications Boulinier, Petit, Villain [PODC 04] When Graph Theory helps Self-Stabilization Boulinier, Petit, Villain, [Algorithmica 08] Synchronous vs. Asynchronous Unison Boulinier, Petit, [APDCM 08] Self-Stabilizing Wavelets and -Hop Coordination Boulinier, Levert, Petit : [ICDCN 08] Snap-Stabilizing Waves in Anonymous Networks Snap-Stabilization Bui, Datta, Petit, Villain [Distributed Computing 07] Snap-stabilization and PIF in Tree Networks http://graal.ens-lyon.fr/~fpetit

Similar presentations

OK

Distributed Computing 9. Sorting - a lower bound on bit complexity Shmuel Zaks ©

Distributed Computing 9. Sorting - a lower bound on bit complexity Shmuel Zaks ©

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on electricity generation from solar energy Ppt on ready to serve beverages 4 Ppt on condition monitoring services Ppt on man made disaster management Ppt on boilers operations analyst Ppt on spiritual leadership definition Download ppt on northern plains of india Ppt on total station survey Ppt on diode characteristics graph Ppt on campus recruitment system problem