Bully algorithm: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 6:
}}
 
The '''bully algorithm''' is a programming mechanism that applies a hierachy to nodes on a system, making processesa Coordinatorprocess coordinator or Slavesslave.
This is used as a method in [[distributed computing]] for dynamically electing a [[Distributed Computing#Coordinator Election|coordinator]] by process ID number. The process with the highest process ID number is selected as the [[Distributed Computing#Coordinator Election|coordinator]].
 
==Assumptions==
 
As this algorithm is part from a system model wichthat tries to make ita fail-free system (like the solution shown in Lamport paper), we need some assumptions as the whole point offor the model is to make a distributed system, free from arbitrary failures (not from processing ones) while saving some computational costs.
 
* The system is synchronous and uses timeout for identifying process failure. (so you can have Delta and Cmax in order to calculate timeout as opposed to asynchronous systems where you can't calculate a timeout and then you can't distinguise between an omision fail on a process or a delay)
Line 18:
* Prior information about other process id's must be known. (This works as Leslie Lamport solution for Byzantine dilema, where coordinator needs a key and id for each process and where processors hierachy stipulates nodes as Generals, Commanders and Liutenants but without a key and with only coordinator and slaves)
 
Notice that this algorithm can be aplied over distributed or centrilized systems also, because processes can be located on one machine or over severals as you can make multicast calls or system calls or both if your system is hybrid (for example a multithread server working with several clients)
 
==Component calls==
Line 28:
* Coordinator message: Sent to announce the identity of the elected process
 
CompareCompared with Ring election algorithm:
* Assumes that system is synchronous
* Uses timeout to detect process failure/crash