Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Three people, P 1 , P 2 , and P 3 , want to find the earliest meeting date d . Each P is available

Three people, P1, P2, and P3, want to find the earliest meeting date d. Each P is available every ai days starting from day bi (0= bi ai), i.e., Pi s available days are bi, ai + bi,2ai + bi,...
Let fi be a function that maps the (current) candidate date t to Pis earliest available date on or after t. Clearly, fi(t)>= t, and fi(u)!= u holds for all u such that t = u fi(t).
To find the earliest meeting date d, they (who dont know the other peoples ai and bi) start communication using a ring of message channels (see figure). They have no other means of communication (such as shared global variables).
Each Pi locally holds his/her own candidate date di whose initial value is 0(representing today), and asynchronously and repeatedly performs the following:
-update di to his/her earliest available date fi(di) and send it to the next person,
-receive the previous persons candidate date dj and update di to dj if dj>di.
(Note: if you think the above rules are underspecified or inaccurate, you may refine them as necessary.)
Anybody can start communication independently.
The communication can terminate when all the Pis realize that no further updates of di will be made.
Q1 Describe the above algorithm in Promela and test it with a1=5, a2=6 and a3=7. For bi, we know that 0= bi =4 for each i but not their exact values. Use the verification mode to figure out
(i) the largest possible value of the earliest meeting date d and
(ii) which bis lead to that meeting date.
Q2How can each Pi notice that no further updates of di will be made
(and communication can be stopped)? Design and implement a termination mechanism and verify that the algorithm always terminate(with a1=5, a2=6 and a3=7).
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

What are the assumptions of the test based on the ????-ratio?

Answered: 1 week ago