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 16–20 of 23

Q16GATE 20082 marksMCQ−0.67 if wrong
Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?

Q17GATE 20071 markMCQ−0.33 if wrong
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?
allocrequest XYZXYZ P0121103 P1201012 P2221120

Q18GATE 20061 markMCQ−0.33 if wrong
Consider the following snapshot of a system running n processes. Process i is holding xix_{i} instances of a resource R, for 1≤i≤n1\leq i\leq n. Currently, all instances of R are occupied. Further, for all i , process i has placed a request for an additional yiy_{i}, instances while holding the xix_{i} instances it already has, There are exactly two processes p and q such that ypy_{p}=yqy_{q}=0. Which one of the following can serve as a necessary condition to guarantee that the system is not approaching a deadlock?

Q19GATE 20051 markMCQ−0.33 if wrong
Two shared resources R1R_1 and R2R_2 are used by processes P1P_1 and P2P_2. Each process has a certain priority for accessing each resource. Let TijT_{ij} denote the priority of PiP_i for accessing RjR_j. A process PiP_i can snatch a resource RkR_k from process PjP_j if TikT_{ik} is greater than TjkT_{jk}.
Given the following :

(I). T11>T21T_{11} \gt T_{21}
(II). T12>T22T_{12} \gt T_{22}
(III). T11<T21T_{11} \lt T_{21}
(IV). T12<T22T_{12} \lt T_{22}

Which of the following conditions ensures that P1P_1 and P2P_2 can never deadlock?

Q20GATE 20051 markMCQ−0.33 if wrong
Suppose n processes, P1,...,PnP_1,..., P_n share m identical resource units, which can be reserved and released one at a time. The maximum resource requirement of process PiP_i is sis_i, where si>0s_i \gt 0. Which one of the following is a sufficient condition for ensuring that deadlock does not occur?
(a)i, si < m (b)i, si < n (c) ∑ ni=1 si < (m + n) (d) ∑ ni=1 si < (m * n)

Keep practising

Topics in Operating System

All CS topics ›