Download presentation

Presentation is loading. Please wait.

Published byCaden Gaff Modified over 2 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 o Each node p maintains a logical clock register r p r p := r p + 1

5
Logical Clock Synchronization o Synchronous/Asynchronous Environment o Each node p maintains a logical clock register r p r p := r p 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 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 K= Minimality of K ?

23
Logical Clock Synchronization 23 o K=2? o No possible order among the clocks Synchronous

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

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 l 1 ; 1 l 2 ; 2 l 0 ;

26
Logical Clock Synchronization 26 o K=3, Lifting 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 D0D0 D0D0

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

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

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

31
Logical Clock Synchronization 31 The lifting is compatible with the local ordering of Z K … 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
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= … D0D0 D1D1 D2D2 D0D0 D1D1 D2D

37
After a fault or an arbitrary initialization 37 o K= … D0D0 D1D1 D2D2 D0D0 D1D1 D2D DEADLOCK!

38
After a fault or an arbitrary initialization 38 o K=

39
After a fault or an arbitrary initialization 39 o K=

40
After a fault or an arbitrary initialization 40 o K= 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 No Deadlock 1 : The register of two neighboring process is less than or equal to : There is no deadlock (there exists a compatible lifting to the configuration) 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 : There is no deadlock (there exists a compatible lifting to the configuration)

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

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

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

47
02/06/ 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 : 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 > H G K-2 K>C G Values of Register r

53
53 Self-Stabilizing Logical Clock Synchronization - K > H G 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= 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= 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 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 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 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 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 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 n 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
[C u, C u+D ] After an enought long normal action sequence (NA), a coherent phase is guaranteed in the past. Coherent Cuts Detection

80
α-α 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

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google