- Lock = an
object that
have:
- A state
(locked,
unlocked, etc)
- A number
of lock holders
- A queue of
pending (locking/unlocking)
operations
|
- Some
lock operation
will be granted (succeed) when the
lock is in a certain state
- If a lock operation is
granted:
- The
execution
of the transaction will
continue
and
- The transaction will
become a holder of
the lock
|
|
- Some
lock operation
will be denied (fail) when the
lock is in a certain state
- If a lock operation is
denied:
- The
transaction will
wait
until the state of the
lock
changes to a
compatible state
- When the state of the
lock becomes
compatible,
the lock operation will be
granted and the
execution will be
continued
|
|
|