(0) Methods for handling deadlock

  • Deadlock Prevention.
    Disallow one of the four necessary conditions for deadlock.
  • Deadlock Avoidance.
    Do not grant a resource request if this allocation have the potential to lead to a deadlock.
  • Deadlock Detection.
    Always grant resource request when possible. Periodically check for deadlocks. If a deadlock exists, recover from it.
  • Ignore the problem...
    Makes sense if the likelihood is very low.
Others:

  1. Ignore the problem and pretend that deadlocks would never occur
  2. Ensure that the system will never enter a deadlock state (prevention or avoidance)
  3. Allow the system to enter a deadlock state and then detect/recover

0 comments:

Post a Comment