Deadlocks
GATE CSE & IT · 22 questions across 18 years (1992-2026) · 45% recurrence rate
Recurrence sparkline
1992–2026Difficulty mix
Question types
All 22 questions on Deadlocks
Consider a system consisting of $k$ instances of a resource $R$, being shared by 5 processes. Assume that each process requires a maximum of two instances of resource $R$ and a process can request or release only one ins...
With respect to deadlocks in an operating system, which of the following statements is/are FALSE?
$P=\left\{P_1, P_2, P_3, P_4\right\}$ consists of all active processes in an operating system. $R=\left\{R_1, R_2, R_3, R_4\right\}$ consists of single instances of distinct types of resources in the system. The resource...
Which of the following statements is/are TRUE with respect to deadlocks?
Consider a computer system with multiple shared resource types, with one instance per resource type. Each instance can be owned by only one process at a time. Owning and freeing of resources are done by holding a global...
Consider the following snapshot of a system running $n$ concurrent processes. Process $i$ is holding $X_i$ instances of a resource $\mathrm{R}, 1 \leq i \leq n$. Assume that all instances of R are currently in use. Furth...
Consider a system with $$3$$ processes that share $$4$$ instances of the same resource type. Each process can request a maximum of $$K$$ instances. Resource instances can be requested and released only one at a time. The...
In a system, there are three types of resources: $$E, F$$ and $$G.$$ Four processes $${P_0},$$ $${P_1},$$ $${P_2}$$ and $${P_3}$$ execute concurrently. At the outset, the processes have declared their maximum resource re...
A system has 6 identical resources and N processes competing for them. Each process can request atmost 2 resources. Which one of the following values of N could lead to a deadlock?
Consider the following policies for preventing deadlock in a system with mutually exclusive resources. $$\,\,\,\,\,\,\,{\rm I}.$$ $$\,\,\,\,\,\,$$ Processes should acquire all their resources at the beginning of executio...
A system contains three programs and each requires three tape units for its operation. The Minimum number of tape units which the system must have such that deadlocks never arise is _________.
Three concurrent processes X, Y, and Z execute three different code segments that access and update certain shared variables. Process X executes the P operation (i.e., wait) on semaphores a, b and c; process Y executes t...
A system has n resources R 0 ,.....,R n-1 , and k processes P 0 ,.....,P k-1 . The implementation of the resource request logic of each process P i , is as follows: if (i%2==0) { if (i < n) request R i ; if (i+2 < n) req...
Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?
Consider the following snapshot of a system running n processes. Process i is holding x i instances of a resource R, for $$1 \le i \le n$$. Currently, all instances of R are occupied. Further, for all i, process i has pl...
Suppose n processes, P 1 ,......., P n share m identical resource units, which can be reserved and released one at a time. The maximum resource requirement of process P i is S i , where S i > 0. Which one of the followin...
Let m[0] ..m[4] be mutexes (binary semaphores) and P[0] ...P[4] be processes. Suppose each process P[i] executes the following: wait (m[i]); wait (m(m[(i+1) mod 4]))0; ....... release (m[i]); release (m[(i+1) mod 4]); Th...
Which of the following is NOT a valid deadlock prevention scheme?
A computer has six tape drives, with n processes competing for them. Each process may need two drives. What is the maximum value of n for the system to be deadlock free?
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
Consider a system having m resources of the same type. These resources are shared by 3 processes A, B and C, which have peak demands of 3, 4 and 6 respectively. For what value of m deadlock will not occur?
A computer system has 6 tape drives, with n process completing for them. Each process may need 3 tape drives. The maximum value of n for which the system is guaranteed to be deadlock free is: