Question: 2.32 Consider the following concurrent program: int s = 1; process foo(i = 1 to 2) { while (true) { (await (8 > 0) s

 2.32 Consider the following concurrent program: int s = 1; process

2.32 Consider the following concurrent program: int s = 1; process foo(i = 1 to 2) { while (true) { (await (8 > 0) s = s-1;) Sii (s = 8+1;) Chapter 2 Processes and Synchronization Assume s, is a statement list that does not modify shared variable s. (a) Develop proof outlines for the two processes. Demonstrate that the proofs of the processes are interference-free. Then use the proof outlines and the method of exclusion of configurations in Section 2.8 to show that s, and s, cannot execute at the same time and that the program is deadlock-free. (Hint: You will need to introduce auxiliary variables to the program and proof outlines. These variables should keep track of the location of each process.) (b) What scheduling policy is required to ensure that a process delayed at its first await statement will eventually be able to proceed? Explain. 2.32 Consider the following concurrent program: int s = 1; process foo(i = 1 to 2) { while (true) { (await (8 > 0) s = s-1;) Sii (s = 8+1;) Chapter 2 Processes and Synchronization Assume s, is a statement list that does not modify shared variable s. (a) Develop proof outlines for the two processes. Demonstrate that the proofs of the processes are interference-free. Then use the proof outlines and the method of exclusion of configurations in Section 2.8 to show that s, and s, cannot execute at the same time and that the program is deadlock-free. (Hint: You will need to introduce auxiliary variables to the program and proof outlines. These variables should keep track of the location of each process.) (b) What scheduling policy is required to ensure that a process delayed at its first await statement will eventually be able to proceed? Explain

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 Databases Questions!