Deadlock: GATE CS Previous Year Questions

Deadlock · Operating System

23 questions · asked in 17 of 27 years (2000–2026)

MCQ 17 · MSQ 3 · NAT 31-mark 11 · 2-mark 12

2000Questions per year2026

Questions 11–15 of 23

Q11GATE 2014 (Session 1)2 marksMCQ−0.67 if wrong
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.
AllocationMax XYZ XYZ P0001843 P1320620 P2211333
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?

Q12GATE 2014 (Session 3)2 marksNAT
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 _________.

Q13GATE 20102 marksMCQ−0.67 if wrong
A system has n resources R0,...Rn−1R_{0},...R_{n-1}, and k processes P0,...Pk−1P_{0},...P_{k-1}. The implementation of the resource request logic of each process PiP_{i} is as follows:
 
if (i%2= = 0) {
        if (i<\ltn) request RiR_{i} ;
        if (i+2<\ltn)request Ri+2R_{i+2};
}
else {
         if (i<\ltn) request Rn−iR_{n-i};
         if (i+2<\ltn)request Rn−i−2R_{n-i-2} ;
} 
In which one of the following situations is a deadlock possible?

Q14GATE 20092 marksMCQ−0.67 if wrong
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.
Process P1: t=0: requests 2 units of R2 t=1: requests 1 unit of R3 t=3: requests 2 units of R1 t=5: releases 1 unit of R2 and 1 unit of R1. t=7: releases 1 unit of R3 t=8: requests 2 units of R4 t=10: Finishes Process P2: t=0: requests 2 units of R3 t=2: requests 1 unit of R4 t=4: requests 1 unit of R1 t=6: releases 1 unit of R3 t=8: Finishes Process P3: t=0: requests 1 unit of R4 t=2: requests 2 units of R1 t=5: releases 2 units of R1 t=7: requests 1 unit of R2 t=8: requests 1 unit of R3 t=9: Finishes
Which one of the following statements is TRUE if all three processes run concurrently starting at time t=0?

Q15GATE 20082 marksMCQ−0.67 if wrong
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:

Keep practising

Topics in Operating System

All CS topics ›