The LeLann, Chang and Roberts algorithm for Leader Election in a
Synchronous Ring Network
Each Process sends its identifier around the ring. When a Process
receives an incoming identifier, it compares that identifier to its own.
If the incoming identifier is greater than its own, it keeps passing the
identifier; if it is less than its own, it discards the incoming
identifier; if it is equal to its own, the Process declares itself the
leader.
|
|
|
|
|
trans_i(self,
p,
msgs)
Determines what state transition a Process, p, will perform, having
received messages, msgs |
source code
|
|
|
|
cleanup_i(self,
p)
Determines what final state transition a Process, p, will perform,
after the algorithm terminates. |
source code
|
|
|
Inherited from distalgs.Synchronous_Algorithm:
execute,
msgs,
print_algorithm_terminated,
round,
run,
trans
Inherited from distalgs.Algorithm:
__call__,
__init__,
cleanup,
count_msg,
delete,
get,
halt,
halt_i,
has,
increment,
output,
set
|