GATE / CS ARCHIVE

GATE CSE 1997 / QUESTION 6.7

Resource count excluding deadlock

Operating Systems · Deadlocks · Full GATE CSE 1997 paper

GATE 1997, Q6.7 2 marks · MCQ
Report issue

Deadlocks

Question 6.7, GATE 1997: Three processes each may require two units of one resource. Minimum units guaranteeing no allocation deadlock among 3, 5, 4, 6?
Tap to enlarge
Your answer
Answer & solution

Answer: C: 4 (no official key was published)

With only three units, each process can hold one and wait for a second, creating deadlock. With four units, if all unfinished processes hold at most one, at least one unit remains available to give some process its second. It can finish and release its units, after which the argument repeats. Therefore four is sufficient and three can fail, so C. This is the standard worst-case incremental-allocation guarantee with eventual completion and no other resources; a restrictive admission policy could safely serialize processes with fewer units.

Original paper, page 6