Difference between Ring and Bully Algorithm
Parameter |
Ring Algorithm |
Bully Algorithm |
---|---|---|
Communication Strategy |
In a ring algorithm communication between the processes takes place in the logical ring structure. |
In the bully algorithm, direct communication takes place between all the processes. |
Process of Election |
The process of election takes place by passing a message along the ring. |
The process of election takes place by directly messaging the processes with higher process ID |
Selection of new Coordinator |
In the ring algorithm, the process that has the highest ID in the ring becomes the new Coordinator. |
In the bully algorithm, the process that has the highest ID among the responding processes becomes the new Coordinator |
Response Mechanism |
In the ring algorithm, the message is being forwarded or it responds with a higher ID. |
In the bully algorithm, one process responds to another by sending an “OK” message |
Complexity |
The ring algorithm is less complex. |
The bully algorithm is more complex than the ring algorithm. |
Scalability |
The ring algorithm is more scalable when the number of processes is small. |
The bully algorithm can work well when the number of processes is more. |
Fault Tolerance |
The ring algorithm can be affected when the ring is broken. As there will be no complete message passing and communication between the processes. |
The bully algorithm can handle such faults as the communication takes place directly between two different available processes |
Utilization of Resources |
The ring algorithm requires fewer resources for communication because the messages are being shared among the processes connected in the ring. |
Bully Algorithm increases the communication overhead because the messages are being sent directly from one process to another. |
Difference Between Ring and Bully Algorithm
Election algorithms are required in order to select the coordinator. A distributed algorithm consists of many working processes. These distributed algorithms require a process that acts like a coordinator. This coordinator can be any of the working processes that organize the actions. When a coordinator fails the election algorithms are required to find the coordinating process.
Election Algorithms have two assumptions such as:
- Each process that is involved has a unique identification number.
- Each process knows the identification number of every other process.
Contact Us