System resources (e.g., objects or other resources) are managed to provide
multiple levels of undo and/or support for delegation of updates on
main-memory resident objects accessible by concurrent transactions. For
example, a log associated with each transaction stores information
regarding an update to an object when the object is locked in an update
mode (e.g., a write mode) by the transaction. The transaction can be
rolled back by restoring information from the log of the transaction to
the object. If the transaction commits, then the log may be destroyed. If
the transaction delegates to another transaction, the log of the
transaction is also delegated. A record codelet can be automatically
generated to perform the storing of information in the log, and a restore
codelet can be automatically generated to undo updates by restoring
information from the log to the updated objects. The codelets may be
specific to each class of objects. Lock state information is used to
identify undo information age so that the undo information may be stored
in the log without regard to order, thereby enhancing the speed of the
recording process.