Patent ID: 8402227

Claim:
A method, comprising: using a computer to perform: executing program instructions comprising user code to be completed as an atomic transaction, wherein the user code comprises one or more memory access operations to a shared memory that is accessible to concurrently executing transactions, wherein said executing comprises: a software transactional memory implementing the one or more memory access operations of the user code without acquiring ownership of locations in the shared memory targeted by the one or more memory access operations; the software transactional memory capturing at least a portion of a write set of the atomic transaction; the software transactional memory initiating an attempt to commit the atomic transaction using a hardware transactional memory; in response to said initiating, the hardware transactional memory performing within a hardware transaction, for at least one entry in the write set of the atomic transaction: determining whether there are any potential conflicts with another atomic transaction reading or writing a location in the shared memory that is associated with the at least one entry in the write set; and in response to determining that there are not any potential conflicts or in response to addressing any potential conflicts, copying results of write access operations corresponding to the entry to the shared memory; and the hardware transactional memory attempting to commit the hardware transaction.