Question Details

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?

Options

A

Aborting P1​ makes the system deadlock free.

B

Aborting P3​ makes the system deadlock free.

C

Aborting P2  makes the system deadlock free.

D

Aborting P1​ and P4​ makes the system deadlock free.

Show Answer
Correct Answer
D
Aborting P1​ and P4​ makes the system deadlock free.
C
Aborting P2  makes the system deadlock free.

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: P = { P1 , P2 , P3 , P4 }
Resources (single unit each): R = { R1 , R2 , R3 , R4 } (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.

Transparent Access on Mindyard

Built for Learners & Educators Alike

Completely free for students. Educators & coaching institutes get 2 months free Pro trial to create tests.

FREE FOR STUDENTS

Practice & Learn Free for Students

Access unlimited practice questions, detailed step-by-step solutions, and exam study materials — completely free for students.

  • Unlimited mock tests & question bank practice
  • Full access to curated study library & formula notes
  • 100% free for students • No credit card required
2 MONTHS FREE TRIAL

Educators & Coaching Institutes

Create and conduct professional online assessments with AI question generation, tab proctoring, and comprehensive batch management.

  • AI question uploader & rapid test generator
  • Anti-cheating tab proctoring & performance reports
  • Full Pro access free for 60 days • No upfront commitment
Discover more resources

You may also like

Mock Tests

View All
  • GATE
  • beginner
  • 3 hours
  • civil engineering

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.

  • GATE
  • beginner
  • 3 hours
  • electronics and communication engineering

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.

Ask AI Tutor
5 left
Q1 View Question & Options
AI Tutor is solving this question...
Reading question context & options...
Ask your own doubt or choose a quick prompt: