Deadlock-prevention questions mix Coffman conditions, policy comparisons and one-resource numericals, so memorising four names is not enough. Attempt each question before opening its answer, and treat every miss as a gap to close. Ten of the twelve carry a link to their own solution page; Questions 1 and 3 point to the Deadlock Prevention learn module instead.
Deadlock prevention MCQs: the four levers before you start
Condition | What it means | Prevention move |
|---|---|---|
Mutual exclusion | A non-shareable resource is held exclusively. | Often not practical to remove. |
Hold and wait | A process holds resources while requesting more. | Request everything at once, or release held resources before requesting more. |
No preemption | A held resource cannot be taken back. | Take back a safely recoverable resource and roll the process back. |
Circular wait | Processes form a closed chain of resource waits. | Impose one global resource order and allow requests only in that order. |
Prevention makes a Coffman condition impossible. Avoidance may allow all four, but grants only safe-state requests. Banker's algorithm is avoidance, not prevention.
For a single resource type the safety bound is m >= n(k - 1) + 1, where m is the number of units, n the number of processes and k the maximum demand of any one process.
Deadlock prevention basics: conditions, common methods and cost
Question 1: the common prevention method
Which one of the following is a common method for preventing deadlock?
A. Mutual Exclusion
B. Hold and Wait
C. No Preemption
D. Preventing circular wait
Answer: D. The first three choices are deadlock conditions, not prevention methods as written. Ordering resources R1 < R2 < R3 and allowing only increasing requests prevents a wait cycle.
Question 2: exclusive control of a resource
Indian Space Research Organization 2008. Open the full solution
In which of the following four necessary conditions for deadlock processes claim exclusive control of the resources they require?
A. no preemption
B. mutual exclusion
C. circular wait
D. hold and wait
Answer: B. Mutual exclusion gives one process exclusive use of a non-shareable resource. Hold and wait means seeking more while holding one; no preemption forbids taking it.
Question 3: the cost of restrictive prevention
What is the main disadvantage of deadlock prevention techniques?
A. Increased Complexity
B. Reduced Throughput
C. Both A and B
D. Neither A nor B
Answer: C. All-at-once requests, rollback and ordering add policy complexity. They can also idle resources or delay processes, reducing utilisation and throughput.
Hold and wait and no preemption: what the policy really guarantees
Breaking deadlock does not guarantee freedom from starvation. Rollback can prevent a cycle while repeatedly postponing one process.
Question 4: what follows resource preemption
HPSC 2021. Open the full solution
If we preempt a resource from a process, the process cannot continue with its normal execution and it must be:
A. aborted
B. rolled back
C. terminated
D. queued
Answer: B. Preemption invalidates partial execution, so the process returns to a safe checkpoint. Termination discards it; rollback permits a later retry.
Question 5: identify the policy that breaks no Coffman condition
GATE 2000; TPSC 2025. Open the full solution
Which of the following is NOT a valid deadlock prevention scheme?
A. Release all resources before requesting a new resource
B. Number the resources uniquely and never request a lower numbered resource than the last one requested.
C. Never request a resource after releasing any resource
D. Request and all required resources be allocated before execution.
Answer: C. A and D remove hold and wait; B removes circular wait through increasing order. C still permits holding one resource while awaiting another, so it breaks no condition.
Question 6: deadlock-free does not mean starvation-free
GATE 2008. Open the full solution
An operating system implements a policy that requires a process to release all resources before making a request for another resource. Select the TRUE statement from the following:
A. Both starvation and deadlock can occur
B. Starvation can occur but deadlock cannot occur
C. Starvation cannot occur but deadlock can occur
D. Neither starvation nor deadlock can occur
Answer: B. Waiting while holding is forbidden, so hold and wait, and therefore deadlock, is impossible. Repeatedly losing the race to reacquire everything can still cause starvation.
Resource ordering and identical-resource numericals
In the worst case, each process holds k - 1 units. One extra lets one finish and release everything. Thus m_min = n(k - 1) + 1.
Question 7: which ordering policies prevent a cycle
GATE 2015. Open the full solution
Consider the following policies for preventing deadlock in a system with mutually exclusive resources.
I. Processes should acquire all their resources at the beginning of execution. If any resource is not available, all resources acquired so far are released
II. The resources are numbered uniquely, and processes are allowed to request for resources only in increasing resource numbers
III. The resources are numbered uniquely, and processes are allowed to request for resources only in decreasing resource numbers
IV. The resources are numbered uniquely. A process is allowed to request only for a resource with resource number larger than its currently held resources
Which of the above policies can be used for preventing deadlock?
A. Any one of I and III but not II or IV
B. Any one of I, III, and IV but not II
C. Any one of II and III but not I or IV
D. Any one of I, II, III, and IV
Answer: D. I removes hold and wait. II and III impose consistent monotone orders; IV restates increasing order relative to held resources, so each breaks a necessary condition.
Question 8: minimum resources for three processes
GATE 1997. Open the full solution
An operating system contains 3 user processes each requiring 2 units of resource R. The minimum number of units of R such that no deadlocks will ever arise is
A. 3
B. 5
C. 4
D. 6
Answer: C. m_min = 3(2 - 1) + 1 = 4. Three processes may hold one unit each; the fourth lets one finish, but with three units all can wait forever for a second.
Question 9: maximum safe process count with seven drives
DSSSB 2021. Open the full solution
A computer system has 7 tape drives. There are ‘n’ processes competing for them. Each process may need 2 tape drives. What is the maximum value of ‘n’ for which the system is guaranteed to be deadlock free?
A. 2
B. 6
C. 4
D. 1
Answer: B. 7 >= n(2 - 1) + 1 gives 7 >= n + 1, so n <= 6. Six may hold one drive while the seventh lets one finish; seven leave zero free.
Question 10: when six resources can deadlock
GATE 2015. Open the full solution
A system has 6 identical resources and N processes competing for them. Each process can request at most 2 resources. Which one of the following values of N could lead to a deadlock?
A. 1
B. 2
C. 3
D. 6
Answer: D. 6 >= N(2 - 1) + 1 gives N <= 5. At N = 6, P1 through P6 can hold one and request another, leaving zero free; the other options are safe.

