Deadlock


Q11.

With single resource, deadlock occurs
GateOverflow

Q12.

A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units, then
GateOverflow

Q13.

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

Q14.

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

Q15.

A total of 9 units of a resource type available, and given the safe state shown below, which of the following sequence will be a safe state?\begin{array}{lll} \text {Process } & \text {Used } & \text {Max } \\ P_{1} & 2 & 7 \\ P_{2} & 1 & 6 \\ P_{3} & 2 & 5 \\ P_{4} & 1 & 4 \end{array}
GateOverflow

Q16.

An operating system uses the Banker's algorithm for deadlock avoidance when managing the allocation of three resource types X, Y, and Z to three processes P0, P1, and P2. The table given below presents the current system state. Here, the Allocation matrix shows the current number of resources of each type allocated to each process and the Max matrix shows the maximum number of resources of each type required by each process during its execution. There are 3 units of type X, 2 units of type Y and 2 units of type Z still available. The system is currently in a safe state. Consider the following independent requests for additional resources in the current state: REQ1: P0 requests 0 units of X, 0 units of Y and 2 units of Z REQ2: P1 requests 2 units of x, 0 units of Y and 0 units of Z Which one of the following is TRUE?
GateOverflow

Q17.

Consider a system having "n" resources of same type. These resources are shared by 3 processes, A, B, C. These have peak demands of 3, 4, and 6 respectively. For what value of "n" deadlock won't occur
GateOverflow

Q18.

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\ltn) request R_{i} ; if (i+2\ltn)request R_{i+2}; } else { if (i\ltn) request R_{n-i}; if (i+2\ltn)request R_{n-i-2} ; } In which one of the following situations is a deadlock possible?
GateOverflow

Q19.

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

Q20.

A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, where the column alloc denotes the number of units of each resource type allocated to each process, and the column request denotes the number of units of each resource type requested by a process in order to complete execution. Which of these processes will finish LAST?
GateOverflow