What is a deadlock and what is a live lock? How will you go
about resolving deadlocks?

Answers were Sorted based on User's Feedback



What is a deadlock and what is a live lock? How will you go about resolving deadlocks?..

Answer / swapna

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.

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

Is This Answer Correct ?    87 Yes 10 No

What is a deadlock and what is a live lock? How will you go about resolving deadlocks?..

Answer / sanjeev kumar

Dead Lock:
Deak 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

Live Lock:
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 ?    29 Yes 22 No

What is a deadlock and what is a live lock? How will you go about resolving deadlocks?..

Answer / nivethitha somu

Livelock : A condition that occurs when two or more
processes continually change their state in response to
changes in the other processes. The result is that none of
the processes will complete. An analogy is when two people
meet in a hallway and each tries to step around the other
but they end up swaying from side to side getting in each
other's way as they try to get out of the way.

Deadlock : A condition that occurs when two processes are
each waiting for the other to complete before proceeding.
The result is that both processes hang. Deadlocks occur most
commonly in multitasking and client/server environments.
Ideally, the programs that are deadlocked, or the operating
system, should resolve the deadlock, but this doesn't always
happen.

Is This Answer Correct ?    9 Yes 2 No

What is a deadlock and what is a live lock? How will you go about resolving deadlocks?..

Answer / gayatri soni

Deadlock occur in interconnection n/w when group of process
are unable to act because of waiting each other to release
some resorce.

live lock- packets continue to move through n/w, but does
not advance towards destination.

Is This Answer Correct ?    7 Yes 2 No

What is a deadlock and what is a live lock? How will you go about resolving deadlocks?..

Answer / 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

What is a deadlock and what is a live lock? How will you go about resolving deadlocks?..

Answer / cheti

Deadlock is a sitiuation wher a group of processes are
permanetly blocked as result of each process having
acquired a subset of the resources needed for its
completion and waiting for release of remaining resources
held by others in the same group.Thus,making it impossible
for any of the process to proceed.

Livelock:- Sorry

Is This Answer Correct ?    7 Yes 5 No

What is a deadlock and what is a live lock? How will you go about resolving deadlocks?..

Answer / soma

transaction is said to be in the state of live-lock if it
cannot proceed for a indefinite period of time while the
other transaction in the system continue normally. this may
occur if the waiting scheme for lock item is unfair giving
priority to some other transaction.

deadlock: is a situation where two or more transaction are in
a simultaneous wait sate,each of them wait for the other to
release a lock before it can proceed.

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More SQL Server Interview Questions

How to Generate a Series of Random Integers With T-SQL?

1 Answers  


Explain trigger and its types?

0 Answers  


what is a traditional network library for sql servers? : Sql server database administration

0 Answers  


What are the functions in sql server?

0 Answers  


What is row_number () and partition by in sql server?

0 Answers  






When does the auto update index statistics feature in sql server turn itself on?q) what specific conditions database should meet, before you can bulk copy data into it using bcp?

0 Answers  


Explain unique key in sql server?

0 Answers  


How column data types are determined in a view?

0 Answers  


How to throw custom exception in Stored Procedure?

0 Answers   MCN Solutions,


Is SET a SQL Keyword?

4 Answers   BitWise,


Can we add an identity column to decimal datatype?

0 Answers  


Is truncate autocommit?

0 Answers  


Categories