In: Computer Science
What is the difference among deadlock avoidance, detection, and prevention?
Deadlock prevention constrains resource requests to prevent at least one of the four conditions of deadlock; this is either done indirectly, by preventing one of the three necessary policy conditions (mutual exclusion, hold and wait, no preemption), or directly, by preventing circular wait.
Deadlock avoidance allows the three necessary conditions, but makes judicious choices to assure that the deadlock point is never reached.
With Deadlock detection, requested resources are granted to processes whenever possible; periodically, the operating system performs an algorithm that allows it to detect the circular wait condition.
With Deadlock detection, requested resources are granted to processes whenever possible; periodically, the operating system performs an algorithm that allows it to detect the circular wait condition.