Which of the following is not a valid deadlock prevention scheme?
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:
- Mutual Exclusion
- Hold and Wait
- No Preemption
- 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 can hold resource and request , while process holds and requests . 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.
