Self-Stabilizing Labeling and Ranking in Ordered Trees Ajoy K. Datta - - PowerPoint PPT Presentation

self stabilizing labeling and ranking in ordered trees
SMART_READER_LITE
LIVE PREVIEW

Self-Stabilizing Labeling and Ranking in Ordered Trees Ajoy K. Datta - - PowerPoint PPT Presentation

Introduction Labeling with Guide Pairs Application: Ranking Conclusion Self-Stabilizing Labeling and Ranking in Ordered Trees Ajoy K. Datta 1 ephane Devismes 2 St Lawrence L. Larmore 1 Yvan Rivierre 2 1 School of Computer Science, University


slide-1
SLIDE 1

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Self-Stabilizing Labeling and Ranking in Ordered Trees

Ajoy K. Datta1 St´ ephane Devismes2 Lawrence L. Larmore1 Yvan Rivierre2

1School of Computer Science, University of Nevada Las Vegas, USA 2VERIMAG Laboratory, Universit´

e Joseph Fourier, Grenoble, France

slide-2
SLIDE 2

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Introduction

slide-3
SLIDE 3

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Overview

3 / 28

Two self-stabilizing algorithms in ordered directed tree networks:

◮ Labeling processes, so to ease routing. ◮ Application: Ranking processes by weight.

slide-4
SLIDE 4

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Assumptions

4 / 28

Model of Computation:

◮ Shared memory model ◮ Read/write atomicity ◮ Asynchronous setting ◮ Weakly fair scheduler

slide-5
SLIDE 5

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Assumptions

4 / 28

Model of Computation:

◮ Shared memory model ◮ Read/write atomicity ◮ Asynchronous setting ◮ Weakly fair scheduler

slide-6
SLIDE 6

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Assumptions

4 / 28

Model of Computation:

◮ Shared memory model ◮ Read/write atomicity ◮ Asynchronous setting ◮ Weakly fair scheduler

Topology:

◮ Ordered directed tree network

slide-7
SLIDE 7

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Topology

5 / 28

Ordered directed tree network:

◮ tree ◮ rooted at some process ◮ directed toward the root ◮ left-to-right order on children

slide-8
SLIDE 8

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Topology

5 / 28

Ordered directed tree network:

◮ tree ◮ rooted at some process ◮ directed toward the root ◮ left-to-right order on children

slide-9
SLIDE 9

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Topology

5 / 28

Ordered directed tree network:

◮ tree ◮ rooted at some process ◮ directed toward the root ◮ left-to-right order on children

slide-10
SLIDE 10

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Topology

5 / 28

Ordered directed tree network:

◮ tree ◮ rooted at some process ◮ directed toward the root ◮ left-to-right order on children 1 2 1

slide-11
SLIDE 11

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Topology

5 / 28

Ordered directed tree network:

◮ tree ◮ rooted at some process ◮ directed toward the root ◮ left-to-right order on children

Computable in arbitrary rooted

  • network. (e.g. Chen & al., 1991)

1 2 1

slide-12
SLIDE 12

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Labeling with Guide Pairs

slide-13
SLIDE 13

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Guide Pair: Definition

7 / 28

The guide pair of any process P is defined as gp(P) = (i, j), where:

◮ i is the rank of P in the preorder traversal

(left-to-right, top-down)

◮ j is the rank of P in the reverse postorder traversal

(right-to-left, top-down) Introduced by Flocchini & al., 2006.

slide-14
SLIDE 14

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Guide Pair: First Term

8 / 28

gp(P) = (i, j), where i is the preorder rank of P. 1, 2, 3, 4, 5, 6, 7, 8, 9,

slide-15
SLIDE 15

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Guide Pair: Second Term

9 / 28

gp(P) = (i, j), where j is the reverse postorder rank of P.

, 1 , 6 , 9 , 7 , 8 , 5 , 2 , 4 , 3

slide-16
SLIDE 16

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Guide Pair: Both Terms

10 / 28

gp(P) = (i = preorder rank, j = reverse preorder rank) 1, 1 2, 6 3, 9 4, 7 5, 8 6, 5 7, 2 8, 4 9, 3

slide-17
SLIDE 17

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Guide Pair: Partial Order

11 / 28

We define a partial order

  • n guide pairs as follows:

gp(P) ≤ gp(Q) ≡ i(P) ≤ i(Q) ∧ j(P) ≤ j(Q) 1, 1 2, 6 3, 9 4, 7 5, 8 6, 5 7, 2 8, 4 9, 3

slide-18
SLIDE 18

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Guide Pair: Partial Order

