Page 1 of 1

Only do question 3

Posted: Thu Jun 02, 2022 8:02 am
by answerhappygod
Only do question 3
Only Do Question 3 1
Only Do Question 3 1 (24.18 KiB) Viewed 12 times
do { } flag = true; turn = i; while (flag[j] && turn Critical section flag = FALSE; Remainder section = j);
Question 3. [Points 4] Three processes P1, P2, and P3 are sharing a resource R1 in a mutually exclusive manner. Using compare_and_swap instruction, show code for P1, P2, and P3 that shows the entry section and exit section (similar to the code shown in Question 1). Using this code, show a scenario if all three processes want to enter their critical sections.