deadlock
GATE CSE & IT · Operating Systems - Concurrency and Synchronization · 1992-2026
Study anchor
Source-book anchor pending for this concept.
Practice action
Start latest PYQPYQs in this concept
All concepts →With respect to deadlocks in an operating system, which of the following statements is/are FALSE?
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 pro...
P = {P1, P2, P3, P4} consists of all active processes in an operating system. R = {R1, R2, R3, R4} consists of single instances of distinct types of resources in the system. The re...
$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...
Which of the following statements about the Two Phase Locking (2PL) protocol is/are TRUE?
Consider a multi-threaded program with two threads T1 and T2. The threads share two semaphores: s1 (initialized to 1) and s2 (initialized to 0). The threads also share a global var...
Consider a multi-threaded program with two threads T1 and T2. The threads share two semaphores: s1 (initialized to 1) and s2 (initialized to 0). The threads also share a global var...
Which of the following statements is/are TRUE with respect to deadlocks?
Consider the following pseudocode, where S is a semaphore intialized to 5 in line#2 an counter is a shared variable intialized to 0 in line#1. Assume that the increment operation i...
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 in...
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 reques...
A system shares 9 tape drives. The current allocation and maximum requirement of tape drives for three processes are shown below: Process | Current Allocation | Maximum Requirement...
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 procedure below for the Producer-Consumer problem which uses semaphores: semaphore n = 0; semaphore s = 1; void producer() { while(true) { produce(); semWait(s); addTo...
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 i...
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 sem...
Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock? I. 2-phase locking II. Time-stamp ordering
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) { i...
Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?
Two processes, P1 and P2, need to access a critical section of code. Consider the following synchronization construct used by the processes: /* P1 */ while(true){ want s1=true; whi...
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 occupi...
Barrier is a synchronization construct where a set of processes synchronizes globally i.e. each process in the set arrives at the barrier and waits for all others to arrive and the...
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 ,...
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; ....... rele...
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...
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 deadlo...