11 / 28

We define a partial order

  • n guide pairs as follows:

gp(P) ≤ gp(Q) ≡ i(P) ≤ i(Q) ∧ j(P) ≤ j(Q) 1, 1 2, 6 3, 9 4, 7 5, 8 6, 5 7, 2 8, 4 9, 3

slide-19
SLIDE 19

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Guide Pair: Partial Order

11 / 28

We define a partial order

  • n guide pairs as follows:

gp(P) ≤ gp(Q) ≡ i(P) ≤ i(Q) ∧ j(P) ≤ j(Q) Note that: gp(P) ≤ gp(Q) ≡ Q is a descendant of P 1, 1 2, 6 3, 9 4, 7 5, 8 6, 5 7, 2 8, 4 9, 3

slide-20
SLIDE 20

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Guide Pair: Help for Communication

12 / 28

parents

slide-21
SLIDE 21

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Guide Pair: Help for Communication

12 / 28

parents ???

slide-22
SLIDE 22

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Guide Pair: Help for Communication

12 / 28

1, 1 2, 6 3, 9 4, 7 5, 8 6, 5 7, 2 8, 4 9, 3 parents 1, 1

w, 5, 8

(5, 8)

slide-23
SLIDE 23

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Guide Pair: Help for Communication

12 / 28

1, 1 2, 6 3, 9 4, 7 5, 8 6, 5 7, 2 8, 4 9, 3 parents 1, 1 2, 6 6, 5 7, 2

w, 5, 8

(2, 6) <= (5, 8)

slide-24
SLIDE 24

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Guide Pair: Help for Communication

12 / 28

1, 1 2, 6 3, 9 4, 7 5, 8 6, 5 7, 2 8, 4 9, 3 parents 1, 1 2, 6 3, 9 4, 7 6, 5 7, 2

w, 5, 8

(4, 7) <= (5, 8)

slide-25
SLIDE 25

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Guide Pair: Help for Communication

12 / 28

1, 1 2, 6 3, 9 4, 7 5, 8 6, 5 7, 2 8, 4 9, 3 parents 1, 1 2, 6 3, 9 4, 7 5, 8 6, 5 7, 2

w, 5, 8

(5, 8) <= (5, 8)

slide-26
SLIDE 26

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Guide Pair: Help for Communication

12 / 28

1, 1 2, 6 3, 9 4, 7 5, 8 6, 5 7, 2 8, 4 9, 3 parents 1, 1 2, 6 3, 9 4, 7 5, 8 6, 5 7, 2

w, 5, 8

guide pairs Bidirectional communication between root and non-root.

slide-27
SLIDE 27

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE Algorithm

13 / 28

Composition of two modules:

◮ Counting processes by subtrees (bottom-up). ◮ Labeling based on those counts (top-down).

slide-28
SLIDE 28

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Counting

14 / 28

Count processes in each subtree, in O(h) rounds.

? ? ? ? ? ? ? ? ?

h = height, δ = degree, n = number of processes

slide-29
SLIDE 29

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Counting

14 / 28

Count processes in each subtree, in O(h) rounds.

? 1 ? 1 ? 1 1 1 ?

h = height, δ = degree, n = number of processes

slide-30
SLIDE 30

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Counting

14 / 28

Count processes in each subtree, in O(h) rounds.

? 1 3 1 2 1 1 1 ?

h = height, δ = degree, n = number of processes

slide-31
SLIDE 31

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Counting

14 / 28

Count processes in each subtree, in O(h) rounds.

4 1 3 1 2 1 1 1 ?

h = height, δ = degree, n = number of processes

slide-32
SLIDE 32

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Counting

14 / 28

Count processes in each subtree, in O(h) rounds.

4 1 3 1 2 1 1 1 9

h = height, δ = degree, n = number of processes

slide-33
SLIDE 33

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Labeling

15 / 28

Preliminary: Copy counts from children.

4 4 1 1 3 3 1 1 2 2 1 1 1 1 1 1 9

h = height, δ = degree, n = number of processes

slide-34
SLIDE 34

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Labeling

16 / 28

Compute guide pairs from counts, in O(h) rounds.

4 1 3 1 2 1 1 1

h = height, δ = degree, n = number of processes

slide-35
SLIDE 35

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Labeling

16 / 28

Compute guide pairs from counts, in O(h) rounds. 1, 1

4 1 3 1 2 1 1 1

h = height, δ = degree, n = number of processes

slide-36
SLIDE 36

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Labeling

16 / 28

