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 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 CommunicationNetwork 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.
Submission Instructions
Create a zip file named 3_Proj3_<StudentID>.zip
that contains your java files only (without any other files and
subdirectories). <StudentID> stands for your student ID,
(e.g., 3_Proj3_20COMP2786.zip)
You can name your classes as you like, except the class
with the main method whose name should be PIMain.
Though it is not a good practive in general, for the
sake of the project the above class should be in the DefaultPackage
(,i.e., should not contain a package statement).
In particular, do not submit the package
tr.edu.isikun.comp3140.distributednetwork
Test your program in this site
http://193.255.146.105/homework/
Upload the zip file to Blackboard.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply