Prevention: To prevent a deadlock, the operating system must eliminate one of the four necessary conditions for deadlock, a task complicated by the fact that the same condition cannot be eliminated from every resource.
Avoidance: Even if the operating system cannot remove one of the conditions for deadlock, it can avoid one if the system knows ahead of time the sequence of requests associated with each of the active processes. There exists at least one allocation of resources sequence that will allow jobs to continue without becoming deadlocked.
Detection: The detection algorithm can be explained by “reducing” directed resource graphs.
Recovery: Once a deadlock has been detected, it must be untangled and the system returned to normal as quickly as possible. There are several recovery algorithms, but they all have one feature in common: They all require at least one victim, an expendable job, which, when removed from the deadlock, will free the system. Unfortunately for the victim, removal generally requires that the job be restarted from the beginning or from a convenient midpoint.
Differentiate the common configurations of multiprocessing systems.
Explain the conditions necessary for a deadlock to occur. If given the option of removing one condition to prevent deadlock, which condition would you choose, and why?
Explain the different deadlock handling strategies. Which strategies would you implement to remove deadlocks in the cases of disk sharing, database sharing, and multiple device allocation? Select a suitable strategy in each case and provide reasons for your choices.