ProAnswers.org

What are deadlock prevention techniques?

  1. Mutual exclusion : Some resources such as read only files shouldn’t be mutually

exclusive. They should be sharable. But some resources such as printers must be

mutually exclusive.

  1. Hold and wait : To avoid this condition we have to ensure that if a process is

requesting for a resource it should not hold any resources.

  1. No preemption : If a process is holding some resources and requests another

resource that cannot be immediately allocated to it (that is the process must wait),

then all the resources currently being held are preempted(released autonomously).

  1. Circular wait : the way to ensure that this condition never holds is to impose a

total ordering of all the resource types, and to require that each process requests

resources in an increasing order of enumeration.