Solution for Assignment 2 

 

1. Disabling interrupts is not the best solution to the mutual exclusion problem. Explain why?

Refer to class notes.

 

2. What do we mean by "race condition" in process synchronization?

Refer to class notes.

 

3. How can you implement a counting semaphore using mutex?

Refer to class notes.

 

4. Strict Alternation and Peterson's solutions ensure mutual exclusion, but have disadvantages. Explain these advantages.

 Both have busy waiting problem. Also refer to class notes.