Question: Assume there are two processes P1 and P2 designed as follows and they are launched on a single CPU system. Variables a, b, c, d

Assume there are two processes P1 and P2 designed as follows and they are launched on a single CPU system. Variables a, b, c, d are global variables. P1 P2 L5: L1: a--; a ++; L2: b++; L6: b--; L3: L7: d++; C++; L8: L4: If the two processes are executed alternatively (e.g., run P1 completely then run P2, after P2 completes, schedule to run P1, and so on) and initially a=0, b=0, c=0, and d=0, then what will be the values for those variables after each process runs 10 times? a. c=10, d=10, but a, b are not determined since there are race conditions. b. a=5, b=5, d=10, d=10 C. a=0, b=0, c=10, d=10 d. a=10, b=10, c=10, d=10 e. a=5, b=5, c=5, d=5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
