🎓 BookMCQ
← Back to Operating System

📖 7. Deadlocks

📖 From Operating System • 880 questions available

About 7. Deadlocks

A deadlock is a situation where two or more processes are stuck, waiting for each other to release a resource, and as a result, none of them can proceed. Imagine two cars arriving at an intersection from different directions, each waiting for the other to go. They are stuck forever unless an external force intervenes. In a computer, this happens when, for example, Process A has a file and needs a printer, while Process B has the printer and needs the same file. Both are waiting, and neither can finish.

For a deadlock to occur, four specific conditions must be met: mutual exclusion (resources cannot be shared), hold and wait (a process holds resources while waiting for others), no preemption (resources cannot be forcibly taken away), and circular wait (a cycle of processes each waiting for the next). The OS can deal with deadlocks in three ways: by preventing one of these conditions, by avoiding them using careful planning (like an algorithm), or by detecting them and recovering (for example, by forcibly terminating one of the processes). The goal is to ensure that the system doesn't grind to a halt.


Practice MCQs for 7. Deadlocks. Test your knowledge with carefully crafted questions across easy, medium, and hard difficulty levels.

🔄 Last updated: 2026-07-11

184
Easy
426
Medium
270
Hard

📌 Topics in this Chapter

Banker's Algorithm in Deadlock Avoidance
49 MCQsView →
Circular Wait Deadlock Prevention
78 MCQsView →
Deadlock Avoidance in Operating System
38 MCQsView →
Deadlock Characterization in Operating System
47 MCQsView →
Deadlock Detection Algorithm Usage
43 MCQsView →
Deadlock Detection in Operating System
37 MCQsView →
Deadlocks Introduction in Operating System
45 MCQsView →
Deadlocks System Model in Operating System
51 MCQsView →
Hold and Wait Deadlock Prevention
48 MCQsView →
Methods for Handling Deadlocks in Operating System
47 MCQsView →
Multiple Instance Deadlock Detection
48 MCQsView →
Mutual Exclusion Deadlock Prevention
44 MCQsView →
Necessary Conditions for Deadlock Characterization
45 MCQsView →
Process Termination and Recovery from Deadlock
22 MCQsView →
Recovery from Deadlock in Operating System
41 MCQsView →
Resource Allocation Graph Algorithm in Deadlock Avoidance
49 MCQsView →
Resource Allocation Graph for Deadlock Characterization
31 MCQsView →
Resource Preemption and Recovery from Deadlock
23 MCQsView →
Safe State in Deadlock Avoidance
51 MCQsView →
Single Instance of Each Resource Type Deadlock Detection
43 MCQsView →