Thursday, August 20, 2009

5.deadlock recovery
•Pre-emption–take resources from a process and give to others

–how to select a victim?

»order of precedence for pre-empting
»number of resources already held
»how many more will it need to complete?
»amount of CPU time already used–swapping process out of memory may be sufficient
»but may still hold resources involved in deadlock

–may need to roll pre-empted process back

»back to some safe restart point or go back to beginning
»may need to checkpoint processes
»not convenient for user interaction!

–need to avoid starvation of a low priority process always being pre-empted

»include number of previous pre-emptions as a choice factor

No comments:

Post a Comment