Implementing strong atomicity in software transactional memory
First Claim
1. A method for analyzing and modifying computer code to comprise atomic memory operations in a transactional memory system for memory operations contained outside of memory transactions, the method comprising:
- compiling computer code comprising memory transactions comprising atomic blocks of code;
during compilation of the computer code comprising memory transactions comprising atomic blocks of code;
identifying one or more non-transactional memory operations which access objects outside of memory transactions comprising atomic blocks of code; and
augmenting an identified non-transactional memory operation which accesses an object outside of a memory transaction comprising an atomic block of code creating a new atomic block of code comprising the identified non-transactional memory operation and an open operation which opens the object for access by the non-transactional memory operation before the identified non-transactional memory operation, the new atomic block of code ensuring atomicity between transactional memory accesses to the object and accesses to the object by the new atomic block of code.
2 Assignments
0 Petitions
Accused Products
Abstract
A software transactional memory system is described which utilizes decomposed software transactional memory instructions as well as runtime optimizations to achieve efficient performance. The decomposed instructions allow a compiler with knowledge of the instruction semantics to perform optimizations which would be unavailable on traditional software transactional memory systems. Additionally, high-level software transactional memory optimizations are performed such as code movement around procedure calls, addition of operations to provide strong atomicity, removal of unnecessary read-to-update upgrades, and removal of operations for newly-allocated objects. During execution, multi-use header words for objects are extended to provide for per-object housekeeping, as well as fast snapshots which illustrate changes to objects. Additionally, entries to software transactional memory logs are filtered using an associative table during execution, preventing needless writes to the logs. Finally a garbage collector with knowledge of the software transactional memory system compacts software transactional memory logs during garbage collection.
-
Citations
17 Claims
-
1. A method for analyzing and modifying computer code to comprise atomic memory operations in a transactional memory system for memory operations contained outside of memory transactions, the method comprising:
-
compiling computer code comprising memory transactions comprising atomic blocks of code; during compilation of the computer code comprising memory transactions comprising atomic blocks of code; identifying one or more non-transactional memory operations which access objects outside of memory transactions comprising atomic blocks of code; and augmenting an identified non-transactional memory operation which accesses an object outside of a memory transaction comprising an atomic block of code creating a new atomic block of code comprising the identified non-transactional memory operation and an open operation which opens the object for access by the non-transactional memory operation before the identified non-transactional memory operation, the new atomic block of code ensuring atomicity between transactional memory accesses to the object and accesses to the object by the new atomic block of code. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A computer system for providing strong atomicity for software containing memory operations outside of transactional memory atomic blocks, the computer system comprising:
-
at least one processing unit and memory; and a compiler comprising an optimization module configured to; during compilation of the software comprising the transactional memory atomic blocks comprising software transactional memory operations; identify non-transactional memory operations outside of atomic blocks in the software by; performing a type analysis on transactional memory atomic blocks to determine fields accessible by transactional memory operations during execution of the software; identifying non-transactional memory operations which access fields that are accessible by transactional memory operations; and insert transactional memory operations into the software creating new atomic blocks in the software comprising the identified non-transactional memory operations which prevent runtime conflicts with the non-transactional memory operations of the new atomic blocks in the software. - View Dependent Claims (14, 15)
-
-
16. One or more computer-readable storage media containing instructions which, when executed by a computer, cause the computer to perform a method for preventing conflicts in a transactional memory system, the method comprising:
during compilation of software comprising transactional memory blocks comprising atomic blocks of source code comprising software transactional memory instructions; analyzing the software to locate non-transactional memory instructions which are performed outside of the transactional memory blocks comprising atomic blocks of source code, wherein the analyzing comprises; performing a type analysis on the transactional memory blocks to determine fields accessible by transactional memory instructions during execution of the software; identifying non-transactional memory instructions which access fields that are determined accessible by the transactional memory instructions; inserting software transactional memory instructions into the software creating new atomic blocks of code comprising the located non-transactional memory instructions, the new atomic blocks of code preventing conflicts between transactional memory accesses to an object and accesses to the object by the located non-transactional memory instructions of the new atomic blocks of code; and wherein the inserting software transactional memory instructions into the software creating the new atomic blocks of code comprises for a non-transactional update instruction which updates the object; inserting an open for update instruction before the non-transactional update instruction which updates a software transaction memory word for the object that indicates to memory transactions that the object is being updated; and inserting an update commit instruction after the update instruction which confirms committing the update instruction and which updates the software transaction memory word for the object with a version number to indicate that it has been updated; and wherein the software transactional memory word for the object at least indicates whether the object is open for update by a transaction. - View Dependent Claims (17)
Specification