IP Library Granted Patent US 7,496,726
Granted Patent B1
US 7,496,726 · App. 11/110,910 · Granted Feb 24, 2009

Controlling contention via transactional timers among conflicting transactions issued by processors operating in insistent or polite mode

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,496,726
App. No.
11/110,910
Granted
Feb 24, 2009
Kind
B1
Abstract

A system for controlling contention between conflicting transactions in a transactional memory system. During operation, the system receives a request to access a cache line and then determines if the cache line is already in use by an existing transaction in a cache state that is incompatible with the request. If so, the system determines if the request is from a processor which is in a polite mode. If this is true, the system denies the request to access the cache line and continues executing the existing transaction.

Claims (87)

1. A method for controlling contention between conflicting transactions in a transactional memory system, comprising:

receiving a request to access a cache line;

determining if the cache line is already in use by an existing transaction in a cache state that is incompatible with the request; and

if so,

determining if the request is from a processor which is in a polite mode or an insistent mode; and

if the processor is in a polite mode,

determining whether the request has been denied a predetermined number of times; and

if so,

switching the processor from the polite mode to the insistent mode;

if not,

determining whether a transaction timer has expired, wherein the transaction timer specifies a predetermined time since the start of the existing transaction during which the processor will deny requests to access cache lines which are marked as transactional; and

if not, denying the request to access the cache line if the cache line is marked as transactional;

if the processor is in the insistent mode, granting the request to access the cache line.

2. The method of claim 1 ,

wherein if the request to access the cache line is associated with a transaction, granting the request further involves marking the requestor's cache line as transactional.

3. The method of claim 1 ,

wherein if the processor is in the polite mode and the transaction timer for the existing transaction has expired, the method further comprises granting the request to access the cache line; and

wherein if the request to access the cache line is granted and is associated with a transaction, the method further comprises marking the requestor's cache line as transactional.

4. The method of claim 1 , wherein if the cache line is not in use by the existing transaction in a cache state that is incompatible with the request, or if the request is from a processor which is not in polite mode, the method further comprises granting the request to access the cache line.

5. The method of claim 4 , wherein if the request is granted and if the request to access the cache line is associated with a transaction, the method further comprises marking the requestor's cache line as transactional.

6. The method of claim 4 ,

wherein if the request to access the cache line is a store operation, granting the request involves taking exclusive ownership of the cache line; and

wherein if the request to access the cache line is a load operation, granting the request involves taking shared ownership of the cache line.

7. The method of claim 1 , wherein denying the request to access the cache line involves issuing a negative acknowledgment to the requesting processor.

8. The method of claim 1 ,

wherein if the request is a store to a cache line which is marked as transactional (or a store that causes a cache line to be installed in a local cache and to be marked as transactional), the method further comprises recording a value for the store instruction in a store buffer;

wherein the value for the store instruction in the store buffer is not visible to other processors before the transaction successfully commits;

wherein if the transaction successfully completes, transactional stores in the store buffer are atomically committed to the cache; and

wherein if the transaction aborts, transactional stores are flushed from the store buffer.

9. The method of claim 1 ,

wherein a load instruction or a store instruction includes a bit which indicates whether the processor that generated the request is in a polite transaction mode or an insistent transaction mode.

10. The method of claim 1 ,

wherein denying the request to access the cache line immediately aborts the transaction associated with the request; and

wherein the processor retries a denied request to access the cache line one or more times before aborting the transaction.

11. An apparatus for controlling contention between conflicting transactions in a transactional memory system, comprising:

a processor;

a cache; and

a memory;

a contention-management mechanism; and

wherein the contention-management mechanism is configured to,

receive a request to access a cache line,

to determine if the cache line is already in use by an existing transaction in a cache state that is incompatible with the request,

if so, the contention-management mechanism is configured to determine if the request is from a processor which is in a polite mode or an insistent mode; and

if the processor is in the polite mode, the contention-management mechanism is configured to:

determine whether the request has been denied a predetermined number of times; and

