Support for stack read and write operations
First Claim
1. A method for facilitating operation of a software transactional memory system with stack locations comprising the steps of:
- providing a software transactional memory system, the software transactional memory system interacting with a compiler; and
if the compiler determines at compile time that a particular address for a variable in an original code segment is a stack location, that the stack location is live on entry to a current transaction scope, and that the particular address of the variable has not been taken and passed to another thread, then making a change to the original code segment in a manner that ensures failure atomicity.
2 Assignments
0 Petitions
Accused Products
Abstract
Various technologies and techniques facilitate stack read and write operations in a software transactional memory system. If the compiler determines that an address for a variable in a code segment is a stack location, the stack location is live on entry, and the address of the variable has not been taken and passed to another thread, the code is changed to ensure failure atomicity. One example includes modifying the code so a shadow copy is saved for local variables that are live on entry. If the same prior criteria are true except the stack location is not live on entry, the code is optimized by ensuring code for logging and software transactional memory operations are not included. If the compiler does not know the address is the stack location or that the address is not passed to another thread, the code is changed to ensure failure and concurrency atomicity.
42 Citations
20 Claims
-
1. A method for facilitating operation of a software transactional memory system with stack locations comprising the steps of:
-
providing a software transactional memory system, the software transactional memory system interacting with a compiler; and if the compiler determines at compile time that a particular address for a variable in an original code segment is a stack location, that the stack location is live on entry to a current transaction scope, and that the particular address of the variable has not been taken and passed to another thread, then making a change to the original code segment in a manner that ensures failure atomicity. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A computer-readable medium having computer-executable instructions for causing a computer to perform steps comprising:
-
if a compiler determines that a particular address for a variable in an original code segment is a stack location, that the stack location is live on entry to a current transaction scope, and that the particular address of the variable has not been taken and passed to another thread, then make a first type of change to an original code segment, the first type of change being made in a manner that ensures failure atomicity; if the compiler determines that a particular address for the variable in the original code segment is the stack location, that the stack location is not live on entry to the current transaction scope, and that the particular address of the variable has not been taken and passed to another thread, then make a second type of change to the original code segment, the second type of change being made in a manner that is optimized by ensuring that code for logging of a prior value of the variable is not included and that code for calling a software transactional memory operation is not included; and if the compiler does not know whether or not the particular address for the variable is the stack location or if the compiler does not know if the particular address is passed to another thread, then make a third type of change to the original code segment, the third type of change being made in a manner that ensures both failure atomicity and concurrency atomicity. - View Dependent Claims (11, 12, 13, 14, 15)
-
-
16. A method for rolling back a transaction in a software transactional memory system comprising the steps of:
-
determining that a rollback is necessary; traversing a log backwards; and if a particular field value to be restored is a local variable, and if a stack address of the local variable is greater than a saved stack base that was saved during a call to a transaction stack base procedure, then restoring the value. - View Dependent Claims (17, 18, 19, 20)
-
Specification