Leader Election in Rings - PowerPoint PPT Presentation

1 / 40
About This Presentation
Title:

Leader Election in Rings

Description:

1. Leader Election in Rings. Continued... 2. An Lower Bound. Assume we have algorithms in which: ... If then is the leader. should know about this. open edge ... – PowerPoint PPT presentation

Number of Views:376
Avg rating:3.0/5.0
Slides: 41
Provided by: costas
Category:

less

Transcript and Presenter's Notes

Title: Leader Election in Rings


1
Leader Election in Rings
  • Continued

2
An Lower Bound
Assume we have algorithms in which
  • the maximum identifier is elected leader
  • all the nodes must know the leader
  • the size of the network is not known

We will prove
at least messages are needed
3
open edge
No message is delivered on an open edge
Messages may be kept on the adjacent nodes
4
We will show, that there is an execution with
nodes such that
  • there is an open edge
  • at least messages are received

where
5
Proof by induction
The case
x
y
If then is the leader
6
open edge
The case
x
y
If then is the leader
7
The case
From induction hypothesis we have
open edge
nodes
messages
8
The case
From induction hypothesis we have
open edges
nodes
nodes
messages
9
The case
max id
All nodes in should learn about
10
The case
Possibility 1
open edge
max id
nodes
Messages are sent
11
The case
Possibility 2
max id
nodes
open edge
Messages are sent
12
The case
Worst case scenario
open edge?
max id
nodes
Messages are sent
13
The case
Worst case scenario
open edge
max id
nodes
At least messages are sent
14
The case
Worst case scenario
open edge
max id
Total messages
15
The case
Worst case scenario
open edge
max id
Total messages
16
The case
Worst case scenario
open edge
max id
Total messages
17
We can complete an execution by letting messages
traverse an open edge
open edge
max id
18
We can complete an execution by letting messages
traverse an open edge
max id
Total messages
19
An Synchronous Algorithm
is known
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

20
Round 1 ( time steps) no message sent
48
9
22
15
nodes
16
33
24
57
21
Round 2 ( time steps) no message sent
48
9
22
15
nodes
16
33
24
57
22
Round 9
new leader
48
9
22
15
nodes
16
33
24
57
23
Round 9 ( time steps) messages sent
new leader
48
9
22
15
nodes
16
33
24
57
24
Round 9 ( time steps) messages sent
new leader
48
9
22
15
nodes
16
33
24
57
Algorithm Terminates
25
Round 9 ( time steps) messages sent
new leader
48
9
22
15
nodes
16
33
24
57
Total number of messages
26
Another Synchronous Algorithm
is not known
The node with smallest id is elected leader
27
The algorithm
  • Each node injects a message at time 0
  • Message with id is transferred
  • with rate
  • Nodes which have seen smaller id
  • absord higher id messages

28
Time 1
0
0
4
2
5
6
3
1
7
29
Time 2
0
4
2
5
0
6
3
1
7
1
30
Time 3
0
4
2
5
6
3
0
1
7
1
31
Time 4
0
4
2
5
6
3
1
1
7
0
32
Time 5
0
4
2
5
6
3
1
0
7
33
Time 6
0
4
2
5
6
0
3
1
7
34
Time 8
0
0
4
2
5
6
3
1
7
35
Time 8
New leader
0
0
4
2
5
6
3
1
7
36
Message complexity
Assume leader has id
Total time of algorithm
37
Take the node with immediately higher id
Total number of messages
38
Take the node with immediately higher id
Total number of messages
39
messages
id
lower
higher
40
Total number of messages
Write a Comment
User Comments (0)
About PowerShow.com