Two algorithms for leader election in unidirectional ring are presented using roughly synchronized clocks. It is assumed that each of the processors in the network has a physical clock which is roughly synchronized with all other processors' physical clocks. The election messages with timestamp are circulated around an unidirectional ring to elect the leader. The leader is elected even if the processors fail during the election process. The algorithms also work correctly even if the clock synchronization fails. The nodes in the ring initiate the election algorithm over a time period T and the different initiation times of the nodes are used as timestamp of election messages to obtain better average case message complexity. The average case message complexities of the proposed algorithms are better than that of Chang and Roberts' algorithm for most of the node arrangements in the ring. The two algorithms have O(n~2) and O(n log n) as the worst case message complexity respectively. The algorithms are simulated sequentially for different ring size by varying the initiation times as well as the arrangement of nodes. The worst case time taken by the algorithms is 2nσ, where n is the number of nodes in the ring and σ is the maximum communication delay between any two adjacent nodes.
展开▼
机译:使用大致同步的时钟提出了单向环中的引导射门的两个算法。假设网络中的每个处理器具有与所有其他处理器的物理时钟大致同步的物理时钟。具有时间戳的选举消息围绕一个单向振铃循环以选举领导者。 The leader is elected even if the processors fail during the election process.即使时钟同步失败,算法也会正常工作。环中的节点在时间段T中发起选举算法,并且节点的不同启动时间用作选举消息的时间戳,以获得更好的平均案例消息复杂度。对于大多数节点布置,所提出的算法的平均案例消息复杂性优于ROCE和Roberts'算法的大多数节点。这两个算法分别具有O(n〜2)和o(n log n)作为最坏情况消息复杂性。通过改变发起时间以及节点的布置,顺序地模拟不同的环大小的算法。算法采取的最坏情况是2Nσ,其中N是环中的节点数,σ是任何两个相邻节点之间的最大通信延迟。
展开▼