Question:medium

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

Show Hint

Banker's algorithm is deadlock avoidance not prevention, and assignment edges in a resource allocation graph go from resource to process, not process to resource; these two claims are false.
Updated On: Jul 7, 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

The Correct Option is A, C

Solution and Explanation

The question asks which claims about deadlocks are wrong, so test each one against standard OS deadlock theory.

Banker's algorithm: it examines each resource request in advance and only grants it if the system remains in a safe state afterward. This dynamic, request-time checking is the definition of deadlock avoidance, a different technique from deadlock prevention which statically removes one of the four necessary conditions. Calling Banker's algorithm a prevention method is incorrect, so this statement is false.

Hold-and-wait removal: the four necessary conditions for deadlock are mutual exclusion, hold-and-wait, no preemption, and circular wait. If a system design guarantees hold-and-wait never occurs, for instance a process must request every resource it will ever need before starting, deadlock cannot form. This statement correctly describes a prevention strategy, so it is true.

Resource allocation graph edges: by convention, an edge process to resource represents a pending request, while an edge resource to process represents an assignment already made. The given statement swaps these, calling a process-to-resource edge an assignment edge, so it is false.

Safe state: a state is safe precisely when some sequence exists in which every process can eventually obtain all resources it needs and finish, which by definition rules out deadlock. So this statement is true.

The two false statements are the one about Banker's algorithm and the one about assignment edges, options A and C.

Was this answer helpful?
0


Questions Asked in GATE CS exam