Question:

With respect to deadlocks in an operating system, which of the following statements is/are FALSE?

Show Hint

Separate prevention (statically ruling out one of the four Coffman conditions) from avoidance (Banker's algorithm, dynamic safe-state checking), and remember a resource-allocation-graph assignment edge always points from the resource to the process holding it, not the other way round.
Updated On: Jul 22, 2026
  • Banker's algorithm is used to prevent deadlocks
  • Deadlock formation can be prevented by ensuring that the hold and wait condition is not allowed
  • An assignment edge in a resource allocation graph is marked from a process to a resource
  • A safe state guarantees that all processes can finish without formation of a deadlock
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is A, C

Solution and Explanation

Step 1: Distinguish deadlock prevention from deadlock avoidance.
Deadlock prevention works by statically ruling out at least one of the four Coffman necessary conditions (mutual exclusion, hold-and-wait, no preemption, circular wait) so a deadlock structurally cannot arise. Deadlock avoidance instead lets processes request resources dynamically but only grants a request if the resulting state is still "safe" (there exists some order in which all processes can still finish). These are two distinct strategies in the standard operating systems curriculum.

Step 2: Evaluate option (A): "Banker's algorithm is used to prevent deadlocks".
Banker's algorithm is the textbook example of a deadlock avoidance technique: before granting a resource request it simulates the allocation and checks whether the system remains in a safe state, rejecting the request otherwise. It does not negate any of the four necessary conditions ahead of time, so it is not a prevention technique. Calling it a deadlock-prevention method is FALSE.

Step 3: Evaluate option (B): "Deadlock formation can be prevented by ensuring that the hold and wait condition is not allowed".
This is precisely one of the four standard prevention techniques: if a process is required to request and be granted all the resources it will ever need before it starts execution (or must release everything before requesting more), the hold-and-wait condition can never occur, so a deadlock cannot form through that condition. This statement is TRUE, so it is not one of the false statements being asked for.

Step 4: Evaluate option (C): "An assignment edge in a resource allocation graph is marked from a process to a resource".
In the standard resource allocation graph (RAG) notation, an edge drawn from a process to a resource (\(P_i \rightarrow R_j\)) is a request edge, meaning the process is asking for that resource. An edge drawn from a resource to a process (\(R_j \rightarrow P_i\)) is the assignment edge, meaning that resource instance has already been allocated to that process. The option describes the direction backwards, so this statement is FALSE.

Step 5: Evaluate option (D): "A safe state guarantees that all processes can finish without formation of a deadlock".
This is the exact textbook definition of a safe state: a state is safe if there exists at least one ordering of the processes such that each one can obtain the resources it needs (using currently available resources plus what will be freed by processes finishing earlier in the order) and run to completion. A system in a safe state is guaranteed deadlock-free. This statement is TRUE.

Step 6: Conclusion.
The false statements are (A), which mislabels an avoidance technique as prevention, and (C), which reverses the direction of the assignment edge.
\[ \boxed{\text{False statements: (A) and (C)}} \]
Was this answer helpful?
0
0

Top GATE CS Operating System Questions

View More Questions