Patent ID: 8239635

Claim:
A method, comprising: performing, by a computer: associating a first thread with a portion of a read ownership data structure, wherein the read ownership data structure stores data indicating which, if any, threads currently own a location in a shared memory for reading; the first thread executing program instructions comprising user code to be completed as a first atomic transaction, wherein the user code comprises one or more memory access operations to the shared memory, wherein for a given read memory access operation of the first atomic transaction that targets the location in the shared memory, said executing comprises: attempting to acquire read ownership of the location in the shared memory; and performing the read memory access operation; and a second thread executing program instructions comprising user code to be completed as a second atomic transaction concurrently with said executing program instructions comprising user code to be completed as a first atomic transaction, wherein for a given write memory access operation of the second atomic transaction that targets the location in the shared memory, said executing comprises: attempting to acquire write ownership of the location in the shared memory; and performing the write memory access operation; wherein said attempting to acquire read ownership of the location comprises writing a value indicating that the location is owned for reading in the portion of the read ownership data structure associated with the first thread using an ordinary store-type operation; wherein successfully acquiring write ownership comprises storing a value in an ownership record associated with the location indicating that the location is owned for writing; and wherein successfully acquiring write ownership of the location results in revoking the read ownership of the location.