Title: Leader Election
1Leader Election
2Outlines
- Introduction to leader election
- Complete Topology
- Logical Ring Topology
- Tree Topology
- Secure Extrema Finding Algorithm (SEFA)
- References
3What is leader selection?
- The existence of a centralized controller greatly
simplifies process synchronization - However, if the central controller breaks down,
the service availability can be limited - The problem can be alleviated if a new controller
(leader) can be chosen
4When do we need leader election?
- 1. The initiation of a system of processes
- 2. When an existing leader fails
- (The detection of failures is normally based on a
time-out mechanism)
5Two Types of Election Criteria
- 1. a leader election can be based on a global
priority. This type of election is called
extrema finding. (Every node has a fixed
evaluation value) - 2. processes in the group can vote for a leader
based on a nodes preference, its called a
preference-based leader election algorithm.
6Leader Election vs. Mutual Exclusion
- In many aspects, leader election and mutual
exclusion are the same they both try to reach an
agreement for identifying a unique process - However, there are some differences
7Leader Election vs. Mutual Exclusion
- The two major differences are
- A mutual exclusion must ensure that no process is
starved, while a leader election is more
concerned with the fast and successful
termination of the election process - Another distinction is that the result for leader
election need to be announced to all processes
8Outlines
- Introduction to leader election
- Complete Topology
- Logical Ring Topology
- Tree Topology
- Secure Extrema Finding Algorithm (SEFA)
- References
9Complete Topology
- In a complete topology, each process in the group
can reach any other process in the same group in
one message hop. - Each process as a global priority, and the
highest-priority is elected leader
10The Bully Algorithm
- Its a extrema-finding algorithm
- A process starts a leader election if it suspects
that the coordinator has failed. - If a process Pheavy receives an election message
from a lighter process Plight, it sends a
take-over message to Plight. Plight is out of the
race. - If a process doesnt get a take-over message
back, it wins, and sends a victory message to all
other processes.
11The Bully Algorithm
The bully election algorithm Process 4 holds an
election Process 5 and 6 respond, telling 4 to
stop Now 5 and 6 each hold an election
12The Bully Algorithm
- Process 6 tells 5 to stop
- Process 6 wins and tells everyone
13Outlines
- Introduction to leader election
- Complete Topology
- Logical Ring Topology
- Tree Topology
- Secure Extrema Finding Algorithm (SEFA)
- References
14Logical Ring Topology
- A logical ring is easy to construct and offers
the unique property that a message initiated by
any node will return to the node, indicating
completion of a round of broadcast
15Leader Election
- Initiation
- A process sends an ELECTION message to its
successor (or next alive process) with its ID - Each process adds its own ID and forwards the
ELECTION message - Leader Election
- Message comes back to initiator
- Initiator announces the winner by sending
another message around the ring
16Ring Algorithm Initiation
17Ring Algorithm - Election
18Outlines
- Introduction to leader election
- Complete Topology
- Logical Ring Topology
- Tree Topology
- References
19Tree Topology
- To construct a logical ring structure is easy if
the underlying network supports broadcast
facilities - However, in Ad Hoc networks, user mobility may
results in frequent leader election, making the
process a critical component of system operation
20Leader election in Ad Hoc networks
- Most of the leader election algorithms for mobile
ad hoc networks elect a random leader and hence
are not extrema-finding - SEFA (Vasudevan S., 2003) is a round-based
hierarchy-building approach which also considered
secure problem - Good reviews can be found in 3(G. Tel. 2000)
and 4(N.Lynch 1996)
21Secure Extrema Finding Algorithm (SEFA)
- SEFA is an extrema-finding algorithm in which all
nodes use a Common Election Algorithm (CEA) to
determine their rank - Decision factors might include node identity,
battery lifes, or level of trustetc - Larger the CEA value, the more desirable the
node is a leader
22Algorithm Example
23Algorithm Example
24(No Transcript)
25Outlines
- Introduction to leader election
- Complete Topology
- Logical Ring Topology
- Tree Topology
- Secure Extrema Finding Algorithm (SEFA)
- References
26References
- Chow, Randy, et. al.,Distributed Operating
Systems Algorithms, Addison Wesley, March 18,
1997 - Vasudevan, S. DeCleene, B. Immerman, N.
Kurose, J. Towsley, D. Leader election
algorithms for wireless ad hoc networks, DARPA
Information Survivability Conference and
Exposition, 2003. Proceedings - G. Tel. Introduction to Distributed Algorithms.
Second Edition, 2000. Cambridge University Press - N.Lynch Distributed Algorithms. 1996, Morgan
Kaufmann Publications - V. Park and M. Corson. A Highly adaptive
Distributed Routing Algorithm for mobile Wireless
Networks. In proceediing of IEEE INFOCOM, April
1997
27Thank You