US 12,393,465 B2
Hardware-accelerated coroutines for linked data structures
Kangnyeon Kim, Dublin, CA (US); Aida Vosoughi, Pittsburgh, PA (US); and Garret F. Swart, Palo Alto, CA (US)
Assigned to Oracle International Corporation, Red Shores, CA (US)
Filed by Oracle International Corporation, Redwood Shores, CA (US)
Filed on Oct. 31, 2022, as Appl. No. 17/976,969.
Prior Publication US 2024/0143406 A1, May 2, 2024
Int. Cl. G06F 9/46 (2006.01); G06F 9/48 (2006.01); G06F 9/50 (2006.01)
CPC G06F 9/5044 (2013.01) [G06F 9/485 (2013.01); G06F 9/5016 (2013.01); G06F 9/505 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method comprising:
assigning a plurality of threads to a hardware pipeline that contains a sequence of hardware stages that include: a computing stage, a suspending stage, and a resuming stage, wherein:
each cycle of the hardware pipeline can concurrently execute a respective distinct stage of the sequence of hardware stages for a respective distinct thread of the plurality of threads, and
a read of a random access memory (RAM) can be requested for a thread of the plurality of threads only during the suspending stage;
while a previous state of a plurality of states of a finite state machine that implements a coroutine of the thread of the plurality of threads is in the suspending stage of the sequence of hardware stages:
requesting a read of the RAM, and
unconditionally suspending the thread;
while the coroutine of the thread is in the resuming stage of the sequence of hardware stages, correlating an asynchronous response from the RAM to: the thread and a next state of the plurality of states of the finite state machine; and
while in the computing stage of the sequence of hardware stages, the next state of the plurality of states of the finite state machine executing based on the asynchronous response from the RAM.