engineering recuitment GATE CSE 2023-24 Test Series Operating Systems Deadlock Conditions For Deadlock
Consider four processes P1, P2, P3, P4, and four resources R1, R2, R3, R4:
Case 1: P1 holds R1 and is asking for R2. P2 holds R3 and is asking for R1. P3 holds R4 and is asking for R3. P4 holds R2 and is asking for R4.
Case 2: P1 holds R1 and is asking for R2. P2 holds R3 and is asking for R1. P3 holds R4 and is asking for R3 and P4 is idle.
Which of the following statement is correct?
1
In case 2, process P1, P2 are participating in circular wait, mutual exclusion, and preemption.
2
In case 2, process P1, P2, and P3 are participating in hold-and-wait, mutual exclusion, and no preemption.
3
In case 1, process P1 and P3 are participating in circular wait, mutual exclusion, and preemption.
4
In case 1, process P1, P2, and P3 are participating in hold-and-wait, mutual exclusion, and no preemption.