Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1.
2.
3.
4.
5.
6.
I.
INTRODUCTION
183
1.
2.
3.
4.
5.
A. Bully Algorithm
In Bully Algorithm, when the system is initialized, node
with highest id is elected as current coordinator. When any
random node detects the failure of current coordinator, it
waits for a timeout period after which it starts the election
algorithm [1].
1
3
Election
Election
Election
5
(b)
(a)
1
1
6
6
OK
E
3
OK
E = Election
6
Check Exist
OK
(a)
(b)
(c)
(d)
1
6
C
OK
2
3
5
(e)
GRANT
PROPOSAL
4
3
OK
C
2
3
C = Coordinator
7
6
2
5
3
5
(c)
(d)
(f)
ACCEPT
Coordinator
C
2
(e)
(f)
MESSAGE
TYPE
FUNCTION
PROPOSAL
VERIFY
IS_ALIVE
NOTIFY
ACCEPT
ELECTION
STOP
ALERT
1.
2.
3.
4.
QUERY
5.
FREE
6.
A. Algorithm
B. Procedure
Node id
Priority
6
1
2
2
1
3
4
4
3
5
185
5
6
7
7
3.
4.
5.
COORDINATOR
COORDINATOR
CO-COORDINATOR
CO-COORDINATOR
3 PROPOSAL 2
(a)
(b)
CASE 1:
/* A node detects that leader node is crashed and starts the Election
Procedure. */
Election (VERIFY, PROPOSAL, NOTIFY, ACCEPT, IS-ALIVE,
COORDINATOR-ALIVE)
{
Detector node sends the PROPOSAL message to the co-coordinator.
If (co-coordinator is alive)
Then Co-coordinator sends VERIFY message to the coordinator
and waits
If (time-out)
Calls COORDINATOR-SELECTION
(next
priority node)
/*for selecting new co-coordinator it
checks its priority list and picks the one with next
highest priority */
End If
Else
Sends COORDINATOR-ALIVE message to
detector node to stop the election}
End Else
End If
}
COORDINATOR
COORDINATOR
4
IS_ALIVE
VERIFY
CO-COORDINATOR
(d)
(c)
NEW CO-COORDINATOR
COORDINATOR
COORDINATOR
NOTIFY
ACCEPT
5
CO-COORDINATOR
(e)
NEW
(f)
2.
3.
4.
5.
186
4.
5.
60
Distance(Y-axis)
50
5
4
40
1
Coordinator
30
Centroid
2
Co-coordinator
20
10
6
7
0
-10
-10
10
20
30
40
Distance(X-axis)
50
60
D. Possible Cases
2.
Nodes
Bully
Algorithm
(no. of
Messages)
10
100
1000
45
4950
499500
Consensus
Based Election
Algorithm
(no. of
Messages)
36
351
3501
Bully
Consensus
LCE
Algorithm
(no. of
Messages)
REFERENCES
21
201
2001
[1]
Proposed
1000000
No. of Messages
100000
10000
1000
100
10
1
10
100
1000
Number of Nodes
Fig. 6. Number of messages passed with different number of nodes.
188