Lect 15 25052024 043931pm
Lect 15 25052024 043931pm
Lock-Based Protocols
A lock is a mechanism to control concurrent
access to a data item
Data items can be locked in two modes :
1. exclusive (X) mode. Data item can be both read
as well as
written. X-lock is requested using lock-X
instruction.
2. shared (S) mode. Data item can only be read. S-
lock is
requested using lock-S instruction.
Lock requests are made to the concurrency-
control manager by the programmer. Transaction
can proceed only after request is granted.
Lock-Based Protocols (Cont.)
Lock-compatibility matrix