Claims
- 1. A method of providing a capability of undoing an object update in a memory of an information processing system, the method comprising:
detecting a loading event for a class in the information processing system; and generating at least one class-specific codelet corresponding to the class responsive to the loading event.
- 2. The method of claim 1 wherein the step of generating the at least one class-specific codelet comprises:
generating a record codelet corresponding to the loaded class; and generating a restore codelet corresponding to the class.
- 3. The method of claim 2 wherein
the step of generating the record codelet includes generating instructions for logging information regarding a state of an object in the class prior to the object being updated; and the step of generating the restore codelet includes generating instructions for undoing an update to an object in the class using information logged by the record codelet.
- 4. The method of claim 2 wherein the step of generating the record codelet comprises generating instructions for copying mutable field values of an object of the class to a log of a transaction.
- 5. The method of claim 4 wherein the a lock barrier is initiated to copy lock state information to the log.
- 6. The method of claim 4 further comprising:
executing the instructions for copying mutable field values a first time a lock is acquired on the object by the transaction.
- 7. The method of claim 6 wherein lock state information is copied to the log prior to invoking a record codelet.
- 8. The method of claim 6 wherein a new log section is created in the log by copying lock state information to the log responsive to a lock acquisition.
- 9. The method of claim 6 wherein the lock is a write lock.
- 10. The method of claim 6 wherein the copied lock state information is used to identify undo log records of the log for use in restoring the object to a prior state.
- 11. The method of claim 4 further comprising:
scanning the log for lock state information to identify oldest log records of the log which have undo information, the scanning being performed responsive to a system event indicative of a rollback of the transaction; and executing the restore codelet for each identified oldest log record.
- 12. The method of claim 11 wherein the executing the restore codelet comprises undoing the update corresponding to an oldest object state of the object by copying mutable fields of an identified log record to the object.
- 13. The method of claim 4 further comprising:
scanning the log; and copying mutable field information from the log to the object if each lock state information field does not include information indicating that the transaction was a prior lock state owner.
- 14. The method of claim 13 further comprising:
ignoring mutable field information if each lock state information field includes information indicating that the transaction was a prior lock state owner.
- 15. The method of claim 4 further comprising:
detecting a delegation event of the transaction to a delegatee transaction; associating the log of the transaction to a delegatee log of a delegatee transaction; and updating lock values of the log to reflect a change in lock values as a result of the delegation event.
- 16. The method of claim 2 wherein the step of generating the record codelet comprises:
generating instructions for copying mutable field values of an object of the class to a log of a transaction; and generating instructions for copying information indicative of the object of the class to the log.
- 17. The method of claim 16 wherein the information indicative of the object uniquely identifies the object.
- 18. The method of claim 16 wherein the information indicative of the object is an object pointer.
- 19. The method of claim 16 wherein the instructions for copying the mutable field information are executed responsive to an acquisition of a lock of the object by the transaction.
- 20. The method of claim 19 wherein the lock of the object is a write mode lock.
- 21. The method of claim 16 wherein the step of generating the record codelet further comprises generating instructions for copying prior lock state information of the object to the log, wherein the prior lock state information is stored for use in undoing any updates performed by the transaction pursuant to a new lock obtained by the transaction.
- 22. A method of recording information to undo resource updates, the method comprising:
copying mutable field values of an object to a log corresponding to a transaction; and copying prior lock state information regarding the object of the class to the log, the prior lock state information indicative of a lock of the object prior to a new lock of the object by the transaction.
- 23. The method of claim 22 wherein all mutable field values are copied to the log.
- 24. The method of claim 22 further comprising:
performing the copying of the mutable field values and the prior lock state information a first time a lock is acquired in an update mode.
- 25. The method of claim 23 wherein the lock is an update mode lock.
- 26. The method of claim 23 wherein the copied prior lock state information identifies a transaction owner of a prior lock on the object prior to the acquisition of the lock by the transaction.
- 27. The method of claim 22 further comprising:
detecting a rollback event of the transaction; undoing updates to objects performed by the transaction using information from the log.
- 28. The method of claim 27 wherein the step of undoing the updates is performed using lock state information to determine an oldest object state without regard to an order in which undo log records including the mutable field information is stored in the log.
- 29. The method of claim 27 wherein the step of undoing the updates comprises:
scanning the log for lock state information; and copying mutable field information from the log to the object if each lock state information does not include information indicating that the transaction is an owner of a lock state in any update mode.
- 30. The method of claim 29 wherein the step of undoing the updates comprises:
ignoring mutable field information if each lock state information field includes information indicating that the transaction was a prior lock state owner.
- 31. The method of claim 22 further comprising:
updating lock values stored in the log upon a delegation by the transaction to another transaction.
- 32. A computer program product for providing a capability of undoing an object update in a memory of an information processing system, the product comprising:
code for generating at least one class-specific codelet corresponding to the class responsive to a loading event.
- 33. The computer program product of claim 32 further comprising:
code for detecting the loading event for a class in the information processing system.
- 34. The computer program product of claim 32 wherein the code for generating the at least one class-specific codelet comprises:
code for generating a record codelet corresponding to the class; and code for generating a restore codelet corresponding to the class.
- 35. The computer program product of claim 34 wherein the code for generating the record codelet comprises code for generating instructions for copying mutable field values of an object of the class to a log of a transaction.
- 36. The computer program product of claim 35 further comprising:
code for initiating execution of a system module to copy lock state information to the log the first time a lock is acquired in an update mode.
- 37. The computer program product of claim 35 further comprising:
code for initiating a scan of the log responsive to detecting a rollback event of the transaction, the scan for scanning the log for lock state information to identify oldest log records of the log which have undo information; code for initiating execution of the restore codelet for each identified oldest log record to undo updates to objects performed by the transaction using information from the log.
- 38. The computer program product of claim 35 wherein the code for generating the restore codelet comprises code for generating instructions in the restore codelet for undoing the oldest updates to the object.
- 39. The computer program product of claim 38 further comprising:
code for generating instructions in the restore codelet for identifying the oldest undo log records in the log using the lock state information for each object with undo information recorded in the log; and code for selectively invoking the restore codelet to undo the oldest undo log records.
- 40. The computer program product of claim 37 wherein the code for generating the restore codelet comprises:
code for generating instructions in the restore codelet for scanning the log for lock state information; and code for generating instructions in the restore codelet for copying mutable field information from the log to the object if the lock state information does not include information indicating that the transaction is an owner of a lock state in any update mode.
- 41. The computer program product of claim 32 further comprising:
code for updating lock values stored in the log upon a delegation by the transaction to another transaction.
- 42. An apparatus comprising
means for copying all mutable field values of an object to a log corresponding to a transaction; and means for copying prior lock state information regarding the object to the log, the prior lock state information indicative of a lock of the object prior to a new lock of the object by the transaction.
- 43. The apparatus of claim 42 further comprising:
means for performing the copying of the mutable field values and the prior lock state information a first time a lock is acquired on the object by each of a plurality of transactions.
- 44. The apparatus of claim 42 further comprising:
means for detecting a rollback event of the transaction; means for undoing updates to objects performed by the transaction using information from the log.
- 45. The apparatus of claim 44 wherein the code for undoing the updates includes instructions for using the lock state information to determine an oldest object state without regard to an order in which the mutable field information is stored in the log.
- 46. The apparatus of claim 44 wherein the means for undoing the updates comprises:
means for scanning the log for lock state information; and means for copying mutable field information from the log to the object if the lock state information does not indicate that transaction ownership of the lock whose value is represented by the lock state information.
- 47. The apparatus of claim 42 further comprising:
a virtual machine, the virtual machine including the means for copying the mutable field values and the means for copying the prior lock state information.
- 48. The apparatus of claim 47 wherein the virtual machine further comprises:
means for generating a record codelet corresponding to a class of the object, the record codelet including the means for copying; and means for generating a restore codelet corresponding to the class.
- 49. The apparatus of claim 42 further comprising:
a processor and a memory coupled to the processor, the memory including the means for copying the mutable field values and the means for copying the prior lock state information.
- 50. The apparatus of claim 42 further comprising:
means for updating lock values stored in the log upon a delegation by the transaction to another transaction.
CROSS-REFERENCE TO RELATED APPLICATION(S)
[0001] This application claims priority from co-pending U.S. provisional patent application Serial No. 60/357,191 (Attorney Reference No. 004-7499), filed on Feb. 15, 2002, entitled “Techniques for Delegation of Main-Memory Resident objects and Multi-Level Undo”, naming Laurent P. Daynès and Grzegorz J. Czajkowski as inventors, and which is incorporated herein by reference in its entirety.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60357191 |
Feb 2002 |
US |