if so, the contention-management mechanism is configured to switch the processor from the polite mode to the insistent mode;

if not, the contention-management mechanism is configured to:

determine whether a transaction timer has expired, wherein the transaction timer specifies a predetermined time since the start of the existing transaction during which the processor will deny requests to access cache lines which are marked as transactional; and

if the transaction time has not expired, the contention-management mechanism is configured to deny the request to access the cache line if the cache line is marked as transactional;

if the processor is in the insistent mode, the contention-management mechanism is configured to grant the request to access the cache line.

12. The apparatus of claim 11 ,

wherein if the request to access the cache line is associated with a transaction, granting the request to access the cache line further involves marking the requestor's cache line as transactional.

13. The apparatus of claim 11 ,

wherein if the processor is in the polite mode and the transaction timer for the existing transaction has expired, the contention-management mechanism is configured to grant the request to access the cache line; and

wherein if the request to access the cache line is granted and is associated with a transaction, the contention-management mechanism is configured to mark the requestor's cache line as transactional.

14. The apparatus of claim 11 , wherein if the cache line is not in use by the existing transaction in a cache state that is incompatible with the request, or if the request is from a processor which is not in polite mode, the contention-management mechanism is configured to grant the request to access the cache line.

15. The apparatus of claim 14 , wherein if the request is granted and if the request to access the cache line is associated with a transaction, the contention-management mechanism is configured to mark the requestor's cache line as transactional.

16. The apparatus of claim 14 ,

wherein if the request to access the cache line is a store operation, granting the request involves taking exclusive ownership of the cache line; and

wherein if the request to access the cache line is a load operation, granting the request involves taking shared ownership of the cache line.

17. The apparatus of claim 11 , wherein denying the request to access the cache line involves issuing a negative acknowledgment to the requesting processor.

18. The apparatus of claim 11 ,

wherein if the request is a store to a cache line which is marked as transactional (or a store that causes a cache line to be installed in a local cache and to be marked as transactional), a store buffer is configured to record a value for the store instruction;

wherein the value for the store instruction in the store buffer is not visible to other processors before the transaction successfully commits;

wherein if the transaction successfully completes, transactional stores in the store buffer are atomically committed to the cache; and

wherein if the transaction aborts, transactional stores are flushed from the store buffer.

19. The apparatus of claim 11 ,

wherein a load instruction or a store instruction includes a bit which indicates whether the processor that generated the request is in a polite transaction mode or an insistent transaction mode.

20. The apparatus of claim 11 ,

wherein denying the request to access the cache line immediately aborts the transaction associated with the request; and

wherein the processor retries a denied request to access the cache line one or more times before aborting the transaction.

21. A computer system including a transactional memory system that controls contention between conflicting transactions, comprising:

a processor;

a cache;

a memory; and

a contention-management mechanism;

wherein the contention-management mechanism is configured to,

receive a request to access a cache line, and

to determine if the cache line is already in use by an existing transaction in a cache state that is incompatible with the request,

if so, the contention-management mechanism is configured to determine if the request is from a processor which is in a polite mode or an insistent mode; and

if the processor is in the polite mode, the contention-management mechanism is configured to:

determine whether the request has been denied a predetermined number of times; and

if so, the contention-management mechanism is configured to switch the processor from the polite mode to the insistent mode; and

if not, the contention-management mechanism is configured to:

determine whether a transaction timer has expired, wherein the transaction timer specifies a predetermined time since the start of the existing transaction during which the processor will deny requests to access cache lines which are marked as transactional; and

if the transaction time has not expired, the contention-management mechanism is configured to deny the request to access the cache line if the cache line is marked as transactional;

if the processor is in the insistent mode, the contention management mechanism is configured to grant the request to access the cache line.

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 037304/0137 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 18, 2005
From: NUSSBAUM, DANIEL S.; LUCHANGEO, VICTOR M.; MOIR, MARK S.; SHALEV, ORI; SHAVIT, NIR N.
To: SUN MICROSYSTEMS, INC.
Reel/Frame 019364/0621 →