Skip to content
Official PYQ · 2000

GATE CS 2000 Q2.23 — Deadlock

Explain with AI

Which of the following is not a valid deadlock prevention scheme?

Choose one option
View worked solution

Answer: C

Deadlock prevention schemes work by ensuring that at least one of the four necessary Coffman conditions for deadlock cannot hold:

  1. Mutual Exclusion
  2. Hold and Wait
  3. No Preemption
  4. Circular Wait

Let us analyze each option against these conditions:

  • Option A: "Release all resources before requesting a new resource."
    This prevents the Hold and Wait condition. Since a process must release all its currently held resources before making a new request, it never holds any resources while waiting for another. Thus, this is a valid deadlock prevention scheme.
  • Option B: "Number the resources uniquely and never request a lower numbered resource than the last one requested."
    This is the classic Circular Wait prevention scheme (hierarchical resource ordering). By enforcing a strict total ordering on resource requests, a cycle in the resource allocation graph cannot form. Thus, this is a valid deadlock prevention scheme.
  • Option C: "Never request a resource after releasing any resource."
    This rule does not prevent any of the deadlock conditions. For example, process P1P_1 can hold resource R1R_1 and request R2R_2, while process P2P_2 holds R2R_2 and requests R1R_1. Since neither process has released any resource yet, they do not violate this rule, yet they are in a deadlock. Thus, this is not a valid deadlock prevention scheme.
  • Option D: "Request and all required resources be allocated before execution."
    This is another way to prevent the Hold and Wait condition. A process must request and receive all its required resources at once before starting execution. If even one resource is unavailable, it gets none. Thus, this is a valid deadlock prevention scheme.

Therefore, C is the correct option.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Deadlock questions