SQL Server: Deadlock Vs LiveLock

The main difference between the Deadlock and the Livelock is as under:

1. 
DEADLOCK:
A deadlock occurs when two or more tasks permanently block each other by each task having a lock on a resource which the other tasks are trying to lock. In Other words, Deadlock is a situation when two processes, each having a lock on one piece of data, attempt to acquire a lock on the other's piece.
Each process would wait indefinitely for the other to release the lock, unless one of the user processes is terminated. SQL Server detects deadlocks and terminates one user's process.

      2. LIVE LOCK: A Live lock is one, where a request for exclusive lock is denied continuously because a series of overlapping shared locks keeps on interfering each other and to adapt from each other they keep on changing the status which further prevents them to complete the task. In SQL Server Live Lock occurs when read transactions are applied on table which prevents write transaction to wait indefinitely. This is different than deadlock as in deadlock both the processes wait on each other.

Ebook Download
View all
Learn
View all
F11Research & Development, LLC