RDBMS SEMINAR
Specialized Locking Techniques :
The concurrency control technique in which the value of the lock variable is manipulated is called locking.
The technique of locking is one way to Ensure Serializability in DBMS.
In DBMS, locking is the responsibility of a subsystem called lock manager.
Binary Locks :
A binary lock has two states or values associated with each data item. These values are:
Locked – 1
Unlocked – 0
Locked (A):
To access a data item in the database.
Unlocked (B):
After completion of transaction.
Lock – S : Read data item value.
Lock – X : Both read and write.
Shared Locks :
It’s Denote as “Lock – s”.
It’s also Known as a ‘Read – Only Lock’.
In a shared lock, the data item can only read by the transaction.
When the transaction holds a shared lock, then no one can update the data item in the database.
Exclusive Locks :
It’s denote as “Lock – x”.
In exclusive Lock, the data item can be both reads as wells as written by the transaction.
In Exclusive lock, Multiple Transactions do not modify the same data simultaneously.
Growing Phase
Shrinking Phase
Growing Phase: (Expanding Phase)
Locks are obtained But NOT released.
Shrinking Phase: (Contracting Phase)
Locks are released But NO NEW Locks are acquired.

Comments
Post a Comment