Election in Distributed Systems
Many distributed algorithms require one process to act as coordinator, initiator, sequencer, or to perform some other special role. In the centralized mutual exclusion algorithm, one process is elected as the coordinator. For instance, the process running on the machine with the highest network address might be selected. Whenever a process wants to enter a critical region, it sends a request message to the coordinator stating which critical region it wants to enter and asking for permission. If no other process is currently in that region, the coordinator sends back a reply granting permission.
It does not matter which process takes on this special responsibility of coordinator, but one of them has to do it. In general, election algorithms attempt to locate the process with the highest process number and designate it as coordinator. The algorithms differ in the way they specify the location. We assume that every process knows the process number of every other process. What the processes do not know is which ones are currently up and which ones are currently down. The goal of election algorithm is to ensure that when an election starts, it concludes with all processes agreeing on who the new coordinator is to be.