Question: 1.a. Synchronization solution should provide a lock to solve the race condition. Yet the 4 lock itself may run into a race condition. Briefly discuss.

1.a. Synchronization solution should provide a lock to solve the race condition. Yet the 4 lock itself may run into a race condition. Briefly discuss. How do operating systems solve the concurrency in accessing the lock? b. Explain how the following pseudocode works for Peterson solution. Show how the 2+3 Peterson's solutions satisfy all the following conditions? i. Mutual exclusion ii. Progress and Bounded waiting iii. do { flag[i] = true; turn = j; while (flag[j] && turn = = j); critical section flag[i] = false; remainder section } while (true); c. Fig. 1: Pseudocode for Peterson solution Briefly explain application of test_and_set & compare_and_swap 1+1 instructions for synchronization
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
