Deadlock


Q21.

Consider the following process and resource requirement of each process.\begin{array}{|c|c|c|c|c|} \hline {\text { Process }} & {\text { Type 1 }} & {\text { Type 1 }} & {\text { Type 2 }}& {\text { Type 2 }} \\ \hline & \text { Used } & \text { Max } & \text { Used } & \text { Max } \\ \hline \text { P1 } & 1 & 2 & 1 & 3 \\ \hline \text { P2 } & 1 & 3 & 1 & 2 \\ \hline \text { P3 } & 2 & 4 & 1 & 4 \\ \hline \end{array}Predict the state of this system, assuming that there are a total of 5 instances of resource type 1 and 4 instances of resource type 2.
GateOverflow

Q22.

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 \gt 0. Which one of the following is a sufficient condition for ensuring that deadlock does not occur?
GateOverflow

Q23.

Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?
GateOverflow

Q24.

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

Q25.

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

Q26.

Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the sources as follows if executed independently. Which one of the following statements is TRUE if all three processes run concurrently starting at time t=0?
GateOverflow

Q27.

Consider a system having 'm' resources of the same type. The 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

Q28.

Which of the following is not a necessary condition for deadlock?
GateOverflow

Q29.

Consider the following snapshot of a system running n processes. Process i is holding x_{i} instances of a resource R, for 1\leq i\leq n. Currently, all instances of R are occupied. Further, for all i , process i has placed a request for an additional y_{i}, instances while holding the x_{i} instances it already has, There are exactly two processes p and q such that y_{p}=y_{q}=0. Which one of the following can serve as a necessary condition to guarantee that the system is not approaching a deadlock?
GateOverflow

Q30.

Two shared resources R_1 and R_2 are used by processes P_1 and P_2. Each process has a certain priority for accessing each resource. Let T_{ij} denote the priority of P_i for accessing R_j. A process P_i can snatch a resource R_k from process P_j if T_{ik} is greater than T_{jk}. Given the following : (I). T_{11} \gt T_{21} (II). T_{12} \gt T_{22} (III). T_{11} \lt T_{21} (IV). T_{12} \lt T_{22} Which of the following conditions ensures that P_1 and P_2 can never deadlock?
GateOverflow