Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the sources as follows if executed independently.
Process P1:
t=0: requests 2 units of R2
t=1: requests 1 unit of R3
t=3: requests 2 units of R1
t=5: releases 1 unit of R2
and 1 unit of R1.
t=7: releases 1 unit of R3
t=8: requests 2 units of R4
t=10: Finishes
Process P2:
t=0: requests 2 units of R3
t=2: requests 1 unit of R4
t=4: requests 1 unit of R1
t=6: releases 1 unit of R3
t=8: Finishes
Process P3:
t=0: requests 1 unit of R4
t=2: requests 2 units of R1
t=5: releases 2 units of R1
t=7: requests 1 unit of R2
t=8: requests 1 unit of R3
t=9: Finishes
Which one of the following statements is TRUE if all three processes run concurrently starting at time t=0?
(A) All processes will finish without any deadlock
(B) Only P1 and P2 will be in deadlock.
(C) Only P1 and P3 will be in a deadlock.
(D) All three processes will be in deadlock
Answer: (A)
Explanation:
We can apply the following Deadlock Detection algorithm and see that there is no process waiting indefinitely for a resource. See this for deadlock detection algorithm.
Recommended Posts:
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 38
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 59
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 60
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 61
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 62
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 63
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 64
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 65
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 58
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 57
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 39
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 40
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 41
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 42
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 43
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 44
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 45
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 46
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 47
- GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 49

