CS 551: Distributed Operating Systems
A Token Ring Election Algorithm

A Token Ring Election Algorithm

by Chang & Roberts

Each process has a unique id.
    Each process knows its successor in the ring.

When a process notices the leader is down,
    it sends an election message to its successor.

If the successor is down,
    the originating process sends the message
        to the next process in the logical ring.

Each process that receives an election message,
    passes it on to the next process in the ring.
Each sender appends its own id to the message.

The election message eventually returns
    to the originating process
        and contains its id.

At this point, the election message is changed
    to a coordinator (new leader) message
        and sent around ring.
The process with the highest id
    in the circulated election message
        becomes the new leader.

When the coordinator message comes back
    to the originating process, it is deleted.

Copyright © 2001-2003: Colorado State University for CS 551. All rights reserved.