Question 1
Which of the following statements is/are TRUE with respect to deadlocks?
MSQ
 A Circular wait is a necessary condition for the formation of deadlock. B In a system where each resource has more than one instance, a cycle in its wait-for graph indicates the presence of a deadlock. C If the current allocation of resources to processes leads the system to unsafe state, then deadlock will necessarily occur. D In the resource-allocation graph of a system, if every edge is an assignment edge, then the system is not in deadlock state.
GATE CSE 2022   Operating System
Question 1 Explanation:
 Question 2
An aid to determine the deadlock occurrence is
 A resource allocation graph B starvation graph C inversion graph D none of the above
ISRO CSE 2020   Operating System
Question 2 Explanation:
 Question 3
Raymonds tree based algorithm ensures
 A no starvation, but deadlock may occur in rare cases B no deadlock, but starvation may occur C neither deadlock nor starvation can occur D deadlock may occur in cases where the process is already starved
ISRO CSE 2020   Operating System
Question 3 Explanation:
 Question 4
Consider the following snapshot of a system running n concurrent processes. Process $i$ is holding $X_i$ instances of a resource R, $1\leq i\leq n$. Assume that all instances of R are currently in use. Further, for all $i$, process $i$ can place a request for at most $Y_i$ additional instances of R while holding the $X_i$ instances it already has. Of the n processes, there are exactly two processes p and q such that $Y_p=Y_q=0$. Which one of the following conditions guarantees that no other process apart from p and q can complete execution?
 A $X_p+X_q \lt Min \{Y_k|1\leq k\leq n,k\neq p,k\neq q\}$ B $X_p+X_q \lt Max \{Y_k|1\leq k\leq n,k\neq p,k\neq q\}$ C $Min(X_p,X_q)\geq Min \{Y_k|1\leq k\leq n,k\neq p,k\neq q\}$ D $Min(X_p,X_q)\leq Max \{Y_k|1\leq k\leq n,k\neq p,k\neq q\}$
GATE CSE 2019   Operating System
Question 4 Explanation:
 Question 5
Consider a system having m resources of the same type. These resources are shared by 3 processes A,B,C, which have peak time demands of 3,4,6 respectively. The minimum value of m that ensures that deadlock will never occur is:
 A 11 B 12 C 13 D 14
ISRO CSE 2018   Operating System
Question 5 Explanation:
 Question 6
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 requirements using a matrix named Max as given below. For example, Max[$P_2$,F] is the maximum number of instances of F that $P_2$ would require. The number of instances of the resources allocated to the various processes at any given state is given by a matrix named Allocation.
Consider a state of the system with the Allocation matrix as shown below, and in which 3 instances of E and 3 instances of F are the only resources available.

From the perspective of deadlock avoidance, which one of the following is true?
 A The system is in safe state. B The system is not in safe state, but would be safe if one more instance of E were available C The system is not in safe state, but would be safe if one more instance of F were available D The system is not in safe state, but would be safe if one more instance of G were available
GATE CSE 2018   Operating System
Question 6 Explanation:
 Question 7
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 largest value of K that will always avoid deadlock is ____.
 A 2 B 3 C 4 D 5
GATE CSE 2018   Operating System
Question 7 Explanation:
 Question 8
What problem is solved by Dijikstra banker' algorithm?
 A Mutual exclusion B Deadlock recovery C Deadlock avoidance D Cache coherence
ISRO CSE 2017   Operating System
Question 8 Explanation:
 Question 9
A system shares 9 tape drives. The current allocation and maximum requirement of tape drives for three processes are shown below:

Which of the following best describes current state of the system ?
 A Safe, Deadlocked B Safe, Not Deadlocked C Not Safe, Deadlocked D Not Safe, Not deadlocked
GATE CSE 2017 SET-2   Operating System
Question 9 Explanation:
 Question 10
A multithreaded program P executes with x number of threads and uses y number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-reentrant, i.e., if a thread holds a lock l, then it cannot re-acquire lock l without releasing it. If a thread is unable to acquire a lock, it blocks until the lock becomes available. The minimum value of x and the minimum value of y together for which execution of P can result in a deadlock are:
 A x = 1, y = 2 B x =2, y=1 C x = 2,y=2 D x = 1, y = 1
GATE CSE 2017 SET-1   Operating System
Question 10 Explanation:
There are 10 questions to complete.

### 2 thoughts on “Deadlock”

1. Sir, In question no. 16, Question is not written right, sequence is “as bs cs ae ds ce es fs be de gs ee fe hs ge he”, Here no activity is having the e symbol associated with them.