Executing multiple threads in a processor
First Claim
Patent Images
1. An article of manufacture comprising a computer readable storage medium including code executed by a processor to access buffers and perform operations, the operations comprising:
- setting a replenish thread to be in a state to not run out of credits;
performing a setting of credits in the buffers for a plurality of threads executed by the processor, wherein the credits for each of the threads comprise a number of credits, wherein one of the threads having credits can be selected for execution and wherein the threads having no credits are not selected for execution;
alternating among executing the threads having available credits;
decrementing the credits available for one of the threads to reduce the number of available credits for the thread in response to executing the thread;
in response to the setting of the credits of the threads, setting a replenish flag for the replenish thread to a first value of at least two values to indicate that the replenish thread will not execute until the threads are not runnable, wherein the 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 threads are runnable; and
initiating by the replenish thread an operation to reassign credits to the threads in response to the determining that the replenish flag is set to the first value and that the threads are not runnable.
0 Assignments
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.
-
Citations
20 Claims
-
1. An article of manufacture comprising a computer readable storage medium including code executed by a processor to access buffers and perform operations, the operations comprising:
-
setting a replenish thread to be in a state to not run out of credits; performing a setting of credits in the buffers for a plurality of threads executed by the processor, wherein the credits for each of the threads comprise a number of credits, wherein one of the threads having credits can be selected for execution and wherein the threads having no credits are not selected for execution; alternating among executing the threads having available credits; decrementing the credits available for one of the threads to reduce the number of available credits for the thread in response to executing the thread; in response to the setting of the credits of the threads, setting a replenish flag for the replenish thread to a first value of at least two values to indicate that the replenish thread will not execute until the threads are not runnable, wherein the 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 threads are runnable; and initiating by the replenish thread an operation to reassign credits to the threads in response to the determining that the replenish flag is set to the first value and that the threads are not runnable. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A system, comprising:
-
a processor; buffers accessible to the processor; an operating system scheduler executed by the processor to perform operations, the operations comprising; setting a replenish thread to be in a state to not run out of credits; performing a setting of credits in the buffers for a plurality of threads executed by the processor wherein the credits for each of the threads comprise a number of credits, wherein one of the threads having credits can be selected for execution and wherein the 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 threads having available credits; decrementing the credits available for one of the threads to reduce the number of available credits for the thread in response to executing the thread; in response to the setting of the credits of the threads, setting a replenish flag for the replenish thread to a first value of at least two values to indicate that the replenish thread will not execute until the threads are not runnable, wherein the 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 threads are runnable; and initiating, by the replenish thread, an operation to reassign credits to the threads in response to the determining that the replenish flag is set to the first value and that the threads are not runnable. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. A method, comprising:
-
setting a replenish thread to be in a state to not run out of credits; performing a setting of credits for a plurality of threads executed by a processor, wherein the credits for each of the threads comprise a number of credits, wherein one of the threads having credits can be selected for execution and wherein the threads having no credits are not selected for execution; alternating, by the processor, among executing the threads having available credits; decrementing, by the processor, the credits available for one of the threads to reduce the number of available credits for the thread in response to executing the thread; in response to the setting of the credits of the threads, setting, by the processor, a replenish flag for the replenish thread to a first value of at least two values to indicate that the replenish thread will not execute until the threads are not runnable, wherein the 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 threads are runnable; and initiating an operation, by the processor, to execute the replenish thread to reassign credits to the threads in response to the determining that the replenish flag is set to the first value and that the threads are not runnable. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification