Tuesday, 5 August 2014

Blocking Vs Locking Vs Deadlock

Lock- Lock is a done by database when any connection access a same piece of data concurrently and another is demanding for it.

Block- It occurs when two connections need access to same piece of data concurrently and the meanwhile another is blocked because at a particular time, only one connection can have access.

Deadlock- Deadlock occurs when one connection is blocked and waiting for a second to complete its work, and this situation is again with another process as it waiting for first connection to release the lock. Hence deadlock occurs.
 1.DEAD LOCK:


2.BLOCKING:




3.LOCKING: