Presentation is loading. Please wait.

Presentation is loading. Please wait.

Leader Election Bernard Chen.

Similar presentations


Presentation on theme: "Leader Election Bernard Chen."— Presentation transcript:

1 Leader Election Bernard Chen

2 Outlines Introduction to leader election Complete Topology
Logical Ring Topology Tree Topology Secure Extrema Finding Algorithm (SEFA) References

3 What 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

4 When 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)

5 Two 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 node’s preference, it’s called a preference-based leader election algorithm.

6 Leader 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

7 Leader 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

8 Outlines Introduction to leader election Complete Topology
Logical Ring Topology Tree Topology Secure Extrema Finding Algorithm (SEFA) References

9 Complete 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

10 The Bully Algorithm It’s 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 doesn’t get a take-over message back, it wins, and sends a victory message to all other processes.

11 The 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

12 The Bully Algorithm Process 6 tells 5 to stop
Process 6 wins and tells everyone

13 Outlines Introduction to leader election Complete Topology
Logical Ring Topology Tree Topology Secure Extrema Finding Algorithm (SEFA) References

14 Logical 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

15 Leader Election Initiation: Leader Election:
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

16 Ring Algorithm: Initiation

17 Ring Algorithm - Election

18 Outlines Introduction to leader election Complete Topology
Logical Ring Topology Tree Topology References

19 Tree 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

20 Leader 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)

21 Secure 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 trust…etc Larger the CEA value, the more “desirable” the node is a leader

22 Algorithm Example

23 Algorithm Example

24

25 Outlines Introduction to leader election Complete Topology
Logical Ring Topology Tree Topology Secure Extrema Finding Algorithm (SEFA) References

26 References 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, Proceedings G. Tel. Introduction to Distributed Algorithms. Second Edition, 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

27 Thank You Questions??


Download ppt "Leader Election Bernard Chen."

Similar presentations


Ads by Google