Leader Election =============== From control point of view, many algorithms that are called distributed are in fact centralized: there is a single co-ordinating process that performs certain functions on behalf of the others. Such an algorithm , like any centralized algorithm , suffers from the great disadvantage that a failure of the co-ordinating process results in the failure of the algorithm as a whole. This can be overcome by the remaining processes conducting a negotiation among themselves with the aim of electing one of their number to take over the role of co-ordinator. The protocols associated with such negotiations are called elective algorithms. These are based on the assumption that each process has a unique identifier , taking the form of a number. If the convention is adopted that at any instance the co-ordinating process is the one with the largest identifier , then after a failure of this process the elective protocol consists in choosing the process with the largest of the remaining numbers. The elective algorithm of this example applies to the case where the processes are linked in a unidirectional ring. Each process Pi has a unique numerical identifier. The principle is is simply one of of finding the maximum of a set of numbers asociated with the processes. The processes can be arranged in any order around the ring. Each process Pi "knows" the value of its own identifier i , which it transmits to its neighbour on the left , Pj say. Pj then compares this with its own identifier j and transmits the greater to its left-hand neighbour: this is the "selective extinction" method. The election starts with one process sending such a message and marking itself as taking part in the election - at this stage it will be the only one so markerd. The unmarked process receiving the message will act as just described and mark itself as participant. When a marked (i.e. - participating) process receiving its own identifier it knows that this must be the greatest and that therefore it is elected to play the special role.