DSA Factory
Free Deadlocks lessonsDeadlocks · Stage 1 · Avoidance and detection · Step 3

Detecting and recovering

Let deadlock happen, find the stuck processes with the same kind of check, and break it. About 13 minutes.

Quick check

A deadlock has been detected among three processes. Which is a valid way to recover?

  1. ATerminate one or more of them, or preempt a resource and roll a victim back
  2. BWait: the processes will resolve it themselves
  3. CRestart the whole machine every time
Show the answer

Terminate one or more of them, or preempt a resource and roll a victim back. Either releases resources that unblock the rest.

Lock it in

4 questions on this idea

Short questions that apply the idea to new cases: trace it, work out a number, put steps in order. A wrong answer explains itself.

Answer them in your browserFree account, no card. Your progress is saved, and the idea comes back in a quick review later.
Sign up free to solve