Académique Documents
Professionnel Documents
Culture Documents
Module-6
Any process pi that discovers the old coordinator has failed initiates an
“election” message that contains pi ’s own identifier.And marks itself as a
participant. This is the initiator of the election.
When a process pi receives an election message, it compares the identifier in
the message with its own identifier.
If the arrived identifier is greater, pi forwards the message.
If the arrived identifier is smaller and pi has not yet a participant of this election message, it
the overwrites message with its own identifier, and marks itself as participant and forwards
the message.
If the arrived identifier matches that of pi, then pi’s identifier must be the greatest , and it
becomes the new coordinator. This process then sends an “elected” message to its neighbor
with its id, announcing the election result.
When a process pi receives an elected message, it
sets its variable electedi id of the message.
Marks itself as non- participant and
forwards the message to its neighbor.
25-12-2019 Jyotsna A. , Assistant Professor, CSE, RSET 19
25-12-2019 Jyotsna A. , Assistant Professor, CSE, RSET 20
25-12-2019 Jyotsna A. , Assistant Professor, CSE, RSET 21
25-12-2019 Jyotsna A. , Assistant Professor, CSE, RSET 22
25-12-2019 Jyotsna A. , Assistant Professor, CSE, RSET 23
25-12-2019 Jyotsna A. , Assistant Professor, CSE, RSET 24
25-12-2019 Jyotsna A. , Assistant Professor, CSE, RSET 25
25-12-2019 Jyotsna A. , Assistant Professor, CSE, RSET 26
25-12-2019 Jyotsna A. , Assistant Professor, CSE, RSET 27
25-12-2019 Jyotsna A. , Assistant Professor, CSE, RSET 28
25-12-2019 Jyotsna A. , Assistant Professor, CSE, RSET 29
25-12-2019 Jyotsna A. , Assistant Professor, CSE, RSET 30
25-12-2019 Jyotsna A. , Assistant Professor, CSE, RSET 31
Ring-Based Election: Analysis
33
The worst-case scenario occurs 17
when the counter-clockwise neighbor
has the highest identifier. 4
24