In this section of Operating System CPU Scheduling MCQs.it contain Operating System Process Management – Deadlock Detection MCQs (Multiple Choice Questions Answers).All the MCQs (Multiple Choice Question Answers) requires in detail reading of Operating System subject as the hardness level of MCQs have been kept to advance level.
1. In Deadlock Detection Algorithm The wait-for graph scheme is applicable to
- a resource-allocation system with multiple instances of each resource type
- a resource-allocation system with Single instances of each resource type
- A and B
- None of the above
2. wait-for graph can be obtained from the resource-allocation graph by
- removing the resource nodes and collapsing the appropriate edges.
- collapsing the resource nodes and removing the appropriate edges.
- A and B
- None of the above
3. an edge from Pi to Pj in a wait-for graph implies that
- process Pj is waiting for process Pi to release a resource that Pi needs
- process Pj is waiting for process Pi to release a resource that Pi needs
- process Pi is waiting for process Pj to release a resource that Pj needs
- process Pi is waiting for process Pj to release a resource that Pi needs
4. An edge Pi → Pj exists in a wait-for graph if and only if
- the corresponding resource allocation graph contains two edges Pj → Rq and Rq → Pi for some resource Rq
- the corresponding resource allocation graph contains two edges Rq → pi and Pi → Rq for some resource Rq
- the corresponding resource allocation graph contains two edges Pi → Rq and Rq → Pj for some resource Rq
- All of the above
5. a deadlock exists in the system if and only if the wait-for graph contains a
- Cycle
- No Cycle
- Square
- All of the above
6. To detect deadlocks, the system needs to maintain the wait for graph and periodically invoke an algorithm that searches for a cycle in the graph. An algorithm to detect a cycle in a graph requires an
- order of n2 operations, where n is the number of vertices in the graph.
- order of n^2 operations, where n is the number of vertices in the graph.
- order of n2 operations, where n is the number of edges in the graph.
- order of n^2 operations, where n is the number of edges in the graph
7. When should we invoke the detection algorithm?
- How often is a deadlock likely to occur?
- How many processes will be affected by deadlock when it happens?
- All of the above
- None of the above
If deadlocks occur frequently, then the detection algorithm should be invoked
frequently. Resources allocated to deadlocked processes will be idle until the
deadlock can be broken. In addition, the number of processes involved in the
deadlock cycle may grow.
Deadlocks occur only when some process makes a request that cannot be
granted immediately. This request may be the final request that completes a
chain of waiting processes. In the extreme, then, we can invoke the deadlockdetection algorithm every time a request for allocation cannot be granted immediately.
8. invoking the deadlock-detection algorithm for every resource request will incur considerable overhead in
- seek time
- invoke time
- computation time
- All of the above
A less expensive alternative is simply to invoke the algorithm at defined intervals—for example,
Once per hour or whenever CPU utilization drops below 40 percent. (A deadlock eventually cripples system throughput and causes CPU utilization to drop.) If the detection algorithm is invoked at arbitrary points in time, the resource Graph may contain many cycles. In this case, we generally cannot tell which of the many deadlocked processes “caused” the deadlock.