What is a deadlock and what is a live lock? How will you go
about resolving deadlocks?
Answer Posted / kkkkkk
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 processDeak Lock is a situation when two or more process
continuous working and each having a lock on a particular
record but at a time only one can lock a particular and the
other one will go to dead lock.
A livelock is one, where a request for an exclusive lock
is repeatedly denied because a series of overlapping shared
locks keeps interfering. SQL Server detects the situation
after four denials and refuses further shared locks. A
livelock also occurs when read transactions monopolize a
table or page, forcing a write transaction to wait
indefinitely.A human example of live lock would be two people who meet
face-to-face in a corridor and each moves aside to let the
other pass, but they end up moving from side to side without
making any progress because they always move the same way at
the same time and never cross each other. This is good
example of live lock.
| Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
What is PROJECTION Operation?
How do I find the port number for sql server?
Describe in brief sql server monitoring ways.
How to apply cascading referential integrity in place of triggers?
What are the types of indexing?
What are different types of collation sensitivity?
How to get the definition of a view out of the sql server?
Explain the flow of creating a cube? : sql server analysis services, ssas
How extra digits are handled with numeric data type literals?
What is dirty page?
Which Model uses the SET concept
What are sp_configure commands and set commands?
what is the difference between writing data to mirrored drives versus raid5 drives. : Sql server administration
How should i optimize the time for execution of stored procedure having single input and many output from the different tables?
What happens to a statement batch if there is a compilation error?