Question
consists of all active processes in an operating system. consists of single instances of distinct types of resources in the system.
The resource allocation graph has the following assignment and claim edges.
Assignment edges: (the assignment edge means resource is assigned to process , and so on for others)
Claim edges: (the claim edge means process is waiting for resource , and so on for others)
Which of the following statement(s) is/are CORRECT?
Official answer and solution
- Official answer
- C and D
- From
- Official GATE 2025 answer key
Solution
Construct the wait-for graph (since each resource has a single instance) and identify all directed cycles.
Since each resource has a single instance and is currently assigned to , a claim edge corresponds to the wait-for edge . The wait-for graph has 5 directed edges:
This graph contains exactly two elementary cycles:
A set of aborted processes makes the system deadlock-free if and only if it intersects every cycle (a feedback vertex set):
- Aborting only (A) or only (B) leaves cycle () deadlocked.
- Aborting (C) breaks both and , making the system deadlock-free.
- Aborting and (D) breaks (via ) and (via ), also making the system deadlock-free.
Options (C), (D)
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2025 Computer Science and Information Technology - Session 2 (CS2)
- Question
- 48 of 65
- 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.