Compute guide pairs from counts, in O(h) rounds. 1, 1 2,

4 1 3 1 2 1 1 1

1 + 1 = 2

h = height, δ = degree, n = number of processes

slide-37
SLIDE 37

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Labeling

16 / 28

Compute guide pairs from counts, in O(h) rounds. 1, 1 2, 6,

4 1 3 1 2 1 1 1

1 + 4 + 1 = 6

h = height, δ = degree, n = number of processes

slide-38
SLIDE 38

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Labeling

16 / 28

Compute guide pairs from counts, in O(h) rounds. 1, 1 2, 6, 7,

4 1 3 1 2 1 1 1

1 + 4 + 1 + 1 = 7

h = height, δ = degree, n = number of processes

slide-39
SLIDE 39

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Labeling

16 / 28

Compute guide pairs from counts, in O(h) rounds. 1, 1 2, 6, 7, 2

4 1 3 1 2 1 1 1

1 + 1 = 2

h = height, δ = degree, n = number of processes

slide-40
SLIDE 40

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Labeling

16 / 28

Compute guide pairs from counts, in O(h) rounds. 1, 1 2, 6, 5 7, 2

4 1 3 1 2 1 1 1

1 + 3 + 1 = 5

h = height, δ = degree, n = number of processes

slide-41
SLIDE 41

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Labeling

16 / 28

Compute guide pairs from counts, in O(h) rounds. 1, 1 2, 6 6, 5 7, 2

4 1 3 1 2 1 1 1

1 + 3 + 1 + 1 = 6

h = height, δ = degree, n = number of processes

slide-42
SLIDE 42

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Labeling

16 / 28

Compute guide pairs from counts, in O(h) rounds. 1, 1 2, 6 6, 5 7, 2 3, 9 4, 7 8, 4 9, 3

4 1 3 1 2 1 1 1

h = height, δ = degree, n = number of processes

slide-43
SLIDE 43

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Labeling

16 / 28

Compute guide pairs from counts, in O(h) rounds. 1, 1 2, 6 6, 5 7, 2 3, 9 4, 7 8, 4 9, 3 5, 8

4 1 3 1 2 1 1 1

h = height, δ = degree, n = number of processes

slide-44
SLIDE 44

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

GUIDE: Properties

17 / 28

Algorithm that computes guide pairs,

◮ is self-stabilizing, ◮ is silent, ◮ stabilizes in O(h) rounds, ◮ uses O(δ log n) bits

and allows for bidirectional communication.

h = height, δ = degree, n = number of processes

slide-45
SLIDE 45

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Application: Ranking

slide-46
SLIDE 46

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Ranking Problem

19 / 28 ◮ Input: weight, of ordered

type.

◮ Output: rank, by order of

ascending weight.

6 8 3 2 9 1 7

slide-47
SLIDE 47

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Ranking Problem

19 / 28 ◮ Input: weight, of ordered

type.

◮ Output: rank, by order of

ascending weight.

6 8 3 2 9 1 7 0#1

#2 #3 #4 #5 #6 #7 #8

slide-48
SLIDE 48

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: Algorithm Overview

20 / 28

Self-stabilizing, but not silent: Endlessly compute ranks.

◮ Compute ranks ◮ Repeat computation waves ◮ Handle errors

slide-49
SLIDE 49

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: One Computation Wave

21 / 28 ◮ Weight packages are

(bottom-up) routed by priority of weight.

◮ Rank packages are

(top-down) routed thanks to guide pairs.

counter = 0 weight

slide-50
SLIDE 50

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: One Computation Wave

21 / 28 ◮ Weight packages are

(bottom-up) routed by priority of weight.

◮ Rank packages are

(top-down) routed thanks to guide pairs. #1

weight counter = 1 rank

slide-51
SLIDE 51

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: One Computation Wave

21 / 28 ◮ Weight packages are

(bottom-up) routed by priority of weight.

◮ Rank packages are

(top-down) routed thanks to guide pairs. #1 #2

counter = 2 weight rank

slide-52
SLIDE 52

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: One Computation Wave

21 / 28 ◮ Weight packages are

(bottom-up) routed by priority of weight.

◮ Rank packages are

(top-down) routed thanks to guide pairs. #1 #2 #3

counter = 3 weight rank

slide-53
SLIDE 53

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: One Computation Wave

21 / 28 ◮ Weight packages are

(bottom-up) routed by priority of weight.

◮ Rank packages are

(top-down) routed thanks to guide pairs. #1 #2 #3 #4

counter = 4 weight rank

