Priority inheritance in multithreaded systems
AssigneeQUALCOMM Incorporated
InventorErich J. Plondke
Life of this patent
Estimating the term…
Abstract
A method includes determining that a first task having a first priority is blocked from execution at a multithreaded processor by a second task having a second priority that is lower than the first priority. A temporary priority of the second task is set to be equal to an elevated priority, such that in response to the second task being preempted from execution by another task, the second task is rescheduled for execution based on the elevated priority identified by the temporary priority.
Claims28
A method, comprising:
- at a hardware-multithreaded processor, determining that a first task is blocked from execution by a second task, the first task having a first priority and the second task having a second priority that is lower than the first priority;
- setting a temporary priority of the second task to be equal to an elevated priority that is higher than the second priority, such that when the second task has the temporary priority and is preempted from execution at the hardware-multithreaded processor by another task, the second task is rescheduled for execution based on the temporary priority and when the second task has the temporary priority and is not preempted from execution at the hardware-multithreaded processor, the second task will be executed based on the second priority;
- and
- clearing the temporary priority of the second task in response to the second task releasing a synchronization object blocking the first task from execution.
An apparatus, comprising:
- a hardware-multithreaded processor;
- a memory;
- and
- an operating system executable by the hardware-multithreaded processor to:
- determine that a first task is blocked from execution at the hardware-multithreaded processor by a second task, the first task having a first priority and the second task having a second priority that is lower than the first priority;
- set a temporary priority of the second task to be equal to an elevated priority that is higher than the second priority, such that when the second task has the temporary priority and is preempted from execution at the hardware-multithreaded processor by another task, the second task is rescheduled for execution based on the temporary priority and when the second task has the temporary priority and is not preempted from execution at the hardware-multithreaded processor, the second task will be executed based on the second priority;
- and
- clear the temporary priority of the second task in response to the second task releasing a synchronization object blocking the first task from execution.
An electronic device, comprising:
- means for scheduling tasks for execution at a plurality of hardware threads;
- means for storing scheduling data associated with the scheduled tasks;
- means for determining that a first task is blocked from execution by a second task, the first task having a first priority and the second task having a second priority that is lower than the first priority;
- and
- means for setting a temporary priority of the second task to be equal to an elevated priority that is higher than the second priority, such that when the second task has the temporary priority and is preempted from execution by another task, the means for scheduling tasks reschedules the second task for execution based on the elevated priority identified by the temporary priority and when the second task has the temporary priority and is not preempted from execution, the second task will be executed based on the second priority;
- and
- means for clearing the temporary priority of the second task in response to the second task releasing a synchronization object blocking the first task from execution.
A computer-readable non-transitory storage medium comprising instructions that, when executed by a hardware-multithreaded processor, cause the hardware-multithreaded processor to:
- determine that a first task is blocked from execution at the hardware-multithreaded processor by a second task, the first task having a first priority and the second task having a second priority that is lower than the first priority;
- set a temporary priority of the second task to be equal to an elevated priority that is higher than the second priority, such that when the second task has the temporary priority and is preempted from execution at the hardware-multithreaded processor by another task, the second task is rescheduled for execution based on the temporary priority and when the second task has the temporary priority and is not preempted from execution at the hardware-multithreaded processor, the second task will be executed based on the second priority;
- and
- clear the temporary priority of the second task in response to the second task releasing a synchronization object blocking the first task from execution.
Dependencies are inferred from the claim text.