Executing multiple threads in a processor
First Claim
Patent Images
1. An article of manufacture comprising a computer storage medium including code executed by a processor to access buffers and perform operations, the operations comprising:
- performing a setting of credits in the buffers for a plurality of task threads executed by the processor, wherein the credits for each of the task threads comprise a number of credits, wherein one of the task threads having credits can be selected for execution and wherein the task threads having no credits are not selected for execution;
alternating among executing the task threads having available credits;
decrementing the credits available for one of the task threads to reduce the number of available credits for the task thread in response to executing the task thread;
setting a replenish flag for a replenish thread to a first value of at least two values to indicate that the replenish thread will not execute until the task threads are not runnable, wherein the task threads having no available credits are not runnable;
determining whether the replenish flag for the replenish thread is set to the first value and whether the task threads are runnable; and
in response to the determining that the replenish flag is set to the first value and that the task threads are not runnable, setting the replenish flag to a second value for continued processing of the replenish thread and initiating by the replenish thread an operation to reassign credits to the task threads until credit allocation for all the task threads are complete.
1 Assignment
0 Petitions
Accused Products
Abstract
Provided are a method, system, and program for executing multiple threads in a processor. Credits are set for a plurality of threads executed by the processor. The processor alternates among executing the threads having available credit. The processor decrements the credit for one of the threads in response to executing the thread and initiates an operation to reassign credits to the threads in response to depleting all the thread credits.
37 Citations
17 Claims
-
1. An article of manufacture comprising a computer storage medium including code executed by a processor to access buffers and perform operations, the operations comprising:
-
performing a setting of credits in the buffers for a plurality of task threads executed by the processor, wherein the credits for each of the task threads comprise a number of credits, wherein one of the task threads having credits can be selected for execution and wherein the task threads having no credits are not selected for execution; alternating among executing the task threads having available credits; decrementing the credits available for one of the task threads to reduce the number of available credits for the task thread in response to executing the task thread; setting a replenish flag for a replenish thread to a first value of at least two values to indicate that the replenish thread will not execute until the task threads are not runnable, wherein the task threads having no available credits are not runnable; determining whether the replenish flag for the replenish thread is set to the first value and whether the task threads are runnable; and in response to the determining that the replenish flag is set to the first value and that the task threads are not runnable, setting the replenish flag to a second value for continued processing of the replenish thread and initiating by the replenish thread an operation to reassign credits to the task threads until credit allocation for all the task threads are complete. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system, comprising:
-
a processor; buffers accessible to the processor; an operating system scheduler executed by the processor to perform operations, the operations comprising; performing a setting of credits in the buffers for a plurality of task threads executed by the processor wherein the credits for each of the task threads comprise a number of credits, wherein one of the task threads having credits can be selected for execution and wherein the task threads having no credits are not selected for execution; and code executed by the processor to perform operations, the operations comprising; alternating among executing the task threads having available credits; decrementing the credits available for one of the task threads to reduce the number of available credits for the task thread in response to executing the task thread; setting a replenish flag for a replenish thread to a first value of at least two values to indicate that the replenish thread will not execute until the task threads are not runnable, wherein the task threads having no available credits are not runnable; determining whether the replenish flag for the replenish thread is set to the first value and whether the task threads are runnable; and in response to the determining that the replenish flag is set to the first value and that the task threads are not runnable, setting the replenish flag to a second value for continued processing of the replenish thread and initiating by the replenish thread an operation to reassign credits to the task threads until credit allocation for all the task threads are complete. - View Dependent Claims (9, 10, 11, 12)
-
-
13. A method, comprising:
-
performing a setting of credits for a plurality of task threads executed by a processor, wherein the credits for each of the task threads comprise a number of credits, wherein one of the task threads having credits can be selected for execution and wherein the task threads having no credits are not selected for execution; alternating, by the processor, among executing the task threads having available credits; decrementing, by the processor, the credits available for one of the task threads to reduce the number of available credits for the task thread in response to executing the task thread; setting, by the processor, a replenish flag for a replenish thread to a first value of at least two values to indicate that the replenish thread will not execute until the task threads are not runnable, wherein the task threads having no available credits are not runnable; determining, by the processor, whether the replenish flag for the replenish thread is set to the first value and whether the task threads are runnable; and in response to the determining that the replenish flag is set to the first value and that the task threads are not runnable, setting the replenish flag to a second value for continued processing of the replenish thread and initiating by the replenish thread an operation to reassign credits to the task threads until credit allocation for all the task threads are complete. - View Dependent Claims (14, 15, 16, 17)
-
Specification