NEW
Font size
WorksheetsSE A-OS-Deadlock
Total questions: 10
Worksheet time: 8mins
1. Deadlock Characterization:
Q1. Which of the following is NOT a necessary condition for deadlock?
a) Mutual Exclusion
b) Hold and Wait
c) No Preemption
d) Circular Wait
2. Methods for Handling Deadlocks:
Q2. Which method for handling deadlocks allows the system to keep track of resource allocation and requests to prevent circular waits?
a) Deadlock Detection
b) Deadlock Avoidance
c) Deadlock Prevention
d) Deadlock Recovery
3. Deadlock Prevention:
Q3. Which technique aims to prevent a deadlock by requiring that each process request and hold all its needed resources at once?
a) Wait-Die
b) Wound-Wait
c) Resource Allocation Graph
d) Banker's Algorithm
4. Deadlock Avoidance:
Q4. In the context of deadlock avoidance, what is the purpose of a "safety algorithm"?
a) To determine if a system is in a safe state
b) To detect deadlock occurrences
c) To preempt resources from processes
d) To recover from a deadlock
5. Deadlock Detection:
Q5. What is the primary advantage of deadlock detection and recovery over deadlock prevention?
a) It is more efficient.
b) It can handle complex resource allocation scenarios.
c) It allows for higher resource utilization.
d) It ensures no process ever enters a deadlock state.
6. Recovery from Deadlock:
Q6. In a recovery mechanism for deadlocks, what is the main goal?
a) To prevent processes from requesting resources.
b) To restart all processes involved in the deadlock.
c) To terminate some processes and release their resources.
d) To keep processes in a wait state indefinitely.
7. Deadlock Detection:
Q7. Which data structure is commonly used to represent the current state of resources and processes for deadlock detection?
a) Priority queue
b) Hash table
c) Wait-for graph
d) Linked list
8. Deadlock Prevention:
Q8. In the context of deadlock prevention, what does "mutual exclusion" refer to?
a) Processes can request resources without waiting.
b) Processes can release resources before they are finished.
c) Only one process can use a resource at a time.
d) Resources are never preempted.
9. Deadlock Avoidance:
Q9. What is the main idea behind the Banker's Algorithm for deadlock avoidance?
a) Allow processes to request any resource at any time.
b) Monitor and prevent processes from entering the system.
c) Grant resources to processes only if it will not lead to deadlock.
d) Restart processes that are in a deadlock state.
10. Recovery from Deadlock:
Q10. What is the disadvantage of simply restarting all processes when a deadlock is detected?
a) It may lead to resource wastage.
b) It is a very time-consuming process.
c) It requires manual intervention.
d) It does not guarantee the elimination of the deadlock.
