Thursday, August 20, 2009

Recovery or Deadlock Recovery

  • Abort all deadlock processes and release resource - too drastic - will lead to loss of work
  • Abort one process at a time - releasing resources until no deadlock
    How do we determine which process to abort first ? - priority ordering, process which has done least work
  • Selectively restart processes from a previous checkpoint i.e. before it claimed any resources
    difficult to achieve - sometimes impossible
  • Successively withdraw resources from a process and give to another process until deadlock is broken. How to choose which processes and which resources ?

  1. Complex decisions due to the large number of processes present within a system
  2. Difficult to automate
  3. Use Operator to resolve conflicts - BUT this requires the operator to have skill and understanding of what processes are actually doing
Process Termination:
· Abort all deadlocked processes.
· Abort one process at a time until the deadlock cycle is eliminated.
· In which order should we choose to abort?
 - Priority of the process.
 - How long process has computed, and how much longer to completion.
 - Resources the process has used.
 - Resources process needs to complete.
 - How many processes will need to be terminated.
 - Is process interactive or batch?

Resource Preemption

· Selecting a victim – minimize cost.
· Rollback – return to some safe state, restart process for that state.
· Starvation – same process may always be picked as victim, include
number of rollback in cost factor.

No comments: