# US 9,436,266 B2 · Method and apparatus for controlling central processing unit in a group of central processing units by acquiring power consumption factors for each central processing unit and comparing a mean of power consumption factors with a threshold

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 9,436,266 B2
- Document ID: US9436266B2
- Status: Granted
- Kind: B2
- Application number: 14/086,711
- Filed: 2013-11-21
- Published: 2014-03-20
- Granted: 2016-09-06
- Earliest claimed: 2012-08-30
- Assignees: Huawei Device Co., Ltd.
- Applicants: Huawei Device Co., Ltd.
- Inventors: Konggang Wei; Hua Zhang; Yu Peng
- Web page: https://patentgrep.com/patent/US9436266B2

## CPC

- G06F 1/324: by lowering clock frequency
- G06F 1/3206: Monitoring of events, devices or parameters that trigger a change in power modality
- G06F 1/3243: {Power saving in microcontroller unit}
- G06F 1/3287: by switching off individual functional units in the computer system
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

A method for controlling a central processing unit (CPU), where the method includes: acquiring a usage rate and an operating frequency of one CPU of operating CPUs; if the operating frequency of the one CPU is smaller than a core off-line frequency, multiplying the usage rate of the one CPU by a first weight to obtain a CPU power consumption sensitive factor corresponding to the one CPU; if the operating frequency of the one CPU is greater than or equal to the core off-line frequency, multiplying the usage rate of the one CPU by a second weight to obtain a CPU power consumption sensitive factor corresponding to the one CPU; and turning off at least one operating CPU if the mean is smaller than a CPU turn-off power consumption sensitive factor threshold.

## Claims

### Claim 1

A method for controlling a central processing unit (CPU), comprising:
acquiring a usage rate and an operating frequency of one CPU of a plurality of operating CPUs, wherein the number of the operating CPUs is M, and wherein M is a positive integer greater than or equal to two;
determining whether the operating frequency of the one CPU is smaller than a core off-line frequency;
multiplying the usage rate of the one CPU by a first weight to obtain a CPU power consumption sensitive factor corresponding to the one CPU when the operating frequency of the one CPU is smaller than the core off-line frequency;
multiplying the usage rate of the one CPU by a second weight to obtain a CPU power consumption sensitive factor corresponding to the one CPU when the operating frequency of the one CPU is greater than or equal to the core off-line frequency, wherein the first weight and the second weight are not equal and are both positive integers greater than or equal to one;
executing the foregoing steps N times for each of M operating CPUs, wherein N is a positive integer greater than or equal to one;
acquiring M×N CPU power consumption sensitive factors after the foregoing steps are executed N times;
acquiring a mean of the M×N CPU power consumption sensitive factors; and
turning off at least one operating CPU when the mean is smaller than a CPU turn-off power consumption sensitive factor threshold.

### Claim 2 (depends on 1)

The method according to claim 1, wherein executing the foregoing steps N times for each of M operating CPUs comprises executing the foregoing steps N times for an nth operating CPU, wherein n is greater than or equal to one and is smaller than or equal to M, and wherein the second weight is greater than or equal to two.

### Claim 3 (depends on 2)

The method according to claim 2, wherein executing the foregoing steps N times for an nth operating CPU comprises when a timing moment of nth timer corresponding to the nth operating CPU arrives, executing the foregoing steps, so that when the timing moment of the nth timer arrives N times consecutively, the foregoing steps are executed N times.

### Claim 4 (depends on 3)

The method according to claim 3, further comprising:
stopping, by the timer, timing when a system is idle; and
starting, by the timer, timing when the system is not idle.

### Claim 5 (depends on 1)

The method according to claim 1, wherein turning off the at least one operating CPU when the mean is smaller than the CPU turn-off power consumption sensitive factor threshold comprises turning off at least one operating CPU when the mean is smaller than the CPU turn-off power consumption sensitive factor threshold and the number of queue tasks running on the operating CPUs is smaller than M.

### Claim 6

