Which of the following statements is/are with respect to deadlocks?
View worked solution
Answer: A;D
Let us analyze each statement individually to determine its correctness:
-
Statement A: True
According to Coffman's conditions, there are four necessary conditions for a deadlock to occur: Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait. Since all four must hold simultaneously, Circular Wait is indeed a necessary condition. -
Statement B: False
In a system with multiple instances of resources, a cycle in the resource-allocation graph (or wait-for graph) is a necessary but not sufficient condition for deadlock. It is possible that a process outside the cycle holds an instance of the resource and eventually releases it, breaking the potential deadlock. -
Statement C: False
An unsafe state is not the same as a deadlock state. An unsafe state merely means that the system cannot guarantee that all processes will finish without deadlocking if they all request their maximum resource claims. However, if processes do not request their maximum claims or release resources early, the system can run to completion without deadlocking. -
Statement D: True
In a resource-allocation graph, there are two types of edges:- Request edges (): Process is waiting for resource .
- Assignment edges (): Resource is allocated to process .
Thus, the correct statements are A and D.
Free practice · Your answers on this page are not saved.
