Operating System Multiple Choice Questions
Operating System Multiple Choice Questions
– Deadlock
This set of Operating System Multiple Choice Questions & Answers (MCQs) focuses on
“Deadlock”.
9. Which one of the following is a visual ( mathematical ) way to determine the deadlock
occurrence?
a) resource allocation graph
b) starvation graph
c) inversion graph
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
10. To ensure that the hold and wait condition never occurs in the system, it must be
ensured that ____________
a) whenever a resource is requested by a process, it is not holding any other resources
b) each process must request and be allocated all its resources before it begins its
execution
c) a process can request resources only when it has none
d) all of the mentioned
View Answer
Answer: d
Explanation: c – A process may request some resources and use them. Before it can can
request any additional resources, however it must release all the resources that it is
currently allocated.
11. The disadvantage of a process being allocated all its resources before beginning its
execution is ____________
a) Low CPU utilization
b) Low resource utilization
c) Very high resource utilization
d) None of the mentioned
View Answer
Answer: b
Explanation: None.
12. To ensure no preemption, if a process is holding some resources and requests another
resource that cannot be immediately allocated to it ____________
a) then the process waits for the resources be allocated to it
b) the process keeps sending requests until the resource is allocated to it
c) the process resumes execution without the resource being allocated to it
d) then all resources currently being held are preempted
View Answer
Answer: d
Explanation: None.
13. One way to ensure that the circular wait condition never holds is to ____________
a) impose a total ordering of all resource types and to determine whether one precedes
another in the ordering
b) to never let a process acquire resources that are held by other processes
c) to let a process wait for only one resource at a time
d) all of the mentioned
View Answer
Answer: a
Explanation: None.
Operating System Questions and Answers –
Deadlock Avoidance
This set of Operating System Multiple Choice Questions & Answers (MCQs) focuses on
“Deadlock Avoidance”.
1. Each request requires that the system consider the _____________ to decide whether
the current request can be satisfied or must wait to avoid a future possible deadlock.
a) resources currently available
b) processes that have previously been in the system
c) resources currently allocated to each process
d) future requests and releases of each process
View Answer
Answer: a
Explanation: None.
2. Given a priori information about the ________ number of resources of each type that
maybe requested for each process, it is possible to construct an algorithm that ensures that
the system will never enter a deadlock state.
a) minimum
b) average
c) maximum
d) approximate
View Answer
Answer: c
Explanation: None.
7. A system has 12 magnetic tape drives and 3 processes : P0, P1, and P2. Process P0
requires 10 tape drives, P1 requires 4 and P2 requires 9 tape drives.
Process
P0
P1
P2
10. The Banker’s algorithm is _____________ than the resource allocation graph algorithm.
a) less efficient
b) more efficient
c) equal
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
11. The data structures available in the Banker’s algorithm are ____________
a) Available
b) Need
c) Allocation
d) All of the mentioned
View Answer
Answer: d
Explanation: None.
13. A system with 5 processes P0 through P4 and three resource types A, B, C have A with
10 instances, B with 5 instances, and C with 7 instances. At time t0, the following snapshot
has been taken:
Process
P0
P1
P2
P3
P4
Allocation (process-wise : P0 through P4 top TO bottom)
A B C
0 1 0
2 0 0
3 0 2
2 1 1
0 0 2
Available
A B C
3 3 2
The sequence <P1, P3, P4, P2, P0> leads the system to ____________
a) an unsafe state
b) a safe state
c) a protected state
d) a deadlock
View Answer
Answer: b
Explanation: None.