Question: We are given three (primitive) processes P 1 , P 2 , and P 3 with shared integer variable x and local registers r 1
We are given three (primitive) processes P1, P2, and P3 with shared integer variable x and local registers r1, r2 and r3. The program of process Pi is as follows:
for k := 1 to 10 do {
ri := x
ri := ri + 1
x := ri
}
That is, Pi executes ten times the assignment x := x + 1. Consider now the parallel program P = P1 || P2 || P3 with x initially being 0.
Does P have an execution that halts with the terminal value x = 2? Justify your answer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
