IP Library Granted Patent US 8,533,663
Granted Patent B2
US 8,533,663 · App. 12/250,409 · Granted Sep 10, 2013

System and method for utilizing available best effort hardware mechanisms for supporting transactional memory

Inventors: Mark S. Moir (Windham, NH); David Dice (Foxboro, MA)
Assignee: Oracle America, Inc.
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,533,663
App. No.
12/250,409
Granted
Sep 10, 2013
Kind
B2
Abstract

Systems and methods for managing divergence of best effort transactional support mechanisms in various transactional memory implementations using a portable transaction interface are described. This interface may be implemented by various combinations of best effort hardware features, including none at all. Because the features offered by this interface may be best effort, a default (e.g., software) implementation may always be possible without the need for special hardware support. Software may be written to the interface, and may be executable on a variety of platforms, taking advantage of best effort hardware features included on each one, while not depending on any particular mechanism. Multiple implementations of each operation defined by the interface may be included in one or more portable transaction interface libraries. Systems and/or application software may be written as platform-independent and/or portable, and may call functions of these libraries to implement the operations for a targeted execution environment.

Claims (76)

1. A computer-implemented method, comprising:

preparing a portable code sequence corresponding to a source representation of code comprising an atomic transaction, wherein the portable code sequence is platform-independent; and

generating a functional sequence executable to perform the atomic transaction in a target execution environment;

wherein said preparing comprises:

including in the portable code sequence an operation defined by a portable transaction interface, wherein the operation defined by the portable transaction interface is platform-independent; and

wherein said generating a functional sequence comprises:

including in the functional sequence a call to a function executable to perform the operation defined by the portable transaction interface in the target execution environment in a manner that is dependent on whether it has been determined, at runtime and prior to attempting to perform the operation:

that a given best effort hardware transactional memory support mechanism is available to exploit when performing the operation in the target execution environment; or

that the given best effort hardware transactional memory support mechanism is not available to exploit when performing the operation in the target execution environment.

2. The method of claim 1 ,

wherein the function executable to perform the operation defined by the portable transaction interface is configured to exploit the given best effort hardware transactional memory support mechanism in response to determining that it is available to exploit in the target execution environment.

3. The method of claim 1 ,

wherein the function executable to perform the operation defined by the portable transaction interface is configured to perform the operation in the absence of the given best effort hardware transactional memory support mechanism in the target execution environment.

4. The method of claim 3 ,

wherein the function executable to perform the operation defined by the portable transaction interface is configured to exploit a different best effort hardware transactional memory support mechanism that is available in the target execution environment in the absence of the given best effort hardware transactional memory support mechanism in the target execution environment.

5. The method of claim 1 ,

wherein the function executable to perform the operation defined by the portable transaction interface is configured to perform the operation in the absence of any best effort hardware transactional memory support mechanisms in the target execution environment.

6. The method of claim 1 ,

wherein the function executable to perform the operation defined by the portable transaction interface is implemented in a library comprising one or more executable code sequences, each configured to exploit a respective one of one or more best effort hardware transactional memory support mechanisms that are available in the target execution environment.

7. The method of claim 1 , further comprising:

compiling the portable code sequence for execution in the target execution environment dependent on a library comprising at least one function executable to perform the operation defined by the portable transaction interface.

8. The method of claim 1 , wherein said preparing further comprises:

including in the portable code sequence a query operation, wherein the query operation is executable to query the target execution environment to determine, at runtime, whether the given best effort hardware transactional memory support mechanism is available to exploit when performing the operation in the target execution environment or is not supported in the target execution environment.

9. The method of claim 1 ,

wherein the function executable to perform the operation defined by the portable transaction interface comprises two or more alternative execution paths;

the method further comprising:

executing the functional sequence in the target execution environment; and

selecting one of the two or more alternative execution paths for execution at runtime dependent on whether the given best effort hardware transactional memory support mechanism was determined to be available in the target execution environment.

10. The method of claim 1 ,

wherein the function executable to perform the operation defined by the portable transaction interface comprises two or more alternative execution paths;

the method further comprising:

executing the functional sequence in the target execution environment; and

selecting one of the two or more alternative execution paths for execution at runtime dependent on execution of the functional sequence to date.

11. The method of claim 1 , further comprising:

generating a functional sequence executable to perform the atomic transaction in a second target execution environment;

