GATE / CS ARCHIVE

GATE CSE 2022 / QUESTION 26

GATE CSE 2022 Q26

Operating Systems · Deadlocks · Full GATE CSE 2022 paper

GATE 2022, Q26 1 mark · MSQ
Report issue

Deadlocks

Question 26, GATE 2022: Select true deadlock statements: A circular wait is necessary; B with multiple instances per resource a wait-for cycle guarantees deadlock; C an unsafe allocation necessarily leads to deadlock; D if all resource-allocation edges are assignment edges, there is no deadlock.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: A,D

Circular wait is a necessary Coffman condition, so A is true. With multiple instances per resource, a cycle alone need not imply deadlock: an external holder can release an instance and let a waiting process proceed. An unsafe state means some future demands may deadlock, not that deadlock must occur, so C is false. If every resource-allocation edge is an assignment, there are no request edges and therefore no waiting cycle, making D true. Thus A, D under the usual resource-allocation interpretation of the question’s wait-for terminology.

An unsafe state lacks a guaranteed completion sequence for all declared maximum demands; it need not be currently deadlocked. Processes may request less than their maxima or release resources. Without request edges no process is represented as waiting, so assignment-only graphs cannot contain the alternating request/assignment cycle needed for deadlock.

Original paper, page 20 · Answer key