Thursday, August 20, 2009

Deadlock Prevention

No Preemption –
  • If a process that is holding some resources requests another resource that cannot be immediately allocated to it, then all resources currently being held are released.
  • Preempted resources are added to the list of resources for which the process is waiting.
  • Process will be restarted only when it can regain its old resources, as well as the new ones that it is requesting.
    Circular Wait – impose a total ordering of all resource types, and require that each process requests resources in an increasing order of enumeration.


Circular Wait – impose a total ordering of all resource types, and require that each process requests resources in an increasing order of enumeration.

Deadlock prevention - low device utilization and reduced system throughput.
Deadlock avoidance

  • Given the complete sequence of requests and releases for each process, we can decide for each request whether or not the process should wait.
  • For every request, the system
    tconsiders the resources currently available, the resources currently allocated, and the future requests and releases of each process, and
    decides whether the current request can be satisfied or must wait to avoid a possible future deadlock.

  1. considers the resources currently available, the resources currently allocated, and the future requests and releases of each process, and

  2. decides whether the current avoid a possible future deadlock.



No comments: