P={P1,P2,P3,P4} consists of all active processes in an operating system.
R={R1,R2,R3,R4} 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: R1→P1,R→P2,R3→P3,R4→P4
Claim edges: P1→R2,P2→R3,P3→R1,P2→R4,P4→R2
Which of the following statement(s) is/are CORRECT?
Solution :
The correct statements are:
1. Aborting P2 makes the system deadlock free.
2. Aborting P1 and P4 makes the system deadlock free.
Step-by-Step Explanation:
To determine which process abortions will resolve the deadlock, we must identify the cycles present in the Resource Allocation Graph (RAG). A cycle in a resource allocation graph containing single-instance resource types indicates a deadlock state.
1. Identify the Vertices (Processes and Resources):
Processes:
Resources (single unit each):
(Note: The assignment edge "R→P2" represents R2→P2).
2. Map the Edges in the Graph:
• Assignment Edges (Resource → Process):
R1 → P1 (R1 is held by P1)
R2 → P2 (R2 is held by P2)
R3 → P3 (R3 is held by P3)
R4 → P4 (R4 is held by P4)
• Claim/Request Edges (Process → Resource):
P1 → R2 (P1 requests R2)
P2 → R3 (P2 requests R3)
P3 → R1 (P3 requests R1)
P2 → R4 (P2 requests R4)
P4 → R2 (P4 requests R2)
3. Detect Cycles in the Graph:
By tracing the paths, we find two distinct cycles in the system:
• Cycle 1: P1 → R2 → P2 → R3 → P3 → R1 → P1
This cycle involves the processes {P1, P2, P3} and resources {R1, R2, R3}.
• Cycle 2: P2 → R4 → P4 → R2 → P2
This cycle involves the processes {P2, P4} and resources {R2, R4}.
4. Analyze the Impact of Aborting Processes:
• Aborting P2:
Since process P2 is a participant in both Cycle 1 and Cycle 2, aborting P2 releases the resources held by P2 (specifically R2) and cancels its outstanding requests. This breaks both cycles simultaneously, rendering the system completely deadlock free.
• Aborting P1 and P4:
Aborting P1 alone breaks Cycle 1 but leaves Cycle 2 intact. Aborting P4 alone breaks Cycle 2 but leaves Cycle 1 intact. However, aborting both P1 and P4 breaks both Cycle 1 and Cycle 2, which successfully makes the system deadlock free.
• Other Options:
Aborting P1 alone or P3 alone only breaks Cycle 1, leaving Cycle 2 active, so the deadlock would still persist.
Completely free for students. Educators & coaching institutes get 2 months free Pro trial to create tests.
Access unlimited practice questions, detailed step-by-step solutions, and exam study materials — completely free for students.
Create and conduct professional online assessments with AI question generation, tab proctoring, and comprehensive batch management.
Prepare for GATE 2026 Civil Engineering with the latest question papers, previous year papers, detailed solutions, syllabus, exam pattern, preparation tips, mock tests, and subject-wise study material. Download GATE 2026 CE question papers with solutions in PDF format and boost your preparation for top engineering institutes and PSU recruitment.
Prepare effectively for GATE 2026 Electronics & Communication Engineering (EC) with this comprehensive Question Paper with Solutions. This resource includes detailed explanations, concept-wise solutions, previous year paper analysis, and exam-oriented practice to help aspirants strengthen core subjects like Electronic Devices, Analog Circuits, Digital Circuits, Signals & Systems, Network Theory, Control Systems, Electromagnetics, Communications, and more. Perfect for revision, self-assessment, and boosting your GATE 2026 EC preparation strategy.
Copyright © 2026 Combe Labs Private Limited. All Rights Reserved.