GATE / CS ARCHIVE

GATE CSE 2015 SET 3 / QUESTION 45

GATE CSE 2015 Set 3 Q45

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

GATE 2015 Set 3, Q45 2 marks · MCQ
Report issue

Deadlocks

Question 45, GATE 2015: For mutually exclusive resources, which policies can prevent deadlock? I: A process acquires all resources at the start; if any is unavailable, it releases those acquired so far. II: Resources have unique numbers and requests occur only in increasing number order. III: Resources have unique numbers and requests occur only in decreasing number order. IV: Resources have unique numbers and a process may request only a resource numbered higher than all resources it currently holds. Options: (A) any one of I and III, but not II or IV; (B) any one of I,III,IV, but not II; (C) any one of II and III, but not I or IV; (D) any one of I,II,III,IV.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

1. I removes hold-and-wait by releasing partial acquisitions if all cannot be obtained.

2. II and III each impose a strict global resource order, excluding circular wait. IV likewise permits only requests larger than every held resource, so any wait cycle would require strictly increasing numbers around a loop, impossible. Each policy individually prevents deadlock, D; this does not promise starvation freedom.

Original paper, page 69 · Answer key