Skip to content
GATEiit

GATE CSE 2018 Q34: Largest maximum demand K that avoids deadlock

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 K instances. Resource instances can be requested and released only one at a time. The largest value of K that will always avoid deadlock is ____.

Try it: numerical answer: type the value

Numerical answer. No negative marking.
Show answer and explanation

Answer: 2 (official GATE 2018 final answer key)

Concept used: With n processes each needing at most K instances, deadlock is impossible when n(K−1)+1≤ total instances.

Concept notes

Loading notes…

First step: Consider the worst case where every process holds K−1 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

WhatsAppDownload image

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