Download presentation
Presentation is loading. Please wait.
Published byBriana Bradford Modified over 9 years ago
1
Sorting on Skip Chains Ajoy K. Datta, Lawrence L. Larmore, and Stéphane Devismes
2
Skip Chain December 2, 2011PDAA'2011, Osaka Left Right Major nodes Relay nodes
3
Skip Chain Sorting December 2, 2011PDAA'2011, Osaka 3 6 2
4
Skip Chain Sorting December 2, 2011PDAA'2011, Osaka 3 6 2 2 3 6
5
Contribution Skip Chain Sorting Algorithm – Self-stabilizing – Silent – Locally shared memory model Unfair demon O(b) space, b = number of bits to encode a value O(md) rounds – m : number of major nodes – d : maximum number of relay between two major nodes – md = O(n) if the spacing between major processes is roughtly equal December 2, 2011PDAA'2011, Osaka
6
December 2, 2011PDAA'2011, Osaka Self-Stabilization: Closure + Convergence
7
December 2, 2011PDAA'2011, Osaka Self-Stabilization: Closure + Convergence States of the System
8
December 2, 2011PDAA'2011, Osaka Self-Stabilization: Closure + Convergence States of the System Illegitimate States Legitimate States
9
December 2, 2011PDAA'2011, Osaka Self-Stabilization: Closure + Convergence States of the System Closure
10
December 2, 2011PDAA'2011, Osaka Self-Stabilization: Closure + Convergence States of the System Closure
11
December 2, 2011PDAA'2011, Osaka Self-Stabilization: Closure + Convergence States of the System Closure
12
December 2, 2011PDAA'2011, Osaka Self-Stabilization: Closure + Convergence States of the System Convergence
13
December 2, 2011PDAA'2011, Osaka Self-Stabilization: Closure + Convergence States of the System Convergence
14
December 2, 2011PDAA'2011, Osaka Self-Stabilization: Closure + Convergence States of the System Convergence
15
December 2, 2011PDAA'2011, Osaka Tolerate Transient Faults E.g., any finite number of memory or message corruptions, or topological changes
16
December 2, 2011PDAA'2011, Osaka Tolerate Transient Faults E.g., any finite number of memory or message corruptions, or topological changes
17
Silence “The system eventually reaches a terminal configuration where the values of the variables are fixed” [Dolev et al, 1996] December 2, 2011PDAA'2011, Osaka
18
Related Work New problem A generalization of the sorting problem – Oriented chain [Bein et al, 2008] Self-stabilizing O(n) round, O(b) space December 2, 2011PDAA'2011, Osaka
19
Overview December 2, 2011PDAA'2011, Osaka
20
Overview Idea : distributed bubble sort December 2, 2011PDAA'2011, Osaka
21
Overview Idea : distributed bubble sort December 2, 2011PDAA'2011, Osaka Arbitrary Configurations
22
Overview Idea : distributed bubble sort December 2, 2011PDAA'2011, Osaka Arbitrary Configurations Normal Configurations Error Correction
23
Overview Idea : distributed bubble sort December 2, 2011PDAA'2011, Osaka Arbitrary Configurations Normal Configurations Legitimate Configurations Error Correction Sorting
24
Data Structure December 2, 2011PDAA'2011, Osaka 3 6 2
25
Swap December 2, 2011PDAA'2011, Osaka 6 2
26
Swap December 2, 2011PDAA'2011, Osaka 6 2 6 266 6 6
27
Swap December 2, 2011PDAA'2011, Osaka 6 2 6 266 6 6 2 622 2 2
28
Swap December 2, 2011PDAA'2011, Osaka 6 2 6 266 6 6 2 622 2 2 Synchronization between swaps : 4 colors
29
Colors A value moves to the left at the crest of wave 0 A value moves to the right at the crest of wave 1 Colors 2 and 3 to avoid ambiguïty and to synchronize Color E: error color December 2, 2011PDAA'2011, Osaka
30
Example December 2, 2011PDAA'2011, Osaka X YZ 3 3 3 3 0 0 3 3 2 2 0 0 Compare and swap V(y)V(x) 3 3 3 3 3 3 0 0 0 0 0 0
31
Example December 2, 2011PDAA'2011, Osaka X YZ 3 3 3 3 1 1 0 0 2 2 0 0 V(y)’V(x)’ 3 3 3 3 3 3 0 0 0 0 0 0 0, V(x)’1, V(y)’
32
Example December 2, 2011PDAA'2011, Osaka X YZ 0 0 3 3 1 1 0 0 2 2 1 1 V(y)’V(x)’ 0 0 0 0 0 0 1 1 1 1 1 1 Compare and swap V(y)’V(u) V(x)’
33
Example December 2, 2011PDAA'2011, Osaka X YZ 1 1 0 0 1 1 0 0 3 3 2 2 V(y)’V(x)’ 0 0 0 0 0 0 1 1 1 1 1 1 V(y)’V(u)’ V(x)’’ 2 1, V(x)’’
34
Example December 2, 2011PDAA'2011, Osaka X YZ 1 1 0 0 2 2 1 1 3 3 2 2 V(y)’V(x)’’ 1 1 1 1 1 1 2 2 2 2 2 2 V(y)’V(u)’ V(x)’’
35
Example December 2, 2011PDAA'2011, Osaka X YZ 1 1 0 0 3 3 2 2 3 3 2 2 V(y)’V(x)’’ 1 1 1 1 1 1 2 2 2 2 2 2 V(y)’V(u)’ V(x)’’ 2 3
36
Example December 2, 2011PDAA'2011, Osaka X YZ 2 2 0 0 3 3 2 2 3 3 3 3 V(y)’V(x)’’ 2 2 2 2 2 2 3 3 3 3 3 3 V(y)’V(u)’ V(x)’’ 0, V(z) 1, V(u)’’
37
Example December 2, 2011PDAA'2011, Osaka X YZ 2 2 1 1 3 3 2 2 0 0 3 3 V(y)’V(x)’’ 2 2 2 2 2 2 3 3 3 3 3 3 V(y)’ V(z)V(u)’’ V(x)’’ Compare and swap
38
Example December 2, 2011PDAA'2011, Osaka X YZ 3 3 2 2 3 3 2 2 1 1 0 0 V(y)’V(x)’’ 2 2 2 2 2 2 3 3 3 3 3 3 V(y)’’ V(z)’V(u)’’ V(x)’’ 0, V(y)’’ 3
39
Example December 2, 2011PDAA'2011, Osaka X YZ 3 3 2 2 0 0 3 3 1 1 0 0 V(y)’’V(x)’’ 3 3 3 3 3 3 0 0 0 0 0 0 V(y)’’ V(z)’V(u)’’ V(x)’’ 3 2
40
Example December 2, 2011PDAA'2011, Osaka X YZ 3 3 3 3 0 0 3 3 2 2 0 0 V(y)’’V(x)’’ 3 3 3 3 3 3 0 0 0 0 0 0 V(y)’’ V(z)’V(u)’’ V(x)’’
41
Error correction December 2, 2011PDAA'2011, Osaka
42
Error correction December 2, 2011PDAA'2011, Osaka
43
Error correction December 2, 2011PDAA'2011, Osaka
44
Error correction December 2, 2011PDAA'2011, Osaka
45
Error correction December 2, 2011PDAA'2011, Osaka
46
Uncorrect swap December 2, 2011PDAA'2011, Osaka X YZ 3 3 3 3 0 0 3 3 2 2 0 0 Compare and swap bc 3 3 3 3 3 3 0 0 0 0 0 0 a c c abbbb
47
Uncorrect swap December 2, 2011PDAA'2011, Osaka X YZ 3 3 3 3 1 1 0 0 2 2 0 0 3 3 3 3 3 3 0 0 0 0 0 0 0, b1, c Bad swap cb a c c abbbb
48
Uncorrect swap December 2, 2011PDAA'2011, Osaka X YZ 3 3 3 3 1 1 0 0 2 2 0 0 3 3 3 3 3 3 0 0 0 0 0 0 0, b1, c cb a c c abbbb a Error correction
49
Uncorrect swap December 2, 2011PDAA'2011, Osaka X YZ 3 3 3 3 1 1 0 0 2 2 0 0 3 3 3 3 3 3 1 1 1 1 0 0 1, c cb a a a accbb a Error correction
50
Uncorrect swap December 2, 2011PDAA'2011, Osaka X YZ 3 3 3 3 1 1 0 0 2 2 0 0 3 3 3 3 3 3 1 1 1 1 0 0 1, c cb a a a accbb a Error correction To undo the swap, we should remember that we do a swap! Status : S or U S
51
Uncorrect swap December 2, 2011PDAA'2011, Osaka X YZ 3 3 3 3 1 1 0 0 2 2 0 0 3 3 3 3 3 3 1 1 1 1 0 0 1, c ba a a a accbb b Error correction To undo the swap, we should remember that we do a swap! Status : S or U S
52
Silence December 2, 2011PDAA'2011, Osaka An additional Boolean variable : Done Done => Stop initiating wave color 2222333336
53
Silence December 2, 2011PDAA'2011, Osaka An additional Boolean variable : Done Done => Stop initiating wave color 2222333336
54
Silence December 2, 2011PDAA'2011, Osaka An additional Boolean variable : Done Done => Stop initiating wave color 2222333336 3≤6 & Color=3 → Done<-True; Color<-0
55
Silence December 2, 2011PDAA'2011, Osaka 2222333336 Color=3 & R.color=0 & R.done → Done<-True; Color<-0 Value<-R.Value
56
Silence December 2, 2011PDAA'2011, Osaka 2222333336 Color=3 & R.color=0 & R.done & Value≤R.Value → Done<-True; Color<-0
57
Silence December 2, 2011PDAA'2011, Osaka 2222333336 At the end, for all node: - Color = 0 - Done = true No enabled action
58
Perspective Can we enhance the round complexity to O(n) rounds ? Step complexity ? December 2, 2011PDAA'2011, Osaka
59
Thank you December 2, 2011PDAA'2011, Osaka
60
Min-Max Search Tree December 2, 2011PDAA'2011, Osaka 10 1 1 9 9 5 5 8 8 3 3 7 7 6 6 2 2 <= 4 4 min max
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.