Rss Feed

DEADLOCK

DEADLOCK RECOVERY


{} Recovery from Deadlock: 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.F How many processes will need to be terminated.

* Is process interactive or batch?


Abort all deadlocked processes - this method clearly will break the deadlock cycle, but at a great expense, since these processes may have computed for a long time, and the results of these partial computations must be discarded, and probably must be recomputed later.


Abort one process at a time until the deadlock cycle is eliminated - this method incurs considerable overhead, since, after each process is aborted, a deadlock-detection algorithm must be invoked to determine whether any processes are still deadlock.


Minimum cost


{} Recovery from Deadlock: 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.




0 comments: