Processor management via thread status
AssigneeInternational Business Machines Corporation
InventorsBernard A. King-Smith, Bret R. Olszewski, Stephen Rees, Basu Vaidyanathan
Life of this patent
Estimating the term…
Abstract
Various systems, processes, and products may be used to manage a processor. In particular implementations, managing a processor may include the ability to determine whether a thread is pausing for a short period of time and place a wait event for the thread in a queue based on a short thread pause occurring. Managing a processor may also include the ability to activate a delay thread that determines whether a wait time associated with the pause has expired and remove the wait event from the queue based on the wait time having expired.
Claims11
A method implemented by a computer, the method comprising:
- determining whether a first thread is pausing;
- if the first thread is pausing, placing a wait event for the first thread in a queue, the wait event comprising a wait time;
- in response to the wait event being placed in the queue, determining whether a delay thread has been initiated;
- if a delay thread has not been initiated, initiating a delay thread;
- in response to the delay thread being initiated, determining whether a second thread is ready to run;
- if the second thread is not ready to run, activating the delay thread, the delay thread determining whether the wait time associated with the paused first thread has expired;
- and
- in response to the delay thread determining that the wait time has expired, removing the wait event from the queue and activating the first thread.
A computer program product for managing a processor, the computer program product comprising:
- a non-transitory computer readable medium;
- first program instructions to determine whether a first thread is pausing;
- second program instructions to, if the first thread is pausing, place a wait event for the first thread in a queue, the wait event comprising a wait time;
- third program instructions to, in response to the wait event being placed in the queue, determine whether a delay thread has been initiated;
- fourth program instructions to, if a delay thread has not been initiated, initiate a delay thread;
- fifth program instructions to, in response to the delay thread being initiated, determine whether a second thread is ready to run;
- sixth program instructions to, if the second thread is not ready to run, activate the delay thread, the delay thread determining whether the wait time associated with the paused first thread has expired;
- and
- seventh program instructions to, in response to the delay thread determining that the wait time has expired, remove the wait event from the queue and activate the first thread;
- and
- wherein said program instructions are stored on said computer readable storage medium.
A method implemented by a computer, the method comprising:
- determining whether a first thread is pausing;
- if the first thread is pausing, placing a wait event for the first thread in a first queue, the wait event comprising a wait time, and placing the first thread in a second queue, the first thread ordered in the second queue based on the wait time;
- in response to the wait event being placed in the first queue, determining whether a delay thread has been initiated;
- if a delay thread has not been initiated, initiating a delay thread;
- determining whether a second thread is ready to run;
- if the second thread is not ready to run, activating the delay thread, the delay thread determining whether the wait time associated with the paused first thread has expired;
- determining whether the wait time exceeds a threshold;
- in response to determining that the wait time exceeds the threshold, initiating a low power mode for a processor running the delay thread;
- and
- in response to the delay thread determining that the wait time has expired, removing the wait event from the first queue, returning the processor to a high power mode, removing the first thread from the second queue, and activating the first thread.
Dependencies are inferred from the claim text.