Apparatus and method for operating central-processing units in sleep mode
AssigneeMediatek Inc.
InventorsMeng-Ju Hsieh, Jr-Ling Guo, Chien-Hao Chiang, Hung-Lin Chou
Life of this patent
Estimating the term…
Abstract
An apparatus includes a plurality of CPUs, a CPU scheduler, an idle predictor, and a CPU-idle framework. The CPUs are categorized into a first group and a second group, and a specific CPU is in the first group. When the specific CPU is idle, the CPU scheduler executes an idle task. The idle predictor determines whether the CPUs in the first group corresponding to the specific CPU are going to operate the sleep mode in response to the idle task so as to schedule a sleep schedule of the CPUs in the first group operating in the sleep mode. The CPU-idle framework commands the CPUs in the first group to operate in the sleep mode based on the sleep schedule.
Claims14
An apparatus, comprising:
- a plurality of CPUs, wherein the CPUs are categorized into a first group and a second group and a specific CPU is in the first group;
- a CPU scheduler, wherein when the specific CPU is idle, the CPU scheduler issues an idle task;
- an idle predictor, determining whether the CPUs in the first group corresponding to the specific CPU are going to operate the sleep mode in response to the idle task so as to schedule a sleep schedule of the CPUs in the first group operating in the sleep mode;
- and
- a CPU-idle framework, commanding the CPUs in the first group to operate in the sleep mode based on the sleep schedule,
- wherein the idle predictor calculates a first algorithm to determine a cost efficiency of the CPUs in the first group operating in the sleep mode;
- wherein the cost efficiency is a benefit-cost ratio;
- wherein the idle predictor further calculates a second algorithm to determine a cost of the specific CPU operating in a normal mode;
- wherein the idle predictor further calculates a third algorithm to determine the cost efficiency of only the specific CPU operating in the sleep mode;
- and
- wherein the idle predictor compares the cost and the benefit of the CPUs in the first group operating in the sleep mode, the cost and benefit of only the specific CPU operating in the sleep mode, and the cost of the specific CPU remaining in the normal mode to schedule the sleep schedule.
A method for operating at least one of the CPUs in a sleep mode, wherein the CPUs are at least categorized into a first group and a second group, and a specific CPU is in the first group, wherein the method comprising:
- when the specific CPU is idle, issuing an idle task;
- determining a decision whether the CPUs in the first group are going to operate in the sleep mode based on the idle task;
- scheduling a sleep schedule of the CPUs in the first group operating in the sleep mode in response to the decision;
- and
- operating the CPUs in the first group in the sleep mode based on the sleep schedule in response to the idle task;
- wherein the step of determining the decision whether the CPUs in the first group are going to operate in the sleep mode further comprises:
- calculating a first algorithm to determine a cost and a benefit of the CPUs in the first group operating in the sleep mode;
- calculating a second algorithm to determine a cost of the CPUs in the first group remaining in a normal mode;
- comparing the cost and the benefit of the CPUs in the first group operating in the sleep mode and the cost of the specific CPU remaining in the normal mode to determine the decision;
- calculating a third algorithm to determine a cost and a benefit of only the specific CPU operating in the sleep mode;
- and
- comparing the cost and the benefit of the CPUs in the first group operating in the sleep mode, the cost and benefit of only the specific CPU operating in the sleep mode, and the cost of the specific CPU remaining in the normal mode to determine the decision;
- wherein the step of comparing the cost and the benefit of the CPUs in the first group operating in the sleep mode and the cost of the specific CPU remaining in the normal mode to determine the decision further comprises:
- when the cost of the CPUs in the first group operating in the sleep mode is less than the cost of the specific CPU operating in the normal mode, determining that the CPUs in the first group operate in the sleep mode in response to the idle task;
- when the cost of the CPUs in the first group operating in the sleep mode is not less than the cost of the specific CPU remaining in the normal mode, comparing the cost efficiency of the CPUs in the first group operating in the sleep mode and the cost efficiency of only the specific CPU operating in the sleep mode;
- when the cost efficiency of the CPUs in the first group operating in the sleep mode exceeds the cost efficiency of only the specific CPU operating in the sleep mode, determining that the CPUs in the first group operate in the sleep mode in response to the idle task;
- and
- when the cost efficiency of the CPUs in the first group operating in the sleep mode does not exceed the cost efficiency of only the specific CPU operating in the sleep mode, determining that only the specific CPU operates in the sleep mode in response to the idle task.
Dependencies are inferred from the claim text.