Deadlock


Q21.

What is the minimum number of resources required to ensure that deadlock will never occur, if there are currently three processes P_{1},P_{2} and P_{3} running in a system whose maximum demand for the resources of same type are 3, 4, and 5 respectively.
GateOverflow

Q22.

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

Q23.

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

Q24.

An operating system implements a policy that requires a process to release all resources before making a request for another resource. Select the TRUE statement from the following:
GateOverflow

Q25.

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

Q26.

When a process is rolled back as a result of deadlock the difficulty which arises is
GateOverflow

Q27.

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

Q28.

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

Q29.

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

Q30.

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