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?
View worked solution
Answer: C;D
In a Resource Allocation Graph (RAG) where each resource type has a single instance, the presence of a cycle is a necessary and sufficient condition for a deadlock.
Let's identify the cycles in the given system by tracing the assignment edges () and request/claim edges ():
- Cycle 1: (involves processes )
- Cycle 2: (involves processes )
To make the system deadlock-free, we must break both cycles:
- Option A (Aborting ): Only breaks Cycle 1. Cycle 2 remains active, so the system is still deadlocked.
- Option B (Aborting ): Only breaks Cycle 1. Cycle 2 remains active, so the system is still deadlocked.
- Option C (Aborting ): Since is common to both Cycle 1 and Cycle 2, aborting breaks both cycles. The system becomes deadlock-free.
- Option D (Aborting and ): Aborting breaks Cycle 1, and aborting breaks Cycle 2. Both cycles are broken, making the system deadlock-free.
Free practice · Your answers on this page are not saved.
