Skip to content
GATEiit

GATE CSE 2026 Session 1 Q35: Minimum resource instances for deadlock freedom (5 processes, max 2)

Question

Consider a system consisting of kk instances of a resource RR, being shared by 5 processes. Assume that each process requires a maximum of two instances of resource RR and a process can request or release only one instance at a time. Further, a process can request the second instance of the resource only after acquiring the first instance.

The minimum value of kk for the system to be deadlock-free is ________. (answer in integer)

Try it: numerical answer: type the value

Numerical answer. No negative marking.
Show answer and explanation

Answer: 6 (official GATE 2026 final answer key)

Concept used: Deadlock freedom when k≥∑(maxi−1)+1k \ge \sum (\text{max}_i - 1) + 1.

First step: Worst case: every process holds one instance and waits for a second; one extra instance breaks the deadlock.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2026 Session 1 CS question paper and final answer key, organised by IIT Guwahati. Question paper · Answer key