Lock Manager (cont’d)
Caller generates data-item-id, e.g. by hashing data item name
The lock table is hashed on data-item-id
Lock and Unlock must be atomic, so access to the lock table must be “locked”
Lock and Unlock are called frequently. They must be very fast. Average < 100 instructions.
- This is hard, in part due to slow compare-and-swap operations needed for atomic access to lock table