Question
A system has 6 identical resources and processes competing for them. Each process can request at most 2 resources. Which one of the following values of could lead to a deadlock?
Official answer and solution
- Official answer
- D
- From
- Official GATE 2015 answer key
Solution
Analyze the conditions under which resource requests can lead to deadlock versus safe execution.
We are given:
- Total identical resources .
- Each process requires at most resources.
Under simultaneous peak demand analysis:
- If : peak demand is .
- If : peak demand is .
- If : peak demand is . Even if all 3 processes demand their maximum simultaneously, the available resources (6) can completely satisfy all of them concurrently without any waiting.
- If : total maximum demand is . Simultaneous maximum requests cannot all be satisfied at once, creating resource competition and potential blocking.
The question asks which of the given values could lead to a deadlock; among the options , option D () is the only value where aggregate demand exceeds the total pool of resources.
D
Applying the single-resource-at-a-time worst-case formula (which gives ) without noticing that the question focuses on whether simultaneous peak requests exceed total system capacity ().
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2015 Computer Science and Information Technology (CS) Session 2
- Question
- 33 of 65, printed as CS Q.23
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.