The GATE Grind

GATE Operating System: Deadlock – Previous Year Questions

19 GATE previous year questions on Deadlock (Operating System, Computer Science) with answers and explanations, from every paper.

19 questions worth 32 marks in all (6 1-mark, 13 2-mark). Asked between 2007 and 2026, so you can see how the topic has been tested over time.

  1. GATE 2007 CS Q57 (2 marks, Multiple choice) – Three processes share5 units each of resources X, Y, Z. alloc gives held resources; request gives further resources to finish. Which finishes LAST?…
  2. GATE 2008 CS Q65 (2 marks, Multiple choice) – Which is NOT true of deadlock prevention/avoidance?
  3. GATE 2009 CS Q30 (2 marks, Multiple choice) – Resources R1, R2, R3, R4 have 3, 2, 3, 2 units respectively. Allocation is non-preemptive; a request is not entertained unless completely satisfied.…
  4. GATE 2021 CS (CS2) Q53 (2 marks, Multiple select) – There is one instance of each resource type. Under a global lock L, OwnResource(R) acquires R if available. Otherwise it terminates the other owner P,…
  5. GATE 2015 CS (CS3) Q45 (2 marks, Multiple choice) – Which policies prevent deadlock with mutually exclusive resources? I: Acquire all resources at the beginning; if any are unavailable, release all…
  6. GATE 2015 CS (CS2) Q30 (1 mark, Multiple choice) – Six identical resources are shared by N competing processes. Each process can request at most 2 resources. Which N could lead to deadlock?
  7. GATE 2010 CS Q56 (2 marks, Multiple choice) – There are n resources R0,…,R(n−1), each with one instance, and k processes P0,…,P(k−1). Process Pi requests resources as below, then uses and releases…
  8. GATE 2013 CS Q26 (1 mark, Multiple choice) – Binary semaphores a,b,c,d start at one. X needs a,b,c; Y needs b,c,d; Z needs c,d,a, releasing all after its code. Which acquisition order is…
  9. GATE 2017 CS (CS2) Q43 (2 marks, Multiple choice) – Nine tape drives are shared. For P₁,P₂,P₃, current allocations are 3,1,3 and maximum requirements are 7,6,5. Describe the system state.
  10. GATE 2014 CS (CS3) Q41 (2 marks, Numerical answer) – Three programs each require three tape units. Find the minimum number of tape units that guarantees deadlocks never arise.
  11. GATE 2014 CS (CS1) Q41 (2 marks, Multiple choice) – Banker’s algorithm manages resource types X,Y,Z for P₀,P₁,P₂. Current allocation vectors are P₀:(0,0,1), P₁:(3,2,0), P₂:(2,1,1); maximum vectors are…
  12. GATE 2017 CS (CS1) Q37 (2 marks, Multiple choice) – 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…
  13. GATE 2018 CS Q34 (1 mark, Numerical answer) – 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…
  14. GATE 2018 CS Q49 (2 marks, Multiple choice) – 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…
  15. GATE 2019 CS Q49 (2 marks, Multiple choice) – Consider the following snapshot of a system running n concurrent processes. Process i is holding X i instances of a resource R, 1 i n. Assume that all…
  16. GATE 2026 CS (CS1) Q29 (1 mark, Multiple select) – With respect to deadlocks in an operating system, which of the following statements is/are FALSE?
  17. GATE 2026 CS (CS1) Q35 (1 mark, Numerical answer) – Consider a system consisting of k instances of a resource R, being shared by 5 processes. Assume that each process requires a maximum of two instances…
  18. GATE 2025 CS (CS2) Q48 (2 marks, Multiple select) – P = \P 1, P 2, P 3, P 4\ consists of all active processes in an operating system. R = \R 1, R 2, R 3, R 4\ consists of single instances of distinct…
  19. GATE 2022 CS Q26 (1 mark, Multiple select) – Which of the following statements is/are TRUE with respect to deadlocks?