GATE / CS ARCHIVE

GATE CSE 2026 SET 1 / QUESTION 29

Distinguishing deadlock avoidance from prevention

Operating Systems · Deadlocks · Full GATE CSE 2026 Set 1 paper

GATE 2026 Set 1, Q29 1 mark · MSQ
Report issue

Deadlocks

Question 29, GATE 2026: Select the false statements: A Banker’s algorithm is deadlock prevention; B disallowing hold-and-wait prevents deadlock; C an assignment edge in a resource-allocation graph goes from process to resource; D a safe state permits every process to finish without deadlock.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: A, C

Givens and goal

Select the false statements: A Banker’s algorithm is deadlock prevention; B disallowing hold-and-wait prevents deadlock; C an assignment edge in a resource-allocation graph goes from process to resource; D a safe state permits every process to finish without deadlock.

Approach

Distinguish the standard algorithm categories, recall graph edge direction, and interpret safety as existence of a safe completion sequence.

Step-by-step solution

1. Deadlock prevention structurally rules out at least one necessary condition, such as hold-and-wait. Avoidance instead examines potential grants and declines those that would leave the system unsafe.
2. Banker’s algorithm is an avoidance algorithm: it checks whether a safe completion sequence remains after a proposed allocation. Calling it prevention in the standard technical taxonomy is false, so select A.
3. If no process may hold resources while waiting for more, the hold-and-wait condition cannot hold. Since that condition is necessary for resource deadlock, B is true and must not be selected.
4. A request edge goes process→resource; an assignment edge goes resource-instance→process to indicate ownership. C reverses assignment direction, so select C.
5. A safe state means there is an order in which each process can obtain its remaining declared maximum need, finish, and release resources for later processes. That establishes D in the conventional safe-allocation sense.
6. Therefore the false statements are A and C. “Safe” asserts a feasible completion sequence under controlled allocation, not that arbitrary future grants can never make the system unsafe.

Original paper, page 22 · Answer key