Which of the following best explains the main cause of a deadlock in an operating system?
Think about what happens when processes wait for each otherβs resources without releasing their own.
A deadlock happens when processes each hold a resource and wait for another resource held by another process, causing a cycle of waiting that never ends.
Which of the following is NOT one of the four necessary conditions for a deadlock to occur?
One condition involves forcibly taking resources away from processes.
Preemption means resources can be taken away, which prevents deadlocks. The other three conditions must all be true for deadlock.
When a deadlock freezes system progress, what is the immediate effect on the processes involved?
Consider what it means to be stuck waiting indefinitely.
In a deadlock, processes wait forever for resources held by each other, causing the system to freeze progress on those tasks.
Analyze why deadlocks cause the entire system or parts of it to freeze instead of just the involved processes.
Think about how resources are shared and how blocking one process can affect others.
Deadlocked processes hold resources that other processes need, causing a chain reaction that blocks many processes and freezes system progress.
Which strategy effectively prevents deadlocks and thus avoids freezing system progress?
Recall the four necessary conditions for deadlock and how breaking one can prevent it.
Preventing deadlocks involves ensuring that at least one of the four conditions (mutual exclusion, hold and wait, no preemption, circular wait) does not occur, thus avoiding system freeze.