A SHORT POST ON DEADLOCK PREVENTION, DEADLOCK AVOIDANCE AND DEADLOCK DETECTION

in #steemstem7 years ago

DEADLOCK PREVENTION

This ensure that at least one of this conditions can not cope by preventing occurrence of a deadlock.

There are four ways to prevent deadlock

  • MUTUAL EXCLUSION
    Not require for shareable resources must hold for non-shareable resources.
  • COLD MUD
    This must guarantee that when ever a process requests a resources, it does not hold any other resources.
  • NO PREMPTION
    If a process that is holding some resources request another resources, that can not be immediately allocated to it, then all the resources currently being hold are released.
  • CIRCULAR WAIT
    Impose in total ordering of all resources types and require that each process request resources in an increasing order of enumeration.

    Image credit: Wikimedia Commons, public domain

DEADLOCK AVOIDANCE

  • Simplest and the most useful model requires that each process declare the maximum number of resources of each type that it may need.
  • The deadlock avoidance algorithm dynamically ex-ermines the result allocation state to the ensure that there can never be a circular wait condition. Resources allocation state as defined by the number of available and allocated resources and the maximum demands of the processes.

    Image credit: Wikimedia Commons, public domain

DEADLOCK DETECTION

If the system doesn't employ a deadlock prevention or a deadlock avoidance. An algorithm then a deadlock situation may occur. In those environment the system must be able to provide.

  • An algorithm that ex-ermine the state of a system to determine if a deadlock has occurred.
  • An algorithm to recover from a deadlock.

    Image credit: Wikimedia Commons, public domain
Sort:  

wow really nice post, dont forget to tell people that when they experience deadlock while using their pc they shouldn't dive for the power button
especially we nigerians

Hello! I find your post valuable for the wafrica community! Thanks for the great post! @wafrica is now following you! ALWAYs follow @wafrica and use the wafrica tag!

Coin Marketplace

STEEM 0.21
TRX 0.25
JST 0.038
BTC 97817.79
ETH 3421.47
USDT 1.00
SBD 3.12