slide-54
SLIDE 54

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: One Computation Wave

21 / 28 ◮ Weight packages are

(bottom-up) routed by priority of weight.

◮ Rank packages are

(top-down) routed thanks to guide pairs. #1 #2 #3 #4 #5

counter = 5 weight rank

slide-55
SLIDE 55

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: One Computation Wave

21 / 28 ◮ Weight packages are

(bottom-up) routed by priority of weight.

◮ Rank packages are

(top-down) routed thanks to guide pairs. #1 #2 #3 #4 #5 #6

counter = 6 weight rank

slide-56
SLIDE 56

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: One Computation Wave

21 / 28 ◮ Weight packages are

(bottom-up) routed by priority of weight.

◮ Rank packages are

(top-down) routed thanks to guide pairs. #1 #2 #3 #4 #5 #6 #7

counter = 7 weight rank

slide-57
SLIDE 57

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: One Computation Wave

21 / 28 ◮ Weight packages are

(bottom-up) routed by priority of weight.

◮ Rank packages are

(top-down) routed thanks to guide pairs. #1 #2 #3 #4 #5 #6 #7 #8

counter = 8 weight rank

slide-58
SLIDE 58

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: One Computation Wave

21 / 28 ◮ Weight packages are

(bottom-up) routed by priority of weight.

◮ Rank packages are

(top-down) routed thanks to guide pairs. #1 #2 #3 #4 #5 #6 #7 #8

counter = 8

slide-59
SLIDE 59

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: Repeated Computation Waves

22 / 28

Status variable:

◮ 1: new epoch (reset) ◮ 2: new comp. wave ◮ 3: end of comp. wave ◮ 4: end of epoch

root

. . .

leaves 1 1 1 2 2 2 w w w d d r

. . . . . . . . .

w d r r r 3 3 3 4 4 4 1 1 1 . . . time

w = weight package, d = done package, r = rank package

slide-60
SLIDE 60

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: Error Correction

23 / 28 ◮ 0: error correction ◮ propagated up and down

the tree, except below status 1 (reset).

3 3 3 3 2 2 4 2 2 status 0 propagation

slide-61
SLIDE 61

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: Error Correction

23 / 28 ◮ 0: error correction ◮ propagated up and down

the tree, except below status 1 (reset).

3 3 3 3 2 2 4 2 2 status 0 propagation

slide-62
SLIDE 62

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: Error Correction

23 / 28 ◮ 0: error correction ◮ propagated up and down

the tree, except below status 1 (reset).

3 3 3 3 2 2 4 2 2 status 0 propagation

slide-63
SLIDE 63

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: Error Correction

23 / 28 ◮ 0: error correction ◮ propagated up and down

the tree, except below status 1 (reset).

3 3 3 3 2 2 4 2 2 status 0 propagation

slide-64
SLIDE 64

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: Error Correction

23 / 28 ◮ 0: error correction ◮ propagated up and down

the tree, except below status 1 (reset).

3 3 3 3 2 2 4 2 2 1 status 1 global reset

slide-65
SLIDE 65

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: Error Correction

23 / 28 ◮ 0: error correction ◮ propagated up and down

the tree, except below status 1 (reset).

3 3 3 3 2 2 4 2 2 1 1 1 1 status 1 global reset

slide-66
SLIDE 66

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: Error Correction

23 / 28 ◮ 0: error correction ◮ propagated up and down

the tree, except below status 1 (reset).

3 3 3 3 2 2 4 2 2 1 1 1 1 1 1 1 1 1 1 status 1 global reset

slide-67
SLIDE 67

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

RANK: Properties

24 / 28

Algorithm that ranks processes by weight,

◮ is self-stabilizing, ◮ is not silent, ◮ stabilizes in O(n) rounds and

(previously O(n2) by Alari & al., 1998)

◮ uses O(b + δ log n) bits.

b = weight’s bits, δ = degree, n = number of processes

slide-68
SLIDE 68

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Conclusion

slide-69
SLIDE 69

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Contributions

26 / 28 ◮ Labeling algorithm that computes guide pairs,

thus allows for bidirectionnal communication.

(first self-stabilizing solution)

◮ Application: Distributed ranking of processes.

(better stab. time than Alari & al., 1998)

slide-70
SLIDE 70

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

Perspectives

27 / 28 ◮ What about an unfair scheduler?

Which step complexity? in O(n2)?

◮ Find other applications to guide pairs.

slide-71
SLIDE 71

Introduction Labeling with Guide Pairs Application: Ranking Conclusion

28 / 28

Thanks for your attention