Operating System


Q51.

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

Q52.

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

Q53.

What problem is solved by Dijikstra banker' algorithm?
GateOverflow

Q54.

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

Q55.

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

Q56.

With single resource, deadlock occurs
GateOverflow

Q57.

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

Q58.

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

Q59.

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

Q60.

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