Question: Explain in detail with diagram ( Asynchronous Processes ) We expect you to explain your answers ( for example by displaying execution traces of the

Explain in detail with diagram
(Asynchronous Processes) We expect you to explain your answers (for example by displaying execution traces of the process). Consider the following asynchronous process that has the following internal tasks:
nat x=0; y=0; z=0;
T1 : (y=2)x:=(x+1)mod3; y:=0; z:=0
T2 : true y :=(y+1)mod3
T3 : (y=1)z:=(z+1)mod3; y:=0; x:=0
T4 : (z=1)x :=2;
(a) Can there be an execution where x+y=4? If yes, what is it? If
no, why not?
(b) Can there be an execution where x+y+z=6? If yes, what is
it? If no, why not?
(c) How many distinct states are reachable from the initial state?
(d) We will now redesign the asynchronous process such that it is
impossible to reach a state where x+y+z=5, subject to:
1. You can change the guard of just one task.
2. You cannot change anything else (updates, other guards, initialization, etc.)
3. Your new process must have executions reaching a state where x+y+z=3.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!