1. A deadlock is a situation where:
A) CPU is idle
B) Processes execute sequentially
C) A set of processes wait indefinitely for resources
D) A process terminates abnormally
C) A set of processes wait indefinitely for resources
2. How many necessary conditions must hold simultaneously for a deadlock to occur?
A) Two
B) Three
C) Four
D) Five
C) Four
3. Which of the following is NOT a necessary condition for deadlock?
A) Mutual exclusion
B) Hold and wait
C) Preemption
D) Circular wait
C) Preemption
4. Mutual exclusion means:
A) Only one process can use a resource at a time
B) Processes can share resources freely
C) Resources can be preempted
D) Processes do not block
A) Only one process can use a resource at a time
5. Hold and wait condition implies:
A) Process releases resources before requesting new ones
B) Process holds resources while waiting for additional ones
C) Resources are allocated only once
D) Processes never block
B) Process holds resources while waiting for additional ones
6. Circular wait condition means:
A) Processes form a chain waiting for resources
B) Processes execute in a circular fashion
C) CPU scheduling is circular
D) Processes share resources circularly
A) Processes form a chain waiting for resources
7. Which deadlock prevention strategy breaks the circular wait condition?
A) Allow resource sharing
B) Impose ordering on resource requests
C) Preempt resources
D) Avoid allocation
B) Impose ordering on resource requests
8. Deadlock prevention differs from avoidance because prevention:
A) Detects deadlock after it occurs
B) Ensures deadlock never occurs
C) Requires Banker’s algorithm
D) Uses rollback techniques
B) Ensures deadlock never occurs
9. Which deadlock handling method allows deadlock to occur and then recovers?
A) Prevention
B) Avoidance
C) Detection and recovery
D) Ignoring deadlock
C) Detection and recovery
10. Which deadlock handling strategy is used by most general-purpose operating systems?
A) Prevention
B) Avoidance
C) Detection
D) Ignoring deadlock
D) Ignoring deadlock
11. The Banker’s algorithm is used for:
A) Deadlock prevention
B) Deadlock avoidance
C) Deadlock detection
D) Deadlock recovery
B) Deadlock avoidance
12. Banker’s algorithm requires knowledge of:
A) Past CPU bursts
B) Maximum resource needs of processes
C) Process priorities
D) I/O burst times
B) Maximum resource needs of processes
13. A system is in a safe state if:
A) Deadlock has occurred
B) All resources are free
C) There exists a safe sequence of processes
D) CPU utilization is maximum
C) There exists a safe sequence of processes
14. Unsafe state means:
A) Deadlock will definitely occur
B) Deadlock cannot occur
C) Deadlock may occur
D) CPU is idle
C) Deadlock may occur
15. Which of the following can be used to model deadlocks?
A) State transition graph
B) Resource allocation graph
C) Gantt chart
D) Process tree
B) Resource allocation graph
16. Deadlock detection for single instance of each resource type uses:
A) Banker’s algorithm
B) Resource allocation graph
C) Wait-for graph
D) FIFO queue
C) Wait-for graph
17. Which of the following methods is used for deadlock recovery?
A) Resource preemption
B) Process termination
C) Rollback
D) All of the above
D) All of the above
18. Starvation differs from deadlock because starvation:
A) Involves circular wait
B) Affects only one process
C) Occurs due to scheduling policies
D) Both B and C
D) Both B and C
19. Which deadlock condition can be removed by allowing preemption?
A) Mutual exclusion
B) Hold and wait
C) No preemption
D) Circular wait
C) No preemption
20. Which algorithm checks system safety before allocating resources?
A) FCFS
B) Round Robin
C) Banker’s algorithm
D) Wait-for graph
C) Banker’s algorithm
21. Which of the following situations always leads to deadlock?
A) Circular wait
B) Hold and wait
C) Unsafe state
D) None of the above
D) None of the above
22. Which deadlock handling method has the lowest overhead?
A) Prevention
B) Avoidance
C) Detection
D) Ignoring deadlock
D) Ignoring deadlock
23. Which of the following is true about Banker’s algorithm?
A) It works only for single-instance resources
B) It guarantees deadlock occurrence
C) It avoids unsafe states
D) It detects deadlock
C) It avoids unsafe states
24. Which of the following actions can break deadlock?
A) Killing one process
B) Preempting a resource
C) Rollback
D) All of the above
D) All of the above
25. Which deadlock strategy is most practical in real systems?
A) Prevention
B) Avoidance
C) Detection and recovery
D) Ignore deadlock
D) Ignore deadlock