Question:medium

Which of the following statements is/are TRUE with respect to deadlocks?

Show Hint

Deadlocks can be detected by analyzing the wait-for graph. If cycles exist and each resource has only one instance, deadlock is imminent.
Updated On: Jan 30, 2026
  • Circular wait is a necessary condition for the formation of deadlock.
  • In a system where each resource has more than one instance, a cycle in its wait-for graph indicates the presence of a deadlock.
  • If the current allocation of resources to processes leads the system to an unsafe state, then deadlock will necessarily occur.
  • In the resource-allocation graph of a system, if every edge is an assignment edge, then the system is not in deadlock state.
Show Solution

The Correct Option is A, D

Solution and Explanation

Let us examine each option using standard deadlock theory concepts.

Option (A) – True:
Circular wait is one of the four necessary conditions for deadlock (the others being mutual exclusion, hold and wait, and no preemption). In a circular wait, each process in a set is waiting for a resource held by another process in the same set, forming a cycle. Without circular wait, deadlock cannot occur. Hence, this statement is true.

Option (B) – False:
A cycle in a wait-for graph does not necessarily imply deadlock when resources have multiple instances. In such cases, even if a cycle exists, resources may still be allocated in a way that allows processes to proceed. A cycle guarantees deadlock only when each resource type has a single instance. Therefore, this statement is false.

Option (C) – False:
An unsafe state does not automatically imply deadlock. An unsafe state only indicates that the system cannot guarantee a safe execution sequence for all processes. Deadlock may or may not occur depending on future resource requests and scheduling. Hence, this statement is false.

Option (D) – True:
If a resource-allocation graph contains only assignment edges (from resources to processes) and no request edges, then no process is waiting for a resource. Since deadlock requires circular waiting involving request edges, deadlock cannot occur in this situation. Thus, this statement is true.

Final Answer:
The correct options are (A) and (D).
Was this answer helpful?
0