Efficient and consistent software transactional memory
First Claim
1. A method comprising:
- storing a global timestamp value in a first local timestamp associated with a first transaction, in response to starting execution of the first transaction;
in response to encountering a current read operation, which is included in the first transaction and references a first address, validating a plurality of previous read operations in the first transaction, if a current version associated with the first address is greater than the local time stamp.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus for efficient and consistent validation/conflict detection in a Software Transactional Memory (STM) system is herein described. A version check barrier is inserted after a load to compare versions of loaded values before and after the load. In addition, a global timestamp (GTS) is utilized to track a latest committed transaction. Each transaction is associated with a local timestamp (LTS) initialized to the GTS value at the start of a transaction. As a transaction commits it updates the GTS to a new value and sets versions of modified locations to the new value. Pending transactions compare versions determined in read barriers to their LTS. If the version is greater than their LTS indicating another transaction has committed after the pending transaction started and initialized the LTS, then the pending transaction validates its read set to maintain efficient and consistent transactional execution.
-
Citations
20 Claims
-
1. A method comprising:
-
storing a global timestamp value in a first local timestamp associated with a first transaction, in response to starting execution of the first transaction; in response to encountering a current read operation, which is included in the first transaction and references a first address, validating a plurality of previous read operations in the first transaction, if a current version associated with the first address is greater than the local time stamp. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. An article of manufacture including program code which, when executed by a machine, causes the machine to perform the operations of:
-
detecting a load operation referencing an address in a transaction; inserting a group of read barrier operations to be executed before the load operation, the group of read barrier operations, when executed, to obtain a current version associated with the address; inserting a group of version check barrier operations after the load operation, the group of version check barrier operations, when executed, to compare a subsequent version associated with the address to the current version. - View Dependent Claims (8, 9, 10, 11, 12, 13, 14)
-
-
15. A system comprising:
-
a memory device to store compiler code and program code; and a processor associated with the memory device, the processor to execute the compiler code, wherein the compiler code, when executed, is to; detect a first transaction in the program code; insert a first instruction, when executed, to load a global time stamp into a local timestamp associated with the first transaction, wherein the global timestamp is to hold a most recent local timestamp value of a most recent committed transaction. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification