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 Generate a Series of Random Integers With T-SQL?
Explain trigger and its types?
what is a traditional network library for sql servers? : Sql server database administration
What are the functions in sql server?
What is row_number () and partition by in sql server?
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?
Explain unique key in sql server?
How column data types are determined in a view?
How to throw custom exception in Stored Procedure?
Is SET a SQL Keyword?
Can we add an identity column to decimal datatype?
Is truncate autocommit?