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
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 |
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 |
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 |
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 |
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 |
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 |
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 |
How to insert and update data into a table with "insert" and "update" statements?
Explain the third normal form(3nf)?
Does any body please help me what question's have asked for SSRS in the interview?
In join, which clause in not used?
How to select true false based on column value in sql server?
Create Index myIndex On myTable(myColumn) What type of Index will get created after executing the above statement
Differentiate between a local and a global temporary table?
How to add a new dsn with the odbc driver for sql server?
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?
What is the importance of three tier architecture?
What is mean by clustered index and non clustered index, give syntax of creation? : sql server database administration
What is replication with database mirroring? : sql server database administration