0% found this document useful (0 votes)
5 views1 page

Bully Algorithm Notes-2

The Bully Algorithm is a leader election method in distributed systems that selects a coordinator based on process IDs, where a higher ID indicates higher priority. When a process detects a coordinator failure, it initiates an election by sending ELECTION messages to higher ID processes, and if no response is received, it becomes the leader. The algorithm involves sending ELECTION, OK, and COORDINATOR messages, but it can incur high message overhead.

Uploaded by

endaitsakshi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Bully Algorithm Notes-2

The Bully Algorithm is a leader election method in distributed systems that selects a coordinator based on process IDs, where a higher ID indicates higher priority. When a process detects a coordinator failure, it initiates an election by sending ELECTION messages to higher ID processes, and if no response is received, it becomes the leader. The algorithm involves sending ELECTION, OK, and COORDINATOR messages, but it can incur high message overhead.

Uploaded by

endaitsakshi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Bully Algorithm (Leader Election) – Notes

The Bully Algorithm is used in distributed systems to elect a coordinator (leader). The process is
based on process IDs (higher ID = higher priority).

Basic Idea:
- A process detects coordinator failure and starts election
- Sends ELECTION message to higher ID processes
- If no response → becomes leader
- If response received → higher process continues election

Example Diagram:
Step 1: P2 → sends ELECTION → P3, P4, P5
Step 2: P3 and P4 send OK to P2
Step 3: P3 and P4 start election
Step 4: No response from P5 (dead)
Step 5: P4 becomes coordinator
Step 6: P4 sends COORDINATOR to all

Hierarchy View:
P5 (Dead)

P4 (Coordinator)

P3

P2 (Started Election)

P1

Key Points:
- Highest ID process becomes leader
- Uses ELECTION, OK, COORDINATOR messages
- Simple but high message overhead

You might also like