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 insert and update data into a table with "insert" and "update" statements?

0 Answers  


Explain the third normal form(3nf)?

0 Answers  


Does any body please help me what question's have asked for SSRS in the interview?

0 Answers  


In join, which clause in not used?

4 Answers   HCL, NIIT, TCS,


How to select true false based on column value in sql server?

0 Answers  






Create Index myIndex On myTable(myColumn) What type of Index will get created after executing the above statement

3 Answers  


Differentiate between a local and a global temporary table?

0 Answers  


How to add a new dsn with the odbc driver for sql server?

0 Answers  


What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?

0 Answers  


What is the importance of three tier architecture?

0 Answers   QuestPond,


What is mean by clustered index and non clustered index, give syntax of creation? : sql server database administration

0 Answers  


What is replication with database mirroring? : sql server database administration

0 Answers  


Categories