Operating System Solutions
Operating System Solutions
Solutions
1. A system has a resource ‘Z’ with 20 instances; each process needs 5 instances to complete its
execution. What is the minimum process in the system that may cause deadlock?
(a) 4 (b) 5
(c) 10 (d) 6
Solution: Option (b)
2. A system has ‘n’ processes and each process need 2 instances of a resource. There are n+1
instances of resource provided. This could:
3. There are ‘m’ processes and ‘n’ instances of a Resource provided. Each process needs ‘P’
instances of the resource. In which case deadlock will never occur?
(a) (P - 1) m + 1 ≤ n (b) (P - 1) m ≤ n + 1
(c) (P - 1) m + 1 < n (d) (P - 1) m ≤ n + 1
4. There are 5 processes and 10 instances of a Resource. If each process needs ‘P’ instances
which is the minimum value of ‘P’ for the deadlock to occur?
(a) 1 (b) 2
(c) 3 (d) 4
5. There are 10 processes and 31 instances of a Resource. If each process needs ‘4’ instances of
the resource, this could:
1
(c) Deadlock might occur (d) None
(a) Necessary condition for deadlock (b) Sufficient condition for deadlock
(c) Unpredictable situation for deadlock (d) None of the above
(a) Necessary condition for deadlock (b) Sufficient condition for deadlock
(c) Unpredictable situation for deadlock (d) None of the above
10. Consider 3 Processes P1, P2 and P3 and 3 Resources R1, R2 and R3 and each process needs 2
instances of all the resources. This could: