Jump to content

Bully algorithm

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Canthony (talk | contribs) at 16:20, 4 May 2005. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

The bully alorithm is a method in distributed computing for dynamically selecting a coordinator by process ID number.

When a process P determines that the current coordinator is down because of message timeouts or failure of the coordinator to initiate a handshake, it:

  1. Broadcasts an election message to all other processes.
  2. If P hears from no process with a higher process ID than it, it wins the election and broadcasts victory.
  3. If P hears from a process with a higher ID, P waits a certain amount of time for that process to broadcast itself as the leader. If it does not receive this message in time, it re-broadcasts the election message.

Note that if P receives a victory message from a process with a lower ID number, it immediately initiates a new election. This is how the algorithm gets it's name - a process with a higher ID number will bully a lower ID process out of the coordinator position as soon as it comes online.

References