COMP3140 - Distributed Computing Spring 2002 Project 3 - Leader election on a ring Write a class KingOfTheRing (and othe

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

COMP3140 - Distributed Computing Spring 2002 Project 3 - Leader election on a ring Write a class KingOfTheRing (and othe

Post by answerhappygod »

Comp3140 Distributed Computing Spring 2002 Project 3 Leader Election On A Ring Write A Class Kingofthering And Othe 1
Comp3140 Distributed Computing Spring 2002 Project 3 Leader Election On A Ring Write A Class Kingofthering And Othe 1 (55.51 KiB) Viewed 53 times
COMP3140 - Distributed Computing Spring 2002 Project 3 - Leader election on a ring Write a class KingOfTheRing (and other classes as needed) that implements the O(n log n) message complexity leader election algorithm described in class for a bidirectional ring of processors. The processor with maximum identity should be elected as the leader. All the processors initiate the algorithm simultaneously. - You have to use the package tr.edu.isikun.comp3140.distributednetwork w/o modifications. You are encouraged to examine the classes ErrorFreeBoomRevised and Communication Network published in github. Input The input to KingOfTheRing consists of a sequence of integers. - The first integer is the number n of processors in the ring. - The next n integers are the identities of the processors. Output At the end of the algorithm every processor outputs the following The leader prints <id>: I AM THE LEADER and then it invokes CommunicationLink.printStatistics() that will add its output. Every other processor prints <id>: The leader is <leader_id> Where <id> stands for the id of the processor and <leader_id> stands for the id of the leader. YOU SHOULD NOT PRINT ANYTHING ELSE TO THE OUTPUT.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply