Deadlock


Q1.

Which of the following statements is/are TRUE with respect to deadlocks?MSQ
GateOverflow

Q2.

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?
GateOverflow

Q3.

An aid to determine the deadlock occurrence is
GateOverflow

Q4.

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:
GateOverflow

Q5.

Raymonds tree based algorithm ensures
GateOverflow

Q6.

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 ?
GateOverflow

Q7.

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 ____.
GateOverflow

Q8.

What problem is solved by Dijikstra banker' algorithm?
GateOverflow

Q9.

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?
GateOverflow

Q10.

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:
GateOverflow