Shared and Exclusive Locks

Properties of shared and exclusive locks:
  • Shared Lock or Read Lock
    • It is requested by transaction that wants to just read the value of data items.
    • A shared lock on a data item does not allow an exclusive lock to be placed but permits any number of shared locks to be placed on that item.
  • Exclusive Lock
    • It is requested by a transaction on a data item that it needs to update.
    • No other transaction can place either a shared lock or an exclusive lock on a data item that has been locked in an exclusive mode.
Transactions using multiple-mode locking
Locking as above results in a serialisable schedule.