- The lock table is usually
implemented as:
- Hash table
in main memory:
- The DB elements that
does not have been
locked are
not stored in the
Hash table !!!
|
- Each
lock table entry contains the
follwoing fields:
Meaning of the fields:
- Structure of a
request made by a
transaction:
Meaning of the fields:
- Transaction ID =
the identifier of the
transaction that
made the
lock request
- Lock mode =
the mode of the
lock requested
(shared,
update,
exclusive, etc.)
- Wait? :
- Yes means: the transaction
is waiting for the
request to be
granted
- No means: the transaction
is holding a lock
in the requested mode !!!
|
- Tnext =
a linking field used to
chain all the lock requests
made by the
same transaction
Example:
- Next =
a linking field used to
chain all the lock requests
on the
same DB element
|
|