| CPC G06F 9/5027 (2013.01) | 18 Claims |

|
1. A task scheduling method, comprising:
in response to determining an existence of an idle task scheduling token, causing a first computing resource in a computing system to:
acquire the idle task scheduling token as a first task scheduling token; and
perform a first task in a task queue, tasks in the task queue being executed based on task scheduling tokens in a pre-created task scheduling token set;
in response to determining an existence of a second task to be executed, the second task having a higher priority than the first task, causing the first computing resource to:
discard the first task scheduling token; and
switch from executing the first task to executing the second task;
in response to determining a completion of the execution of the second task, causing the first computing resource to:
retrieve the first task scheduling token; and
continue the execution of the first task; and
in response to determining that a total number of spun computing resources is greater than a first threshold number, suspending the first computing resource until the total number of spun computing resources is less than or equal to the first threshold number, wherein the first threshold number is less than a number of tokens in the task scheduling token set.
|