Execution of program region with transactional memory
AssigneeInternational Business Machines Corporation
InventorTakuya Nakaike
Life of this patent
Estimating the term…
Abstract
A method for executing a program region by a computer system with transactional memory support is disclosed. The computer system uses hierarchical locks for executing the program region. Determination is conducted whether a first condition related to a transaction abort is satisfied in beginning a transaction for the program region. If the first condition is satisfied, a bottom level lock corresponding to a bottom level resource among available resources is acquired to execute the program region in the transaction. If a second condition is determined to be satisfied, a next level lock corresponding to next level resource is acquired. If the acquired lock is a top level lock corresponding to a top level resource, the program region is executed without using the transaction.
Claims24
A method for executing a program region by a computer system using hierarchical locks with transactional memory support, each lock being associated with a shared resource among available resources, the method comprising:
- detecting data conflicts among concurrent transactions via a conflict detection module to abort a transaction that caused at least one of the data conflicts;
- arbitrating the remaining data conflicts via a conflict arbitration module;
- retrying the aborted transaction for the program region by determining whether a first condition related to a transaction abort is satisfied;
- acquiring a bottom level lock corresponding to a bottom level resource among the available resources to execute the program region in the transaction if the first condition is satisfied;
- acquiring a next level lock corresponding to a next level resource, after releasing the bottom level lock, if a second condition related to a threshold for transaction retries is determined to be satisfied;
- and
- executing the program region without using the transaction if the acquired next level lock is a top level lock corresponding to a top level resource.
A computer system for executing a program region by executing program instructions, the computer system comprising:
- a memory tangibly storing the program instructions;
- and
- at least a processor in communications with the memory, wherein the computer system has transactional memory support and uses hierarchical locks, each lock being associated with a shared resource among available resources, the computer system being configured to:
- detect data conflicts among concurrent transactions via a conflict detection module to abort a transaction that caused at least one of the data conflicts;
- arbitrate the remaining data conflicts via a conflict arbitration module;
- determine whether a first condition related to a transaction abort is satisfied when retrying the aborted transaction for the program region;
- acquire a bottom level lock corresponding to a bottom level resource among the available resources to execute the program region in the transaction if the first condition is satisfied;
- acquire a next level lock corresponding to a next level resource, after releasing the bottom level lock, if a second condition related to a threshold for transaction retries is determined to be satisfied;
- and
- execute the program region without using the transaction if the acquired next level lock is a top level lock corresponding to a top level resource.
A computer system for executing a program region with transactional memory support, the computer system comprising:
- a conflict detection module to detect data conflicts among concurrent transactions to abort a transaction that caused at least one of the data conflicts;
- a conflict arbitration module to arbitrate the remaining data conflicts;
- hierarchical locks, each lock being associated with a shared resource among available resources;
- and
- a transaction begin module configured to:
- determine whether a first condition related to a transaction abort is satisfied when retrying the aborted transaction for the program region;
- acquire a bottom level lock corresponding to a bottom level resource to execute the program region in the transaction if the first condition is satisfied;
- and
- acquire a next level lock corresponding to a next level resource, after releasing the bottom level lock, if a second condition related to a threshold for transaction retries is determined to be satisfied;
- wherein the program region is executed without using the transaction if the acquired next level lock is a top level lock corresponding to a top level resource.
A computer program product for executing a program region, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, wherein the computer readable storage medium is not a transitory signal per se, the program instructions comprising:
- computer-executable program code to detect data conflicts among concurrent transactions via a conflict detection module to abort a transaction that caused at least one of the data conflicts;
- computer-executable program code to arbitrate the remaining data conflicts via a conflict arbitration module;
- computer-executable program code to define hierarchical locks, each lock being associated with a shared resource among available resources;
- computer-executable program code to determine whether a first condition related to a transaction abort is satisfied when retrying the aborted transaction for the program region;
- computer-executable program code to acquire a bottom level lock corresponding to a bottom level resource to execute the program region in the transaction if the first condition is satisfied;
- computer-executable program code to acquire a next level lock corresponding to a next level resource, after releasing the bottom level lock, if a second condition related to a threshold for transaction retries is determined to be satisfied;
- and
- computer-executable program code to execute the program region without using the transaction if the acquired next level lock is a top level lock corresponding to a top level resource.
Dependencies are inferred from the claim text.