Leader Election Breaking the symmetry in a system
Leader Election Breaking the symmetry in a system
Ring based leader election n n The network is known to be a ring Ring size is unknown
Chang-Robert’s algorithm n n Every process sends an election message with its id to the left process if it has not seen a message from a higher process Forward any message with an id greater than own id to the left If a process receives its own election message it is the leader It then declares itself to be the leader by sending a leader message
Chang Roberts Leader Election n Worst case message complexity Best case Worst case
Hirschberg-Sinclair algorithm n n n Assume ring is bidirectional Carry out elections on increasingly larger sets Algorithm works in asynchronous rounds Only processes that win the election in round r can proceed to round r+1 Algorithm: Pi is the leader in round r iff it has the largest id of all nodes that are at a distance 2 r or less from Pi
Hirschberg-Sinclair algorithm n Initially: q n Round 0: q n 7, 8 are leaders Round 2: q n 6 , 7 and 8 are leaders Round 1: q n All processes are leaders 8 is the only leader At most log(N) rounds
Election on general graphs n n Totally connected graph – all nodes are mutually connected Homework assignment: q q Give a randomized algorithm to elect a leader Analyze its message and time complexity
- Slides: 7