IAE Academy

GATE 2026 CS1 Q.29: solution and answer

GATE 2026 · CS1Q.29 · 1 mark · MSQ

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

  1. (A)

    Banker's algorithm is used to prevent deadlocks

  2. (B)

    Deadlock formation can be prevented by ensuring that the hold and wait condition is not allowed

  3. (C)

    An assignment edge in a resource allocation graph is marked from a process to a resource

  4. (D)

    A safe state guarantees that all processes can finish without formation of a deadlock

See the question in the paper

Answer and solution

ANSWER

The false statements are (A) and (C).

Official answer: A, CSource: Official answer key, GATE 2026 CS1 (IIT Guwahati)

  1. The question asks for the FALSE statements, so judge each statement as true or false and report the false ones.

  2. (A) Banker's algorithm checks, at each request, whether granting it leaves the system in a safe state. That is deadlock avoidance. Prevention works differently: it negates one of the four necessary conditions in advance. Stating that Banker's algorithm is used to prevent deadlocks is therefore false.

  3. (B) The four necessary conditions are mutual exclusion, hold and wait, no preemption and circular wait. If a process is never allowed to hold one resource while waiting for another, hold and wait is negated, so deadlock cannot form. (B) is true.

  4. (C) In a resource allocation graph, a request edge goes and an assignment edge goes , from the resource to the process holding it. An assignment edge marked from a process to a resource is wrong. (C) is false.

  5. (D) A safe state has a safe sequence in which each process can obtain its maximum remaining demand and finish. If the system follows that sequence, no deadlock forms. (D) is true.

  6. The false statements are (A) and (C).

KEY IDEA

Banker's algorithm is deadlock avoidance, which needs a safe-state check at each request, not prevention. In a resource allocation graph an assignment edge points from the resource to the process, and a request edge points from the process to the resource.

WATCH OUT FOR

Treating avoidance and prevention as the same thing, and so calling (A) true. Reversing the direction of request and assignment edges, and so calling (C) true.

From the GATE 2026 CS1 paper. Every question of this paper · Download the full paper · All 6 Deadlock questions, with notes

More Deadlock questions