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 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 deadlock state will never occur – To make sure this condition there are two techniques used which is 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. By 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 will be requested in the future are kept in the account.

2. After occuring deadlock:

In this system we allow the system to enter a deadlock state, detect it, and recover. In this enviroment the system can provide an algorithm that examine 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 deadlock state yet has no way of recognizing what has happened.


This method is not viable, approach to the deadlock problem, however, in many system deadlock 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 feedbacks in the comment section below|Methods For Deadlock Handling|

Have a great time! Sayonara!

Anurag

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.