Operating Systems | Deadlock | Question 2
Consider the following snapshot of a system running n processes. Process i is holding Xi instances of a resource R, 1 <= i <= n. currently, all instances of R are occupied. Further, for all i, process i has placed a request for an additional Yi instances while holding the Xi instances it already has. There are exactly two processes p and q such that Yp = Yq = 0. Which one of the following can serve as a necessary condition to guarantee that the system is not approaching a deadlock?
(A) min (Xp, Xq) < max (Yk) where k != p and k != q
(B) Xp + Xq >= min (Yk) where k != p and k != q
(C) max (Xp, Xq) > 1
(D) min (Xp, Xq) > 1
Answer: (B)
Explanation: Since both p and q don’t need additional resources, they both can finish and release Xp + Xq resources without asking for any additional resource. If the resources released by p and q are sufficient for another process waiting for Yk resources, then system is not approaching deadlock.
Quiz of this Question
Recommended Posts:
- Operating Systems | Deadlock | Question 1
- Operating Systems | Input Output Systems | Question 5
- Operating Systems | Input Output Systems | Question 5
- Operating Systems | Input Output Systems | Question 4
- Operating Systems | Input Output Systems | Question 2
- Operating Systems | Input Output Systems | Question 5
- Deadlock Detection in Distributed Systems
- Introduction of Deadlock in Operating System
- Program for Deadlock free condition in Operating System
- Operating Systems | CPU Scheduling | Question 3
- Operating Systems | CPU Scheduling | Question 2
- Operating Systems | CPU Scheduling | Question 4
- Operating Systems | CPU Scheduling | Question 5
- Operating Systems | CPU Scheduling | Question 7
- Operating Systems | CPU Scheduling | Question 1



