CS 551: Distributed Operating Systems
Token Ring Election Algorithm Example
Token Ring Election Algorithm Example
- We start with 6 processes,
connected in a logical ring.
- Process 6 is the leader,
as it has the highest number.
- Process 6 fails.
- Process 3 notices that Process 6 does not respond
So it starts an election,
sending a message containing its id
to the next node in the ring.
- Process 5 passes the message on,
adding its own id to the message.
- Process 0 passes the message on,
adding its own id to the message.
- Process 1 passes the message on,
adding its own id to the message.
- Process 4 passes the message on,
adding its own id to the message.
- When Process 3 receives the message back,
it knows the message has gone around the ring,
as its own id is in the list.
- Picking the highest id in the list,
it starts the coordinator message
"5 is the leader" around the ring.
- Process 5 passes on the coordinator message.
- Process 0 passes on the coordinator message.
- Process 1 passes on the coordinator message.
- Process 4 passes on the coordinator message.
- Process 3 receives the coordinator message,
and stops it.
Comments:
Copyright © 2001-2003:
Colorado State University for CS 551.
All rights reserved.