Prevention versus avoidance and timestamp ordering
A safe-state test belongs to avoidance. An acyclic timestamp wait direction can prevent deadlock yet still permit starvation.
Question 11: prevention is not a safe-state test
Indian Space Research Organization 2017; Tech Mahindra 2025. Open the full solution
Which of the following is not true with respect to deadlock prevention and deadlock avoidance schemes?
A. In deadlock prevention, the request for resources is always granted if resulting state is safe
B. In deadlock avoidance, the request for resources is always granted, if the resulting state is safe
C. Deadlock avoidance requires knowledge of resource requirements a priori
D. Deadlock prevention is more restrictive than deadlock avoidance
Answer: A. Safe-state checking defines avoidance, so B is true and A mislabels it. C needs advance maximum demands; D is true because prevention blocks a structural condition.
Question 12: timestamp direction, deadlock and starvation
GATE 2004. Open the full solution
In a certain operating system, deadlock prevention is attempted using the following scheme. Each process is assigned a unique timestamp, and is restarted with the same timestamp if killed. Let Ph be the process holding a resource R, Pr be a process requesting for the same resource R, and T(Ph) and T(Pr) be their timestamps respectively. The decision to wait or preempt one of the processes is based on the following algorithm.
if T(Pr) < T(Ph)
then kill Pr
else wait
Which one of the following is TRUE?
A. The scheme is deadlock-free, but not starvation-free
B. The scheme is not deadlock-free, but starvation-free
C. The scheme is neither deadlock-free nor starvation-free
D. The scheme is both deadlock-free and starvation-free
Answer: A. Smaller timestamps are older; only younger requesters wait, so wait edges cannot cycle. An older requester can be killed repeatedly by younger holders, and its unchanged timestamp permits starvation.
Deadlock prevention MCQs: diagnose the miss and choose the next step
Use your misses as a map:
Questions 1 to 3: separate conditions from prevention levers.
Questions 4 to 7: separate safety guarantees from side effects.
Questions 8 to 10: rebuild the formula from the worst case.
Questions 11 and 12: separate prevention, avoidance, deadlock and starvation freedom.
Use Operating Systems for GATE: How to Study Deadlocks, Scheduling and Memory for the wider sequence. Next, solve Process Synchronization MCQs: 12 Solved GATE Questions with Explanations, because mutual exclusion leads into deadlock reasoning.
The short version:
Break any one Coffman condition to prevent deadlock.
Use one global resource order to break circular wait.
For identical resources, use
m_min = n(k - 1) + 1.Do not confuse deadlock freedom with starvation freedom.
Redo Questions 5, 8, 10 and 12 without answers. They test policy validity, minimum resources, the unsafe boundary and timestamps. Use GATE Guidance by Sanchit Sir for a full-subject path and GATE CS Exam Preparation for the wider catalogue.




