首页 > 试题广场 >

Derive an election algorithm f

[问答题]
Derive an election algorithm for bidirectional rings that is more efficient than the one presented in this chapter.How many messages are needed for n processes?
推荐

The following algorithm requires O (n log n )messages.Each node operates in phases and performs:

If a node is still active,it sends its unique node identifier in both directions.


In phase k,the tokens travel a distance of 2k and return back to their points of origin.


A token might not make it back to the originating node if it encounters a node with a lower unique node identifier.


A node makes it to the next phase only if it receives its tokens back from the previous round.


The node with the lowest unique node identifies is the only that will be active after log n phases.

发表于 2018-03-25 10:14:51 回复(0)