摘要 |
A method for scheduling a task, which is applied to a first CPU set providing a system beat and comprising at least one first CPU. The method comprises: acquiring a first task running queue of a first CPU in a first CPU set, wherein the first task running queue comprises at least one task created by a user; when there is a need to run a first task in the first task running queue on a second CPU set, mounting the first task to a second task running queue of a second CPU in the second CPU set, and sending an interrupt command to the second CPU, wherein the second CPU set does not provide a system beat, and the initial state of the second CPU is an idle state. The method can correctly maintain system time and improve the use efficiency of CPUs and hardware resources in systems while eliminating unnecessary beats. |