Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

1. What are the pros and cons of diversity for an organisation?

Answered: 1 week ago

Question

1. Explain the concept of diversity and equality in the workplace.

Answered: 1 week ago