Questions: Deadlock Detection and Recovery

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

An OS designer is choosing between deadlock prevention and deadlock detection-and-recovery for a high-throughput transaction server. Which consideration most strongly favors detection-and-recovery?

ADeadlocks are impossible to prevent in systems with multiple resource types
BPrevention algorithms always consume more memory than detection algorithms
CIf deadlocks are rare, the overhead of constraining every resource request outweighs the cost of occasionally recovering from one
DDetection-and-recovery guarantees that deadlocks are resolved within a fixed time bound
Question 2 Multiple Choice

A system has three resource types, each with multiple instances. Which technique correctly determines whether a deadlock currently exists?

AChecking for a cycle in the resource allocation graph
BSimulating resource allocation: mark processes that could complete with available resources, release their resources, and repeat; any unmarked process is deadlocked
CChecking whether the number of held resources exceeds the number of available resources
DChecking whether any process has been waiting longer than a defined threshold
Question 3 True / False

Terminating deadlocked processes one at a time — re-running the detection algorithm after each termination — is less destructive than terminating all deadlocked processes at once.

TTrue
FFalse
Question 4 True / False

A cycle in the resource allocation graph is sufficient to confirm that a deadlock exists, regardless of how many instances each resource type has.

TTrue
FFalse
Question 5 Short Answer

Why is the frequency at which the OS runs the deadlock detection algorithm a genuine engineering tradeoff, rather than simply a matter of running it as often as possible?

Think about your answer, then reveal below.