A method for controlling a central processing unit (CPU), comprising:
acquiring a usage rate and an operating frequency of one CPU of operating CPUs, wherein the number of the operating CPUs is M, M is a positive integer greater than or equal to one, and the number of CPUs in a non-operating state is greater than or equal to one;
determining whether the operating frequency of the one CPU is greater than a core on-line frequency;
multiplying the usage rate of the one CPU by a first weight to obtain a CPU power consumption sensitive factor corresponding to the one CPU when the operating frequency of the one CPU is greater than the core on-line frequency;
multiplying the usage rate of the one CPU by a second weight to obtain the CPU power consumption sensitive factor corresponding to the one CPU when the operating frequency of the one CPU is smaller than or equal to the core on-line frequency, wherein the first weight and the second weight are not equal and are both positive integers greater than or equal to one;
executing the foregoing steps for M operating CPUs, and repeating N times, wherein N is a positive integer greater than or equal to one;
acquiring M×N CPU power consumption sensitive factors after the foregoing steps are executed N times;
acquiring a mean of the M×N CPU power consumption sensitive factors; and
turning on at least one CPU in the non-operating state when the mean is greater than a CPU turn-on power consumption sensitive factor threshold.

### Claim 7 (depends on 6)

The method according to claim 6, wherein executing the foregoing steps N times for each of M operating CPUs comprises executing the foregoing steps N times for an nth operating CPU, and wherein n is greater than or equal to one and is smaller than or equal to M.

### Claim 8 (depends on 7)

The method according to claim 7, wherein executing the foregoing steps N times for an nth operating CPU comprises when a timing moment of nth timer corresponding to the nth operating CPU arrives, executing the foregoing steps so that when the timing moment of the nth timer arrives N times consecutively, the foregoing steps are executed N times.

### Claim 9 (depends on 8)

The method according to claim 8, further comprising:
stopping, by the timer, timing when a system is idle; and
starting, by the timer, timing when the system is not idle.

### Claim 10 (depends on 8)

The method according to claim 8, further comprising stopping, by the timer, timing when the timing moment of the timer arrives consecutively, the acquired operating frequencies of the CPU corresponding to the timer are all maximum frequency values, and the number of times that the operating frequencies are all maximum frequency values is greater than a maximum frequency lasting period time threshold.

### Claim 11 (depends on 10)

The method according to claim 10, wherein the maximum frequency lasting period time threshold is (the CPU turn-on power consumption sensitive factor threshold×N)/(a usage rate threshold×a frequency weight), wherein a frequency weight is the first weight, wherein the number of times that the operating frequencies are all maximum frequency values is equal to the maximum frequency lasting period time threshold plus one.

### Claim 12 (depends on 6)

The method according to claim 6, wherein turning on at least one CPU in the non-operating state when the mean is greater than a CPU turn-on power consumption sensitive factor threshold comprises turning on at least one CPU in the non-operating state when the mean is greater than the CPU turn-on power consumption sensitive factor threshold and the number of queue tasks running on the operating CPUs is greater than M.

### Claim 13

A terminal, comprising a processor, wherein the processor is programmed to:
acquire a usage rate and an operating frequency of one central processing unit (CPU) of operating CPUs, wherein the number of the operating CPUs is M, and wherein M is a positive integer greater than or equal to two;
determine whether the operating frequency of the one CPU is smaller than a core off-line frequency;
multiply the usage rate of the one CPU by a first weight to obtain a CPU power consumption sensitive factor corresponding to the one CPU when the operating frequency of the one CPU is smaller than the core off-line frequency;
multiply the usage rate of the one CPU by a second weight to obtain a CPU power consumption sensitive factor corresponding to the one CPU when the operating frequency of the one CPU is greater than or equal to the core off-line frequency, wherein the first weight and the second weight are not equal and are both positive integers greater than or equal to one;
execute the foregoing steps N times for each of M operating CPUs, wherein N is a positive integer greater than or equal to one;
acquire M×N CPU power consumption sensitive factors after the foregoing steps are executed N times;
acquire a mean of the M×N CPU power consumption sensitive factors; and
turn off at least one operating CPU when the mean is smaller than a CPU turn-off power consumption sensitive factor threshold.

### Claim 14 (depends on 13)

The terminal according to claim 13, wherein executing the foregoing steps N times for each of M operating CPUs comprises executing the foregoing steps N times for an nth operating CPU, and wherein n is greater than or equal to one and is smaller than or equal to M.

### Claim 15 (depends on 13)

The terminal according to claim 13, wherein executing the foregoing steps N times for an nth operating CPU comprises when a timing moment of nth timer corresponding to the nth operating CPU arrives, executing the foregoing steps so that when the timing moment of the nth timer arrives N times consecutively, the foregoing steps are executed N times.

### Claim 16 (depends on 15)

The terminal according to claim 15, wherein the processor is further programmed to:
control a timer to stop timing when a system is idle; and
control the timer to start timing when the system is not idle, and
wherein the second weight is greater than or equal to two.

### Claim 17 (depends on 13)

The terminal according to claim 13, wherein turning off the at least one operating CPU when the mean is smaller than the CPU turn-off power consumption sensitive factor threshold comprises turning off at least one operating CPU when the mean is smaller than the CPU turn-off power consumption sensitive factor threshold and the number of queue tasks running on the operating CPUs is smaller than M.

### Claim 18

A terminal, comprising a processor, wherein the processor is programmed to:
acquire a usage rate and an operating frequency of one central processing unit (CPU) of a plurality of operating CPUs, wherein the number of the operating CPUs is M, wherein M is a positive integer greater than or equal to one, and the number of CPUs in a non-operating state is greater than or equal to one;
determine whether the operating frequency of the one CPU is greater than a core on-line frequency;
multiply the usage rate of the one CPU by a first weight to obtain a CPU power consumption sensitive factor corresponding to the one CPU when the operating frequency of the one CPU is greater than the core on-line frequency;
multiply the usage rate of the one CPU by a second weight to obtain a CPU power consumption sensitive factor corresponding to the one CPU when the operating frequency of the one CPU is smaller than or equal to the core on-line frequency, wherein the first weight and the second weight are not equal and are both positive integers greater than or equal to one;
execute the foregoing steps for M operating CPUs, and repeat N times, wherein N is a positive integer greater than or equal to one;
acquire M×N CPU power consumption sensitive factors after the foregoing steps are executed N times;
acquire a mean of the M×N CPU power consumption sensitive factors; and
turn on at least one CPU in a non-operating state when the mean is greater than a CPU turn-on power consumption sensitive factor threshold.

### Claim 19 (depends on 18)

The terminal according to claim 18, wherein that the processor executes the foregoing steps N times for each of M operating CPUs comprises executing the foregoing steps N times for an nth operating CPU, and wherein n is greater than or equal to one and is smaller than or equal to M.

### Claim 20 (depends on 19)

The terminal according to claim 19, wherein that the processor executes the foregoing steps N times for an nth operating CPU comprises when a timing moment of a nth timer corresponding to the n operating CPU arrives, executing the foregoing steps so that when the timing moment of the nth timer arrives N times consecutively, the foregoing steps are executed N times.

### Claim 21 (depends on 20)

The terminal according to claim 20, wherein the processor is further programmed to:
control the timer to stop timing when a system is idle; and
control the tinier to start timing when the system is not idle.

### Claim 22 (depends on 20)

The terminal according to claim 20, wherein the processor is further programmed to: control the timer to stop timing when the timing moment of the timer arrives consecutively, acquired operating frequencies of the CPU corresponding to the timer are all maximum frequency values, and the number of times that the operating frequencies are all maximum frequency values is greater than a maximum frequency lasting period time threshold.

### Claim 23 (depends on 22)

The terminal according to claim 22, wherein the maximum frequency lasting period time threshold is (the CPU turn-on power consumption sensitive factor threshold×N)/(a usage rate threshold×a frequency weight), wherein a frequency weight is the first weight, and wherein the number of times that the operating frequencies are all maximum frequency values equal to the maximum frequency lasting period time threshold plus one.

### Claim 24 (depends on 18)

The terminal according to claim 18, wherein turning on the at least one CPU in the non-operating state when the mean is greater than the CPU turn-on power consumption sensitive factor threshold comprises turning on at least one CPU in the non-operating state when the mean is greater than the CPU turn-on power consumption sensitive factor threshold and the number of queue tasks running on the operating CPUs is greater than M.
