Study the
SR Program: A Race Condition.
Explain in your own words exactly how the race condition occurs.
Draw a diagram showing the interleaving of the instructions of the two
processes that leads to the race condition.
What is the role of the value of N?
Why is there a race condition when the value is 1000 but not 10?
Identify the critical section of code for each process.
Study the SR Program: A Different Kind of Race Condition. Where is the race condition here? Explain what is happening. Draw a diagram showing the interleaving of the instructions of the two processes that leads to the race condition. Identify the critical section of code for each process.