0% found this document useful (0 votes)
2K views2 pages

Operating System Solutions

This document contains 10 multiple choice questions about operating system concepts related to deadlocks. The questions cover topics such as the minimum number of processes needed to cause a deadlock, conditions required for deadlocks to occur or not occur, and whether certain states indicate a process will or will not experience deadlock. Each question is followed by the correct solution.

Uploaded by

Vibhor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views2 pages

Operating System Solutions

This document contains 10 multiple choice questions about operating system concepts related to deadlocks. The questions cover topics such as the minimum number of processes needed to cause a deadlock, conditions required for deadlocks to occur or not occur, and whether certain states indicate a process will or will not experience deadlock. Each question is followed by the correct solution.

Uploaded by

Vibhor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

OPERATING SYSTEM

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:

(a) lead to deadlock (b) lead to starvation & the deadlock


(c) never leads to deadlock (d) none

Solution: Option (c)

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

Solution: Option (a)

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

Solution: Option (c)

5. There are 10 processes and 31 instances of a Resource. If each process needs ‘4’ instances of
the resource, this could:

(a) Lead to deadlock (b) Deadlock will never occur

1
(c) Deadlock might occur (d) None

Solution: Option (b)

6. If a process is in safe state, then:

(a) It will never go to deadlock (b) It might lead to deadlock


(c) It will definitely lead to deadlock (d) None

Solution: Option (a)

7. If a process is in unsafe state, then:

(a) It is in deadlock (b) It might successfully complete


(c) It will lead to deadlock (d) None of the above

Solution: Option (b)

8. In a single instance Resource allocation graph (Wait for graph) cycle is a:

(a) Necessary condition for deadlock (b) Sufficient condition for deadlock
(c) Unpredictable situation for deadlock (d) None of the above

Solution: Option (b)

9. In a Multiple instance Resource allocation graph, cycle is a:

(a) Necessary condition for deadlock (b) Sufficient condition for deadlock
(c) Unpredictable situation for deadlock (d) None of the above

Solution: Option (a)

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:

(a) lead to deadlock (b) deadlock will never occur


(c) can’t say due to insufficient data (d) none

Solution: Option (c)

You might also like