IP Library Granted Patent US 7,418,577
Granted Patent B2
US 7,418,577 · App. 10/637,169 · Granted Aug 26, 2008

Fail instruction to support transactional program execution

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 7,418,577
App. No.
10/637,169
Granted
Aug 26, 2008
Kind
B2
Abstract

One embodiment of the present invention provides a system that supports executing a fail instruction, which terminates transactional execution of a block of instructions. During operation, the system facilitates transactional execution of a block of instructions within a program, wherein changes made during the transactional execution are not committed to the architectural state of the processor until the transactional execution successfully completes. If a fail instruction is encountered during this transactional execution, the system terminates the transactional execution without committing results of the transactional execution to the architectural state of the processor.

Claims (58)

1. A method for executing a fail instruction to facilitate transactional execution on a processor, comprising:

transactionally executing a block of instructions within a program;

wherein changes made during the transactional execution are not committed to the architectural state of the processor unless the transactional execution successfully completes; and

if the fail instruction is encountered during the transactional execution, setting state information within the processor to indicate that the fail instruction was encountered and continuing transactional execution; and

performing one or more failure actions based on the state information at a later time.

2. The method of claim 1 , wherein performing one or more failure actions involves terminating the transactional execution and discarding changes made during the transactional execution.

3. The method of claim 2 , wherein discarding changes made during the transactional execution involves:

discarding register file changes made during the transactional execution;

clearing load marks from cache lines;

draining store buffer entries generated during transactional execution; and

clearing store marks from cache lines.

4. The method of claim 2 , wherein terminating the transactional execution additionally involves attempting to re-execute the block of instructions.

5. The method of claim 1 , wherein if the transactional execution of the block of instructions is successfully completed, the method further comprises:

atomically committing changes made during the transactional execution; and

resuming normal non-transactional execution.

6. The method of claim 1 , wherein potentially interfering data accesses from other processes are allowed to proceed during the transactional execution of the block of instructions.

7. The method of claim 1 , wherein if an interfering data access from another process is encountered during the transactional execution, the method further comprises:

discarding changes made during the transactional execution; and

attempting to re-execute the block of instructions.

8. The method of claim 1 , wherein the block of instructions to be executed transactionally comprises a critical section.

9. The method of claim 1 , wherein the fail instruction is a native machine code instruction of the processor.

10. The method of claim 1 , wherein the fail instruction is defined in a platform-independent programming language.

11. The method of claim 1 , wherein performing one or more failure actions based on the state information at the later time involves performing the failure actions when a commit instruction is encountered at an end of the transaction.

12. A computer system that supports a fail instruction to facilitate transactional execution, comprising:

a processor; and

an execution mechanism within the processor;

wherein the execution mechanism is configured to transactionally execute a block of instructions within a program;

wherein changes made during the transactional execution are not committed to the architectural state of the processor unless the transactional execution successfully completes; and

wherein if the fail instruction is encountered during the transactional execution, the execution mechanism is configured to:

set state information within the processor to indicate that the fail instruction was encountered and continue transactional execution; and

perform one or more failure actions based on the state information at a later time.

13. The computer system of claim 12 , wherein while performing the one or more failure actions, the execution mechanism is configured to terminate the transactional execution and discard changes made during the transactional execution.

14. The computer system of claim 13 , wherein while discarding changes made during the transactional execution, the execution mechanism is configured to:

discard register file changes made during the transactional execution;

clear load marks from cache lines;

drain store buffer entries generated during transactional execution; and to

clear store marks from cache lines.

15. The computer system of claim 13 , wherein while terminating the transactional execution, the execution mechanism is additionally configured to attempt to re-execute the block of instructions.

16. The computer system of claim 12 , wherein if the transactional execution of the block of instructions is successfully completed, the execution mechanism is configured to:

atomically commit changes made during the transactional execution; and to

resume normal non-transactional execution.

17. The computer system of claim 12 , wherein the computer system is configured to allow potentially interfering data accesses from other processes to proceed during the transactional execution of the block of instructions.

18. The computer system of claim 12 , wherein if an interfering data access from another process is encountered during the transactional execution, the execution mechanism is configured to:

discard changes made during the transactional execution; and to

attempt to re-execute the block of instructions.

19. The computer system of claim 12 , wherein the block of instructions to be executed transactionally comprises a critical section.

20. The computer system of claim 12 , wherein the fail instruction is a native machine code instruction of the processor.

21. The computer system of claim 12 , wherein the fail instruction is defined in a platform-independent programming language.

22. The computer system of claim 12 , wherein when performing the one or more failure actions at the later time, the execution mechanism is configured to perform the failure actions upon encountering a commit instruction at an end of the transaction.

23. A computing means that supports a fail instruction to facilitate transactional execution, comprising:

a processing means; and

an execution means within the processing means;

wherein the execution means is configured to transactionally execute a block of instructions within a program;

wherein changes made during the transactional execution are not committed to the architectural state of the processor unless the transactional execution successfully completes; and

wherein if the fail instruction is encountered during the transactional execution, the execution means is configured to:

set state information within the processor to indicate that the fail instruction was encountered and continue transactional execution; and

perform one or more failure actions based on the state information at a later time.

24. The computing means of claim 23 , wherein when performing the one or more failure actions at the later time, the execution means is configured to perform the failure actions upon encountering a commit instruction at an end of the transaction.

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 037303/0349 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 8, 2003
From: TREMBLAY, MARC; CHAUDHRY, SHAILENDER; JACOBSON, QUINN A.
To: SUN MICROSYSTEMS, INC.
Reel/Frame 014364/0323 →