4 ch5
4 ch5
“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 avoid deadlock ____________
a) there must be a fixed number of resources to allocate
b) resource allocation must be done only once
c) all deadlocked processes must be aborted
d) inversion technique can be used
View Answer
Answer: a
Explanation: None.
This set of Operating System Multiple Choice Questions & Answers (MCQs) focuses on
“Deadlock Prevention”.
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.
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.
Process
P0
P1
P2
P3
P4
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.
This set of Operating System Multiple Choice Questions & Answers (MCQs) focuses on
“Deadlock Detection”.
5. What is the disadvantage of invoking the detection algorithm for every request?
a) overhead of the detection algorithm due to consumption of memory
b) excessive time consumed in the request to be allocated memory
c) considerable overhead in computation time
d) all of the mentioned
View Answer
Answer: c
6. A deadlock eventually cripples system throughput and will cause the CPU utilization to
______
a) increase
b) drop
c) stay still
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
7. Every time a request for allocation cannot be granted immediately, the detection
algorithm is invoked. This will help identify ____________
a) the set of processes that have been deadlocked
b) the set of processes in the deadlock queue
c) the specific process that caused the deadlock
d) all of the mentioned
View Answer
Answer: a
Explanation: None.
8. A computer system has 6 tape drives, with ‘n’ processes competing for them. Each
process may need 3 tape drives. The maximum value of ‘n’ for which the system is
guaranteed to be deadlock free is?
a) 2
b) 3
c) 4
d) 1
View Answer
Answer: a
Explanation: None.
10. ‘m’ processes share ‘n’ resources of the same type. The maximum need of each
process doesn’t exceed ‘n’ and the sum of all their maximum needs is always less than
m+n. In this setup, deadlock ____________
a) can never occur
b) may occur
c) has to occur
d) none of the mentioned
View Answer
Answer: a
This set of Operating System Questions and Answers for Experienced people focuses on
“Deadlock Recovery” and will also be useful for interview preparations for experienced
people.
2. The two ways of aborting processes and eliminating deadlocks are ____________
a) Abort all deadlocked processes
b) Abort all processes
c) Abort one process at a time until the deadlock cycle is eliminated
d) All of the mentioned
View Answer
Answer: c
Explanation: None.
6. If we preempt a resource from a process, the process cannot continue with its normal
execution and it must be ____________
a) aborted
b) rolled back
c) terminated
d) queued
View Answer
Answer: b
Explanation: None.
7. To _______ to a safe state, the system needs to keep more information about the states
of processes.
a) abort the process
b) roll back the process
c) queue the process
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
8. If the resources are always preempted from the same process __________ can occur.
a) deadlock
b) system crash
c) aging
d) starvation
View Answer
Answer: d
Explanation: None.