GATE CSE 2018 Q34: Largest maximum demand K that avoids deadlock
- Operating System
- 1 mark
- NAT
- No negative marking
Syllabus topic: Deadlock
Question
Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of instances. Resource instances can be requested and released only one at a time. The largest value of that will always avoid deadlock is ____.
Try it: numerical answer: type the value
Show answer and explanation
Answer: 2 (official GATE 2018 final answer key)
Concept used: With processes each needing at most instances, deadlock is impossible when total instances.
First step: Consider the worst case where every process holds instances; require that at least one instance is still free.
Full step-by-step solution
Loading…
Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.
More questions on Deadlock
Every PYQ on this topic →Share this question
Source: official GATE 2018 CS question paper and final answer key, organised by IIT Guwahati. Question paper · Answer key
More Operating System PYQs
- 2026 Session 1 · Q29False statements about deadlocks
- 2026 Session 1 · Q35Minimum resource instances for deadlock freedom (5 processes, max 2)
- 2026 Session 1 · Q59Disk transfer time for random sectors on tracks 5, 12, 7
- 2026 Session 1 · Q63Number of printf calls with fork, continue and break
- 2026 Session 1 · Q64Average FCFS waiting time for alternating A and C processes
- 2026 Session 2 · Q23CPU scheduling algorithm that cannot be preemptive