1.

What Is A Deadlock And What Is A Live Lock? How Will You Go About Resolving Deadlocks?

Answer»
  • Deadlock occurs when TWO user processes/transactions have locks on 2 separate objects and each PROCESS is trying to acquire a lock on the object that has been acquired by the other process. In such a scenario each process is waiting for the other process to RELEASE the lock to acquire a lock on the object itself. When a request for exclusive lock is denied again and again because a series of overlapping shared locks are interfering with each other and to adapt from each other they keep on changing the STATUS, it is known as live lock.
  • One can resolve deadlocks by using TRY CATCH blocks. If the CODE inside a TRY statement fails, the CATCH automatically catches the control of the flow letting the transaction rollback and resume execution.



Discussion

No Comment Found