Deadlock Avoidance

Deadlock Avoidance:

  • It is the simplest and most friendly method.
  • It requires that each process declare the maximum number of resources of each type that it will need.
  • The deadlock-avoidance algorithm dynamically checks the resource-allocation state to ensure the system can never be in a circular-wait condition.
  • When a process requests a resource, the system must make sure that the allocation would leave the system in a safe state.
  • It the system is in a safe state, then there would be no deadlock. However, if it is in an unsafe state, that there is a possibility (not certainty) of a deadlock.
  • The avoidance approach requires that knowledge of all processes, all the resources available, the resources allocated presently and the future requests by the processes.
  • For a single instance of a resource type we use the resource allocation graph.
  • For multiple instance of a resource type, we use the banker’s algorithm.
  • A major drawback of this method is that it is difficult to know at the beginning itself of the maximum resource required.

Contributor's Info

Created:
0Comment