IP Library › Granted Patent US 11,989,556
Granted Patent B2
US 11,989,556 · App. 18/111,744 · Granted May 21, 2024

Detecting infinite loops in a programmable atomic transaction

Inventor: Tony Brewer (Plano, TX)
Assignee: Micron Technology, Inc.
G06F9/3004G06F9/325G06F9/466G06F12/0815G06F12/0875G06F15/781
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 11,989,556
App. No.
18/111,744
Granted
May 21, 2024
Kind
B2
Abstract

Disclosed in some examples are systems, methods, devices, and machine-readable mediums to detect and terminate programmable atomic transactions that are stuck in an infinite loop. In order to detect and terminate these transactions, the programmable atomic unit may use an instruction counter that increments each time an instruction is executed during execution of a programmable atomic transaction. If the instruction counter meets or exceeds a threshold instruction execution limit without reaching the termination instruction, the programmable atomic transaction may be terminated, all resources used (e.g., memory locks) may be freed, and a response may be sent to a calling processor.

Claims (48)

1. An apparatus comprising:

a memory controller;

a memory array coupled to the memory controller;

a programmable atomic unit coupled to the memory controller and comprising a processor, the processor configured to perform operations comprising:

receive a request from a requesting processor, the request requesting execution of a programmable atomic transaction at the programmable atomic unit of the memory controller, the request including an identifier of the programmable atomic transaction;

locate instructions of the programmable atomic transaction in a memory of the programmable atomic unit based upon the identifier;

execute the instructions of the programmable atomic transaction, starting at a first instruction, the executing comprising incrementing an instruction counter for every executed instruction;

determine that the instruction counter exceeded a specified instruction execution limit; and

responsive to determining that the instruction counter exceeded the specified instruction execution limit, terminating execution of the programmable atomic transaction.

2. The apparatus of claim 1 , wherein the operations further comprise:

responsive to terminating the execution of the programmable atomic transaction, sending a response to the requesting processor, the response including a status field indicating a status of the completion of the programmable atomic transaction.

3. The apparatus of claim 1 , wherein the operations further comprise:

determining the instruction execution limit for the programmable atomic transaction from a table of transaction information associated with the programmable atomic transaction.

4. The apparatus of claim 3 , wherein the identifier of the programmable atomic transaction is used as an index into the table to obtain the instruction execution limit.

5. The apparatus of claim 4 , wherein the table also stores a flag to indicate whether the programmable atomic transaction is valid and a size of the programmable atomic transaction.

6. The apparatus of claim 1 , wherein the operations further comprise:

responsive to terminating execution of the programmable atomic transaction, releasing any locks set by the programmable atomic transaction.

7. The apparatus of claim 1 , wherein the operations of terminating execution of the programmable atomic transaction comprises forcing execution of a termination instruction.

8. A method comprising:

using a processor of a programmable atomic unit coupled to a memory controller, performing the operations comprising:

receive a request from a requesting processor, the request requesting execution of a programmable atomic transaction at a programmable atomic unit of the memory controller, the request including an identifier of the programmable atomic transaction;

locate instructions of the programmable atomic transaction in a memory of the programmable atomic unit based upon the identifier;

execute the instructions of the programmable atomic transaction, starting at a first instruction, the executing comprising incrementing an instruction counter for every executed instruction;

determine that the instruction counter exceeded a specified instruction execution limit; and

responsive to determining that the instruction counter exceeded the specified instruction execution limit, terminating execution of the programmable atomic transaction.

9. The method of claim 8 , further comprising:

responsive to terminating the execution of the programmable atomic transaction, sending a response to the requesting processor, the response including a status field indicating a status of the completion of the programmable atomic transaction.

10. The method of claim 8 , further comprising:

determining the instruction execution limit for the programmable atomic transaction from a table of transaction information associated with the programmable atomic transaction.

11. The method of claim 10 , wherein the identifier of the programmable atomic transaction is used as an index into the table to obtain the instruction execution limit.

12. The method of claim 11 , wherein the table also stores a flag to indicate whether the programmable atomic transaction is valid and a size of the programmable atomic transaction.

13. The method of claim 8 , further comprising:

responsive to terminating execution of the programmable atomic transaction, releasing any locks set by the programmable atomic transaction.

14. The method of claim 8 , wherein terminating execution of the programmable atomic transaction comprises forcing execution of a termination instruction.

15. A non-transitory, machine-readable medium, storing instructions, which when executed by a processor of a programmable atomic unit of a memory controller, cause the processor to perform operations comprising:

receive a request from a requesting processor, the request requesting execution of a programmable atomic transaction at the programmable atomic unit of the memory controller, the request including an identifier of the programmable atomic transaction;

locate instructions of the programmable atomic transaction in a memory of the programmable atomic unit based upon the identifier;

execute the instructions of the programmable atomic transaction, starting at a first instruction, the executing comprising incrementing an instruction counter for every executed instruction;

determine that the instruction counter exceeded a specified instruction execution limit; and

responsive to determining that the instruction counter exceeded the specified instruction execution limit, terminating execution of the programmable atomic transaction.

16. The non-transitory, machine-readable medium of claim 15 , wherein the operations further comprise:

responsive to terminating the execution of the programmable atomic transaction, sending a response to the requesting processor, the response including a status field indicating a status of the completion of the programmable atomic transaction.

17. The non-transitory, machine-readable medium of claim 15 , wherein the operations further comprise:

determining the instruction execution limit for the programmable atomic transaction from a table of transaction information associated with the programmable atomic transaction.

18. The non-transitory, machine-readable medium of claim 17 , wherein the identifier of the programmable atomic transaction is used as an index into the table to obtain the instruction execution limit.

19. The non-transitory, machine-readable medium of claim 18 , wherein the table also stores a flag to indicate whether the programmable atomic transaction is valid and a size of the programmable atomic transaction.

20. The non-transitory, machine-readable medium of claim 15 , wherein the operations further comprise:

responsive to terminating execution of the programmable atomic transaction, releasing any locks set by the programmable atomic transaction.

Continuity (2)
Continuation 17074834 · Oct 20, 2020
Related Publication 20230205524A1 · Jun 29, 2023
Cited By (3)
US 12,236,120 US 12,360,941 US 12,386,616