wherein said generating a functional sequence to perform the atomic transaction in a second target execution environment comprises:

including in the functional sequence a call to a function executable to perform the operation defined by the portable transaction interface in the second target execution environment dependent on whether the given best effort hardware transactional memory support mechanism was determined to be available in the second target execution environment;

wherein the availability of best effort hardware transactional memory support mechanisms in the target execution environment differs from the availability of best effort hardware transactional memory support mechanisms in the second target execution environment.

12. A non-transitory, computer-readable storage medium storing program instructions computer-executable to implement:

preparing a portable code sequence corresponding to a source representation of code comprising an atomic transaction, wherein the portable code sequence is platform-independent; and

generating a functional sequence executable to perform the atomic transaction in a target execution environment;

wherein said preparing comprises:

including in the portable code sequence an operation defined by a portable transaction interface, wherein the operation defined by the portable transaction interface is platform-independent; and

wherein said generating a functional sequence comprises:

including in the functional sequence a call to a function executable to perform the operation defined by the portable transaction interface in the target execution environment in a manner that is dependent on whether it has been determined, at runtime and prior to attempting to perform the operation:

that a given best effort hardware transactional memory support mechanism is available to exploit when performing the operation in the target execution environment; or

that the given best effort hardware transactional memory support mechanism is not available to exploit when performing the operation in the target execution environment.

13. The non-transitory, computer-readable storage medium of claim 12 , further storing:

program instructions configured to implement the function executable to perform the operation defined by the portable transaction interface;

wherein the function executable to perform the operation defined by the portable transaction interface is configured to exploit the given best effort hardware transactional memory support mechanism in response to determining that it is available to exploit in the target execution environment.

14. The non-transitory, computer-readable storage medium of claim 12 , further storing:

program instructions configured to implement the function executable to perform the operation defined by the portable transaction interface;

wherein the function executable to perform the operation defined by the portable transaction interface is configured to perform the operation using a different best effort hardware transactional memory support mechanism that is available in the target execution environment in the absence of the given best effort hardware transactional memory support mechanism in the target execution environment.

15. The non-transitory, computer-readable storage medium of claim 12 , further storing:

program instructions configured to implement the function executable to perform the operation defined by the portable transaction interface;

wherein the function executable to perform the operation defined by the portable transaction interface is configured to perform the operation in the absence of any best effort hardware transactional memory support mechanisms in the target execution environment.

16. The non-transitory, computer-readable storage medium of claim 12 , further storing:

a library comprising one or more program instruction sequences executable to exploit the given best effort hardware transactional memory support mechanism in the target execution environment;

wherein the one or more program instruction sequences comprise the function executable to perform the operation defined by the portable transaction interface.

17. A system, comprising:

one or more processors; and

a memory coupled to the one or more processors;

wherein the memory comprises:

a shared transactional memory space accessible by transactions included in one or more threads executing on the one or more processors;

program instructions representing an atomic transaction directed to the shared transactional memory space and executable by the one or more processors to implement the transaction; and

program instructions representing a function executable by the one or more processors to perform an operation defined by a portable transaction interface, wherein the program instructions representing the function comprise program instructions that are configured to exploit a given best effort hardware transactional memory support mechanism in the system;

wherein the program instructions representing the atomic transaction comprise a call to the function; and

wherein execution of the function is dependent on whether it has been determined, at runtime and prior to attempting to perform the operation:

that the given best effort hardware transactional memory support mechanism is available to exploit when performing the operation in the system; or

that the given best effort hardware transactional memory support mechanism is not available to exploit when performing the operation in the system.

18. The system of claim 17 ,

wherein the function is further configured to perform the operation using a different best effort hardware transactional memory support mechanism in the absence of the given best effort hardware transactional memory support mechanism in the system.

19. The system of claim 17 ,

wherein the function is further configured to perform the operation in the absence of any best effort hardware transactional memory support mechanisms in the system.

20. The system of claim 17 ,

wherein the function is further configured to query the system to determine, at runtime, whether the given best effort hardware transactional memory support mechanism is available to exploit when performing the operation in the system or is not supported in the system.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037311/0206 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 15, 2008
From: MOIR, MARK S.; DICE, DAVID
To: SUN MICROSYSTEMS, INC.
Reel/Frame 021683/0144 →
Continuity (2)
Provisional Application 61052542 · May 12, 2008
Related Publication 20090282386A1 · Nov 12, 2009