GATE / CS ARCHIVE

GATE CSE 2014 SET 3 / QUESTION 31

GATE CSE 2014 Set 3 Q31

Operating Systems · Deadlocks · Full GATE CSE 2014 Set 3 paper

GATE 2014 Set 3, Q31 2 marks · NAT
Report issue

Deadlocks

Question 31, GATE 2014: Three programs each require three tape units to operate. What is the minimum number of tape units that guarantees no resource deadlock?
Tap to enlarge
Answer & solution

Official answer: 7

Step 1: Exhibit a deadlock with six units: each program holds two and waits for a third, leaving no free unit and no program able to finish. Thus six is insufficient. Step 2: With seven units, if no program yet holds its full requirement, each holds at most two and together they hold at most six. At least one unit remains available to let some program reach three and finish. Step 3: Its release permits the others to progress. Hence the minimum is 3(3−1)+1=7 under the usual reusable-resource model, maximum demand of three, and eventual completion/release once the demand is met.

Original paper, page 60 · Answer key