lecture9 - Deadlock Recovery, Avoidance and Prevention...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Deadlock Recovery ,Avoidance and Prev ention Recovering From Deadlock Once a deadlock has been detected, one of the 4 conditions must be invalidated to remove the dead- lock. Generally ,the system acts to remove the circular wait, because making a system suddenly preemptive with respect to resources, or making a resource suddenly sharable is usually impractical. Because resources are generally not dynamic, the easiest way to break such a cycle is to terminate a process. Usually the process is chosen at random, but if more is known about the processes, that information can be used. Forexample the largest or smallest process can be disabled. Or the one waiting the longest. Such discrimination is based on assumptions about the system workload. Some systems facilitate deadlock recovery by implementing checkpointing and rollback. Check- pointing is saving enough state of a process so that the process can be restarted at the point in the computa- tion where the checkpoint was taken. Autosaving file edits is a form of checkpointing. Checkpointing costs depend on the underlying algorithm. Very simple algorithms (likelinear primality testing) can be checkpointed with a fewwords of data. More complicated processes may have tosav e all the process state and memory. Checkpoints are taken less frequently than deadlock is checked for .Ifadeadlock is detected, one or more processes are restarted from their last checkpoint. The process of restarting a process from a check- point is called rollback .The hope is that the resource requests will not interleave again to produce dead- lock.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/28/2008 for the course CS 402 taught by Professor Tedfaber during the Spring '05 term at USC.

Page1 / 4

lecture9 - Deadlock Recovery, Avoidance and Prevention...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online