A deadlock situation may occur if and only four necessary conditions hold simultaneously in the system: mutual exclusion, hold and wait, no preemption, and circular wait. To prevent deadlocks, we ensure that at least one of the necessary conditions never holds.
Another method for avoiding deadlocks that is less stringent than the prevention algorithms is to have a priori information on how each process will be utilizing the resources. The banker’s algorithm, for example, needs to know the maximum number of each resource class that may be requested by each process. Using this information, we can define a deadlock-avoidance algorithm.
Thursday, August 20, 2009
Deadlock: Deadlock Prevention
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment