Deadlock escape
![deadlock escape deadlock escape](https://the-post-assets.sgp1.digitaloceanspaces.com/2022/06/Untitled-design-2022-06-08T125031.117.jpg)
There are few conditions in which a deadlock may arise. Hadoop, Data Science, Statistics & others Deadlock should be avoided as because of it the entire system comes to rest. Similarly, Resource 1 is held by Process 2 and Process 2 needs Resource 2. Resource 2 is held by Process 1 and Process 1 needs Resource 1. We can understand the situation better by the below diagram.
![deadlock escape deadlock escape](https://www.deadlockescape.com/wp-content/uploads/2017/11/area51-1170x658.png)
In the state of deadlock, no tasks get completed and they remain in the state of waiting for an indefinite time.
![deadlock escape deadlock escape](https://cdn.slidesharecdn.com/ss_thumbnails/deadlock-180425132401-thumbnail-4.jpg)
As a result of the above scenario, none of the tasks gets completed and this is known as deadlock. In this situation both the transactions wait for each other to release the lock and the processes end up waiting for each other to release the resources. Also, there exists another transaction T2 that has a lock on the table Salary and it also requires updating a few rows in the Employee table which already is held by the transaction T1.
#DEADLOCK ESCAPE UPDATE#
In order to understand the deadlock concept better, let us consider a transaction T1 which has a lock on a few rows in the table Employee and it requires to update some rows in another table Salary. A Deadlock in DBMS can be termed as the undesirable condition which appears when a process waits for a resource indefinitely whereas this resource is detained by another process.