



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




(Total Points Possible: 100)
Process has-X has-Y max-needs-X max-needs-Y A 35 10 65 40 B 55 80 105 220 C 35 20 110 50 D 0 70 50 90
(a) available: X: 40 Y: 40 (b) available: X: 40 Y: 35
The following "code" was given in lecture to obtain mutual exclusion for a critical section. What's wrong with it? Please explain. (13)
Init: A = 0
loop: {increment A in memory, load A}, if A~=1, then {decrement A in memory}, go to loop
critical section here
{decrement memory location A}