0
0
Operating Systemsknowledge~5 mins

Why deadlocks freeze system progress in Operating Systems - Quick Recap

Choose your learning style9 modes available
Recall & Review
beginner
What is a deadlock in an operating system?
A deadlock is a situation where two or more processes are stuck waiting for each other to release resources, so none can proceed.
Click to reveal answer
beginner
Why does a deadlock cause the system to freeze?
Because processes wait forever for resources held by each other, no process can continue, causing the system to stop making progress.
Click to reveal answer
intermediate
Name the four conditions necessary for a deadlock to occur.
1. Mutual exclusion: resources cannot be shared simultaneously.<br>2. Hold and wait: processes hold resources while waiting for others.<br>3. No preemption: resources cannot be forcibly taken away.<br>4. Circular wait: a cycle of processes each waiting for a resource held by the next.
Click to reveal answer
intermediate
How does circular wait contribute to deadlocks?
Circular wait means each process waits for a resource held by another process in a cycle, so none can proceed or release resources.
Click to reveal answer
intermediate
What is one common method to prevent deadlocks?
One method is to prevent one of the four necessary conditions, such as disallowing hold and wait by requiring processes to request all resources at once.
Click to reveal answer
Which of the following is NOT a condition for deadlock?
APreemption allowed
BHold and wait
CMutual exclusion
DCircular wait
What happens to processes involved in a deadlock?
AThey complete their tasks quickly
BThey release all resources immediately
CThey wait indefinitely for resources
DThey terminate automatically
Why does deadlock freeze system progress?
ABecause memory is freed
BBecause all processes run faster
CBecause the CPU overheats
DBecause processes are waiting on each other endlessly
Which condition involves a cycle of processes each waiting for a resource held by another?
ACircular wait
BHold and wait
CMutual exclusion
DNo preemption
How can deadlocks be prevented?
AAllow processes to hold resources while waiting
BAllow preemption of resources
CIgnore resource requests
DIncrease CPU speed
Explain in your own words why deadlocks cause a system to freeze.
Think about what happens when everyone waits for something no one releases.
You got /3 concepts.
    List and briefly describe the four conditions that must exist for a deadlock to happen.
    Remember the four rules that create a deadlock cycle.
    You got /4 concepts.