+ All Categories
Home > Documents > 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction...

1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction...

Date post: 17-Jan-2016
Category:
Upload: lydia-elliott
View: 217 times
Download: 0 times
Share this document with a friend
Popular Tags:
95
1 Leader Election in Rings
Transcript
Page 1: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

1

Leader Election in Rings

Page 2: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

2

A Ring Network

Page 3: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

3

1 1

1

1

11

1

1

2

2

2

2

2

2

2

2

Sense of direction

left

right

Page 4: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

4

1 1

1

1

11

1

1

2

2

2

2

2

2

2

2

Links are bi-directional for messages

At most one message in each direction

Page 5: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

5

1 1

1

1

11

1

1

2

2

2

2

2

2

2

2

Anonymous Ring

Page 6: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

6

Eponymous (non-anonymous) Ring

1 1

1

1

11

1

1

2

2

2

2

2

2

2

2

12

34

5

6

7

8

Page 7: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

7

Leader Election

Initial state Final state

leader

Page 8: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

8

Leader election algorithms are affected by:

Anonymous RingEponymous Ring

The size of the network is knownThe size of the network is not known

n

Synchronous AlgorithmAsynchronous Algorithm

n

Page 9: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

9

Synchronous Anonymous Rings

Every processor runs the same algorithm

Every processor does exactly the sameexecution

Page 10: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

10

Initial state Final state

leader

If one node is elected a leader,then every node is elected a leader

Page 11: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

11

Final state

leader

Conclusion 1:

Leader electioncannot be solvedin synchronousanonymous rings

Page 12: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

12

Final state

leader

Conclusion 2:

Leader electioncannot be solvedin asynchronousanonymous ringseither

Why?

The asynchronous ring may behaveLike the synchronous ring

Page 13: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

13

Asynchronous Eponymous Rings

12

34

5

6

7

8

The maximum id node is elected leader

Page 14: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

14

12

34

5

6

7

8

Each node sends a message with its idto the left neighbor

18

2

6

47

3

5

Page 15: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

15

12

34

5

6

7

8

If: message received id current node id

8

6

7

5

Then: forward message

Page 16: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

16

12

34

5

6

7

8

If: message received id current node id

8

7

Then: forward message

Page 17: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

17

12

34

5

6

7

8

If: message received id current node id

8

7

Then: forward message

Page 18: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

18

12

34

5

6

7

8

If: message received id current node id

8

Then: forward message

Page 19: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

19

12

34

5

6

7

8

If: a node receives its own message

8

Then: it elects itself a leader

Page 20: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

20

12

34

5

6

7

8

If: a node receives its own message

Then: it elects itself a leader

leader

Page 21: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

21

12

34

5

6

7

8leader

The leader sends a message in the networkdeclaring itself as the “leader of the ring”

Page 22: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

22

12

34

5

6

7

8leader

