The Art of Multiprocessor Programming
In TinyTM, the LockObject class's onCommit() handler ?rst checks whether the object is locked by another transaction, and then whether its stamp is less than or equal to the transaction's read stamp.
- Give an example showing why it is necessary to check whether the object is locked. Is it possible that the object could be locked by the committing transaction? Give an example showing why it is necessary to check whether the object is locked before checking the version number