Methods For Deadlock Handling/ Deadlock handling in DBMS.

In this blog post(Methods For Deadlock Handling) we are going to let you know about the methods of deadlock handling. Here we will explain to you about how to handle the deadlock in DBMS.

What are the three methods of recovery from deadlock or Deadlock Handling?|Methods For Deadlock Handling?

Methods For Deadlock Handling:

There are three methods for deadlock handling:

  1. Ensuring that a deadlock state will never occur – To make sure this condition there are two techniques used which are explained below:

Deadlock prevention:

In this scheme, deadlock is prevented by ensuring that at least one condition occurs out of four conditions (mutual exclusion, hold and wait, no preemption, circular wait) required for occurring deadlock state.

Deadlock avoidance:

This scheme requires additional information about how resources will be requested by a process in its lifetime. With this information, it takes a decision whether a resource should be allocated to the processor it should wait.
Here, all available resources are allocated currently and resources that will be requested in the future are kept in the account.

2. After occurring deadlock:

In this system we allow the system to enter a deadlock state, detect it, and recover. In this environment, the system can provide an algorithm that examines the state of the system to determine whether a deadlock has occurred, and an algorithm to recover from the deadlock.

3. Some system does not ensure that a deadlock will never occur.

And also does not provide a mechanism for deadlock detection and recovery, then we may arrive at a situation where the system is in a deadlock state yet has no way of recognizing what has happened.

This method is not a viable, approach to the deadlock problem, however, in many systems deadlocks occur infrequently, once per year, thus this method is cheaper than the costly deadlock prevention, deadlock avoidance, or deadlock detection and recovery methods that must be used constantly. Also, in some circumstances the system is in a frozen state but not in a deadlock state.

You can go through the below given extensive blogs related to deadlocks.

Deadlock in the distributed operating system in Hindi

Deadlock Avoidance In Operating System

Methods For Deadlock Prevention

In the case of any queries, you can write to us at [email protected] we will get back to you ASAP.

Hope! you would have enjoyed this post Methods For Deadlock Handling.

Please feel free to give your important feedback in the comment section below|Methods For Deadlock Handling|

Have a great time! Sayonara!


I am a blogger by passion, a software engineer by profession, a singer by consideration and rest of things that I do is for my destination.