Thursday, 22 October 2020

Deadlock Handling Strategies

 


The various strategies for handling deadlock are-


  • Deadlock Prevention
  • Deadlock Avoidance
  • Deadlock Detection and Recovery
  • Deadlock Ignorance

Deadlock Prevention

It ensure that the four condition for deadlock do not occur simultaneously.

Deadlock Avoidance-

  • It analyses the allocation state to determine whether granting a request of resource might to deadlock later.
  • Banker’s Algorithm is an example of a deadlock avoidance strategy.
  • RAG (Resource Allocation Graph) is also is an example of a deadlock avoidance strategy.

Deadlock Detection and Recovery-

  • This strategy involves waiting until a deadlock occurs.
  • After deadlock occurs, the system state is recovered.
  • The main challenge with this approach is detecting the deadlock.

Deadlock Ignorance-

  • This strategy involves ignoring the concept of deadlock and assuming as if it does not exist.
  • This strategy helps to avoid the extra overhead of handling deadlock.
  • Windows and Linux use this strategy and it is the most widely used method.
  • It is also called as Ostrich approach.

No comments:

Post a Comment