Time complexity: )(nO n nodes

Page 23: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

23

1n-1

n-3

2

n-2

n

Message complexity: )( 2nO n nodes

worst case scenario:

Page 24: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

24

1n-1

n-3

2

n-2

n

Message complexity: )( 2nO n nodes

n messages

Page 25: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

25

1n-1

n-3

2

n-2

n

Message complexity: )( 2nO n nodes

1n messages

Page 26: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

26

1n-1

n-3

2

n-2

n

Message complexity: )( 2nO n nodes

2n messages

Page 27: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

27

1n-1

n-3

2

n-2

n

Message complexity: )( 2nO n nodes

1n

Total messages:

n

2n

1 )( 2n2

Page 28: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

28

Notes:

ndoes not need to be known to the algorithm

The algorithm can be converted to asynchronous

Page 29: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

29

An O(n log n) Mess. Algorithm

12

34

5

6

7

8

Again, the maximum id node is elected leader

Page 30: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

30

12

34

5

6

7

8

odneighborhok

nodesknodesk

Page 31: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

31

12

34

5

6

7

8

Phase 1: send id to 1-neighborhood

18

2

6

47

3

5 8

1

5

3 74

6

2

Page 32: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

32

If: received id current idThen: send a reply

12

34

5

6

7

8

Page 33: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

33

If: a node receives both repliesThen: it becomes a temporal leader

12

34

5

6

7

8

Page 34: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

34

12

34

5

6

7

8

Phase 2: send id to 2-neighborhood

8

85

5

7

7

6

6

Page 35: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

35

12

34

5

6

7

8

8

8

5

5

7

76

6

If: received id current idThen: forward the message

Page 36: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

36

If: received id current idThen: send a reply

12

34

5

6

7

8

At second step:

Page 37: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

37

12

34

5

6

7

8

If: a node receives both repliesThen: it becomes a temporal leader

Page 38: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

38

12

34

5

6

7

8

Phase 3: send id to -neighborhood22

77

8

8

Page 39: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

39

12

34

5

6

7

8

77

8

8

If: received id current idThen: forward the message

Page 40: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

40

12

34

5

6

7

8

If: received id current idThen: send a reply

At the step:22

Page 41: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

41

12

34

5

6

7

8

If: a node receives both repliesThen: it becomes the leader

Page 42: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

42

12

34

5

6

7

8leader

Page 43: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

43

12

5

6

8leader

nodesn nlog phases

In general:

Page 44: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

44

12

5

6

8leader

Phase i: send id to -neighborhood12 i

12 i

12 i

Page 45: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

45

Time complexity

The leader spends time in

Phase 1: 2Phase 2: 4…Phase i:…Phase log n:

i2

Total time: )()2(22 log1log nOO nn

nlog2

Page 46: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

46

Phase 1: 4Phase 2: 8…Phase i:…Phase log n:

Message complexity

Messages per leader

12 i

1log2 n

Max #leaders

n

2/n

12/ in

1log2/ nn

Page 47: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

47

Phase 1: 4Phase 2: 8…Phase i:…Phase log n:

Total messages:

n4

)log( nnO

12 i

1log2 n

n

2/n

12/ in

1log2/ nn

Messages per leader Max #leaders

n4

n4

n4

n4

Page 48: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

48

Notes:

The algorithm does not need to know n

It can be converted to anasynchronous algorithm

Page 49: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

49

An Mess. Synchronous Algorithm

)(nO

The node with smallest id is elected leader

There are rounds:

If in round there is a node with id • this is the new leader• the algorithm terminates

i i

n is known

Page 50: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

50

Round 1 ( time steps): no message sentn

922

33

24

15

16

57

48

n nodes

Page 51: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

51

922

33

24

15

16

57

48

n nodes

Round 2 ( time steps): no message sentn

Page 52: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

52

22

33

24

15

16

57

48

n nodes

Round 9

9

new leader

Page 53: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

53

22

33

24

15

16

57

48

n nodes

Round 9 ( time steps): messages sentn n

9

new leader

Page 54: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

54

22

33

24

15

16

57

48

n nodes

Round 9 ( time steps): messages sentn n

9

new leader

Algorithm Terminates

Page 55: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

55

22

33

24

15

16

57

48

n nodes

Round 9 ( time steps): messages sentn n

9

new leader

Total number of messages:n

Page 56: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

56

Another Synchronous Algorithm)(nO

The node with smallest id is elected leader

n is not known

Page 57: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

57

The algorithm:

• Each node injects a message with its id

• Message with id is injected and transferred with rate

ii2

1

• Nodes which have seen smaller id absorb higher id messages

Page 58: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

58

42

31

5

6

7

0

Time 1

0

Transfer rate120

Page 59: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

59

42

31

5

6

7

0

Time 2

0

1

120

120 221

120 rate

Page 60: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

60

42

31

5

6

7

0

Time 3

0

1

Page 61: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

61

42

31

5

6

7

0

Time 4

01

Page 62: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

62

42

31

5

6

7

0

Time 5

0

Page 63: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

63

42

31

5

6

7

0

Time 6

0

Page 64: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

64

42

31

5

6

7

0

Time 8

0

Page 65: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

65

Time 8

42

31

5

6

7

00

New leader

Page 66: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

66

Message complexity

Assume leader has (smallest) idi

Total time of algorithm:in 2

Note that if then algorithmis exponentially slow

)(ni

Page 67: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

67

Take the node with immediately higher id

ik

Total number of messages:

222

edge each on delay messagealgorithm of time total nn

k

i

Page 68: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

68

Take the node with immediately higher id

ikl

Total number of messages:

422 nnl

i

Page 69: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

69

id

imessages

n

k 2/n

l 4/n

lower

higher

nnn

n 242

Total messages:

Page 70: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

70

An Lower Bound )log( nnAssume we have algorithms in which:

• the maximum identifier is elected leader

• all the nodes must know the leader

We will prove:at least messages are needed)log( nn

• the size of the network is not knownn

to elect a leader

• the network is asynchronous

Page 71: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

71

open edgeno messages cross it

There is a possible asynchronousexecution with an open edge

(i.e. a very slow edge)

Messages may bepending to crossopen edge

Page 72: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

72

open edge

If the edge remains open, then the executionwill eventually reach a quiescent statewhere not more messages cross the ring

Messages pendingto cross open edge

Quiescent State

Page 73: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

73

open edgeMessages pendingto cross open edge

Quiescent State

In the quiescent state, a node can send a message only after it receives a message(thus no messages cross the ring)

Page 74: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

74

This may cause a propagation of messagesuntil the algorithm terminates

Suppose thatthe edge closes

Time t

Page 75: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

75

This may cause a propagation of messagesuntil the algorithm terminates

Time t+1

Page 76: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

76

This may cause a propagation of messagesuntil the algorithm terminates

Time t+2

Page 77: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

77

Time t+k

k k

After k time steps the affected radius is k

Page 78: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

78

Time t+x

Eventually, the ring stabilizes with a leader

Page 79: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

79

We will show, that there is an executionwith nodes such that:n

• there is an open edge

• at least messages are received )(nM

1)2( Mwhere

422)(

nnMnM

Page 80: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

80

x ybasis case 2n

If then is the leader yx x

should know about thisy

Therefore a message is sent: 1)2( M

Proof by induction

Page 81: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

81

x y

open edge

The message can be sent on one edge

Page 82: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

82

The case 2n From induction hypothesis, we have an execution:

2n

2n

M

openedge

Messages sent

nodes

Page 83: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

83

The case 2n

openedges2

n2n

2n

M

2n

MMessages sent

nodes nodes

From induction hypothesis, we have an execution:

Page 84: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

84

Observation:

1R 2R

If no message is sent along

then ring cannotdistinguish the twoscenarios 1R

1R

(similarly for ring )2R

Page 85: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

85

2n

2n

2n

M

2n

MMessages sent

nodes nodes

Therefore, the same number of messageshave to be sent in sub-rings

True open edge

True open edge

Page 86: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

86

max id

1R 2R

All nodes in should learn about

x

2R x

(assume that max id is in )1R

open edge

open edge

Page 87: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

87

max id

1R 2R

All nodes in should learn about

x

2R x

Thus, after the open edges close,at least

2n

messages are sent

2n

(At least oneof these is sent)

Page 88: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

88

max idx

Suppose edges close at timet

At least one message is sent

Page 89: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

89

max idx

time 1t

At least one message is sent

Page 90: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

90

max idx

time 2t

At least messages have been sent since2 t

Page 91: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

91

max idx

time kt radius k

At least messages have been sent sincek t

Page 92: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

92

max idx

time4n

t

radius 4n

At least messages have been sent since4n t

Independent areas

Page 93: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

93

max idx

time4n

t

radius 4n

At least messages have been sent in one area

8n

Independent areas

8n

Messages

Page 94: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

94

max idx

time4n

t

radius 4n

open edge

Since areas are independent, we could haveclosed only one edge

8n

Messages

Page 95: 1 Leader Election in Rings. 2 A Ring Network 3 1 1 1 1 11 1 1 2 2 2 2 2 2 2 2 Sense of direction left right.

95

max idx

time4n

t

radius 4n

open edge

8n

Messages

2n

M

2n

M

Induction Hypothesis

)log(82

2)( nnnn

MnM

Total Messages


Recommended