Question:

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.
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A, D

Solution and Explanation

Let's review the options in detail:

Option (A) - True:
Circular wait is one of the necessary conditions for a deadlock. A circular wait occurs when a set of processes are each waiting for a resource that the next process in the cycle holds, creating a deadlock scenario. Therefore, circular wait is necessary for deadlock formation, though not sufficient on its own (other conditions like mutual exclusion, no preemption, and hold and wait are also required).

Option (B) - False:
A cycle in the wait-for graph does not necessarily indicate a deadlock if each resource has more than one instance. If there are multiple instances of resources, the system may be able to allocate resources such that the processes in the cycle do not get stuck. A cycle is only indicative of a potential deadlock in a single-instance resource allocation scenario.

Option (C) - False:
If the system enters an unsafe state, it does not necessarily mean that deadlock will occur. An unsafe state simply means that there is no guarantee of the processes completing without waiting indefinitely. However, deadlock may or may not occur, depending on how the processes execute.

Option (D) - True:
In a resource-allocation graph, if every edge is an assignment edge (from resource to process), then there cannot be a cycle involving resource requests. This ensures that deadlock cannot occur, because there are no circular dependencies between resources and processes. If there were request edges, deadlocks could potentially form through circular waiting. Therefore, option (D) is correct.

Thus, the correct answers are (A) and (D).
Was this answer helpful?
0
0