Question: Problem 2 . ( Asynchronous Processes ) [ 2 5 points ] For this problem, we ex - pect you to explain your answers (

Problem 2.(Asynchronous Processes)[25 points] For this problem, we ex-
pect 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) mod 3; y:=0; z:=0
T2 : true --> y :=(y+1) mod 3
T4 : (z =1)--> x :=2;
(a)[5 points] Can there be an execution where x+y=4? If yes, what is it? If
no, why not?
(b)[5 points] Can there be an execution where x+y+z=6? If yes, what is
it? If no, why not?
(c)[5 points] How many distinct states are reachable from initial state
(d)[10 points] 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.
Problem 2 . ( Asynchronous Processes ) [ 2 5

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!