Election Algorithm
Election Algorithm
i.Bully Algorithm
This algorithm uses a ring for its election but does not use any
token. In this algorithm it is assumed that the processes are
physically or logically ordered so each processor knows its
successor.
When any process notices that a coordinator is not functioning, it
builds an ELECTION message containing its own process number
and sends the message to its successor. If the successor is down the
sender skips over the successor and goes to the next member along
the ring until a process is located.
At each step the sender adds its own process number to the list in
the message making itself a candidate to elected as coordinator
The message gets back to the process that started it and recognizes
this event as the message consists its own process number.
At that point the message type is changed to COORDINATOR and
circulated once again to inform everyone who the coordinator is and
who are the new members. The coordinator is selected with the
process having highest number.
When this message is circulated once it is removed and normal work
is preceded.