Skip to main content

GATE CSE 2022Operating System › Deadlocks & Resource AllocationVerified

GATE CSE 2022 PYQ: Which of the following statements is/are TRUE \text{TRUE} TRUE with respect to deadlocks?

Which of the following statements is/are TRUE\text{TRUE} with respect to deadlocks?

  1. A
    Circular wait is a necessary condition for the formation of deadlock.
    Correct answer
  2. B
    In a system where each resource has more than one instance, a cycle in its wait-for graph indicates the presence of a deadlock.
  3. C
    If the current allocation of resources to processes leads the system to unsafe state, then deadlock will necessarily occur.
  4. D
    In the resource-allocation graph of a system, if every edge is an assignment edge, then the system is not in deadlock state.
    Correct answer

Answer

(A, D) Circular wait is a necessary condition for the formation of deadlock.; In the resource-allocation graph of a system, if every edge is an assignment edge, then the system is not in deadlock state.

Approach

Check each statement against the standard necessary conditions for deadlock and the definitions of wait-for graph, unsafe state, and resource-allocation graph edges.

Only A and D are true; B fails due to multi-instance wait-for graph insufficiency, C confuses unsafe state with actual deadlock.

Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.