CN113238871A - Device and method for controlling system power consumption by adjusting CPU frequency - Google Patents
Device and method for controlling system power consumption by adjusting CPU frequency Download PDFInfo
- Publication number
- CN113238871A CN113238871A CN202110612695.9A CN202110612695A CN113238871A CN 113238871 A CN113238871 A CN 113238871A CN 202110612695 A CN202110612695 A CN 202110612695A CN 113238871 A CN113238871 A CN 113238871A
- Authority
- CN
- China
- Prior art keywords
- cpu frequency
- computer
- bios
- module
- adaptive
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3058—Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Quality & Reliability (AREA)
- Power Sources (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a device and a method for controlling system power consumption by adjusting CPU frequency, belonging to the technical field of computers, aiming at solving the technical problems that the efficiency of manually adjusting the CPU frequency is low and the computer is possibly stuck or even down, and adopting the technical scheme that: the device comprises a temperature sensor, a self-adaptive CPU frequency module and an automatic refreshing module; the temperature sensor is used for acquiring the outside temperature and writing the outside temperature into the register; the self-adaptive CPU frequency module is used for calling the external temperature stored in the register, calculating the optimal CPU frequency and setting the CPU frequency; and the automatic refreshing module is used for resetting the BIOS parameters according to the acquired CPU frequency. The method realizes the self-adaptive adjustment of the CPU frequency by fitting the curve of the external temperature and the optimal CPU frequency, thereby obtaining the optimal CPU frequency.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a CPU frequency adjustment in a BIOS, and specifically relates to a device and a method for controlling system power consumption by adjusting the CPU frequency.
Background
With the increasing development of computer technology, higher requirements are put on the adaptability of the computer under severe environment. In order to better adapt to a severe environment, adjusting the frequency of the CPU is a very important adjustment means. In general, the frequency of the CPU has an adjustable range. The higher the frequency of the CPU, the more instructions can be processed in unit time, the faster the computer operation speed, and the higher the performance. Correspondingly, however, higher frequency requires higher memory frequency, which results in higher power consumption, and may increase the temperature of the CPU, thereby limiting CPU performance. In a severe environment, the CPU needs to operate in an optimal state to achieve higher computer performance.
In general, the CPU frequency can be adjusted manually, but the efficiency is low, and improper adjustment can seriously damage the performance of the computer, causing a stuck or even down.
Disclosure of Invention
The technical task of the invention is to provide a device and a method for controlling the power consumption of a system by adjusting the CPU frequency, so as to solve the problems that the efficiency of manually adjusting the CPU frequency is low and the computer is possibly stuck or even down.
The technical task of the invention is realized in the following way, a device for controlling the power consumption of a system by adjusting the CPU frequency comprises a temperature sensor, a self-adaptive CPU frequency module and an automatic refreshing module;
the temperature sensor is used for acquiring the outside temperature and writing the outside temperature into the register;
the self-adaptive CPU frequency module is used for calling the external temperature stored in the register, calculating the optimal CPU frequency and setting the CPU frequency;
and the automatic refreshing module is used for resetting the BIOS parameters according to the acquired CPU frequency.
Preferably, the BIOS of the computer is provided with a call function of the temperature sensor.
Preferably, the BIOS is provided with a shortcut key, and the computer enters the adaptive CPU frequency module through the shortcut key.
Preferably, after the automatic refresh module resets the BIOS parameter, the computer is restarted and enters normal operation.
Preferably, the working process of the device is as follows:
(1) starting up the computer;
(2) judging whether the CPU frequency acquisition of the BIOS is finished:
if yes, executing the step (3);
if not, directly starting the computer;
(3) calling a temperature sensor;
(4) the temperature sensor acquires the external temperature and writes the external temperature into the register;
(5) the self-adaptive CPU frequency module calls the external temperature stored in the register, calculates the optimal CPU frequency and sets the CPU frequency;
(6) the automatic refreshing module resets the BIOS parameters according to the acquired CPU frequency;
(7) and restarting the computer and entering normal operation.
A method for controlling system power consumption by adjusting CPU frequency is characterized in that adaptive adjustment of CPU frequency is realized by fitting a curve of external temperature and optimal CPU frequency, so that the optimal CPU frequency is obtained.
Preferably, the method is specifically as follows:
s1, initializing the BIOS to make the computer enter the CPU frequency acquisition function;
s2, entering a calling function of a temperature sensor of the BIOS, calling a hardware circuit by the BIOS to acquire the external temperature through the temperature sensor, and writing the temperature into a register;
s3, the self-adaptive CPU frequency module calls the external temperature stored in the register, calculates the CPU frequency and sets the CPU frequency;
s4, calling an automatic refresh module by the BIOS, and resetting BIOS parameters according to the acquired CPU frequency;
and S5, restarting the computer to enter normal operation.
Preferably, the BIOS is provided with a shortcut key, and the computer enters the adaptive CPU frequency module through the shortcut key.
An electronic device, comprising: a memory and at least one processor;
wherein the memory has stored thereon a computer program;
the at least one processor executes the computer program stored by the memory, causing the at least one processor to perform the method of controlling system power consumption by adjusting CPU frequency as described above.
A computer-readable storage medium having stored thereon a computer program executable by a processor to implement a method of controlling system power consumption by adjusting a CPU frequency as described above.
The device and the method for controlling the power consumption of the system by adjusting the CPU frequency have the following advantages that:
the invention can self-adaptively realize the adjustment of the CPU frequency by fitting the curve of the external temperature and the optimal CPU frequency, and has wide application prospect;
by arranging the calling function of the temperature sensor in the BIOS, the invention realizes that the external temperature is obtained at the BIOS stage, thereby obtaining the optimal CPU frequency, realizing the stability of the computer in severe environment and having the value of in-depth research;
the invention aims to ensure that the computer can normally work in a severe environment, the external temperature is obtained through the temperature sensor, and the optimal frequency of the CPU is calculated in a self-adaptive mode, so that the CPU frequency of the computer is adjusted through the BIOS, and the computer has the optimal performance.
Drawings
The invention is further described below with reference to the accompanying drawings.
FIG. 1 is a flow chart of the device operation process for controlling system power consumption by adjusting CPU frequency.
Detailed Description
The apparatus and method for controlling system power consumption by adjusting CPU frequency according to the present invention will be described in detail with reference to the accompanying drawings and embodiments.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Example 1:
the invention relates to a device for controlling system power consumption by adjusting CPU frequency, which structurally comprises a temperature sensor, a self-adaptive CPU frequency module and an automatic refreshing module;
the temperature sensor is used for acquiring the outside temperature and writing the outside temperature into the register;
the self-adaptive CPU frequency module is used for calling the external temperature stored in the register, calculating the optimal CPU frequency and setting the CPU frequency;
and the automatic refreshing module is used for resetting the BIOS parameters according to the acquired CPU frequency.
The temperature sensor in this embodiment is provided in the BIOS of the computer.
The BIOS in this embodiment is provided with a shortcut key, and the computer enters the adaptive CPU frequency module through the shortcut key.
After the automatic refresh module in this embodiment resets the BIOS parameter, the computer is restarted and enters normal operation.
As shown in fig. 1, the working process of the device is as follows:
(1) starting up the computer;
(2) judging whether the CPU frequency acquisition of the BIOS is finished:
if yes, executing the step (3);
if not, directly starting the computer;
(3) calling a temperature sensor;
(4) the temperature sensor acquires the external temperature and writes the external temperature into the register;
(5) the self-adaptive CPU frequency module calls the external temperature stored in the register, calculates the optimal CPU frequency and sets the CPU frequency;
(6) the automatic refreshing module resets the BIOS parameters according to the acquired CPU frequency;
(7) and restarting the computer and entering normal operation.
Example 2:
the invention relates to a method for controlling system power consumption by adjusting CPU frequency, which realizes the self-adaptive adjustment of CPU frequency by fitting the curve of the external temperature and the optimal CPU frequency, thereby obtaining the optimal CPU frequency; the method comprises the following specific steps:
s1, initializing the BIOS to make the computer enter the CPU frequency acquisition function;
s2, entering a calling function of a temperature sensor of the BIOS, calling a hardware circuit by the BIOS to acquire the external temperature through the temperature sensor, and writing the temperature into a register;
s3, the self-adaptive CPU frequency module calls the external temperature stored in the register, calculates the CPU frequency and sets the CPU frequency;
s4, calling an automatic refresh module by the BIOS, and resetting BIOS parameters according to the acquired CPU frequency;
and S5, restarting the computer to enter normal operation.
The BIOS in this embodiment is provided with a shortcut key, and the computer enters the adaptive CPU frequency module through the shortcut key.
Example 3:
an embodiment of the present invention further provides an electronic device, including: a memory and a processor;
wherein the memory stores computer-executable instructions;
the one processor executes the computer-executable instructions stored in the memory, so that the one processor executes the method for controlling the power consumption of the system by adjusting the CPU frequency in any embodiment of the invention.
Example 4:
embodiments of the present invention further provide a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions are loaded by a processor, so that the processor executes the method for controlling the power consumption of the system by adjusting the CPU frequency in any embodiment of the present invention. Specifically, a system or an apparatus equipped with a storage medium on which software program codes that realize the functions of any of the above-described embodiments are stored may be provided, and a computer (or a CPU or MPU) of the system or the apparatus is caused to read out and execute the program codes stored in the storage medium.
In this case, the program code itself read from the storage medium can realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
Examples of the storage medium for supplying the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD + RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer via a communications network.
Further, it should be clear that the functions of any one of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform a part or all of the actual operations based on instructions of the program code.
Further, it is to be understood that the program code read out from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion unit connected to the computer, and then causes a CPU or the like mounted on the expansion board or the expansion unit to perform part or all of the actual operations based on instructions of the program code, thereby realizing the functions of any of the above-described embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (10)
1. A device for controlling system power consumption by adjusting CPU frequency is characterized in that the device comprises a temperature sensor, a self-adaptive CPU frequency module and an automatic refreshing module;
the temperature sensor is used for acquiring the outside temperature and writing the outside temperature into the register;
the self-adaptive CPU frequency module is used for calling the external temperature stored in the register, calculating the optimal CPU frequency and setting the CPU frequency;
and the automatic refreshing module is used for resetting the BIOS parameters according to the acquired CPU frequency.
2. The apparatus of claim 1, wherein the BIOS of the computer is configured with a calling function of the temperature sensor.
3. The apparatus of claim 2, wherein the BIOS is configured with a shortcut key, and the computer is enabled to enter the adaptive CPU frequency module via the shortcut key.
4. The apparatus of claim 1, wherein the computer is restarted and enters normal operation after the auto-refresh module resets the BIOS parameter.
5. The apparatus for controlling system power consumption by adjusting CPU frequency according to claim 1, wherein the apparatus specifically operates as follows:
(1) starting up the computer;
(2) judging whether the CPU frequency acquisition of the BIOS is finished:
if yes, executing the step (3);
if not, directly starting the computer;
(3) calling a temperature sensor;
(4) the temperature sensor acquires the external temperature and writes the external temperature into the register;
(5) the self-adaptive CPU frequency module calls the external temperature stored in the register, calculates the optimal CPU frequency and sets the CPU frequency;
(6) the automatic refreshing module resets the BIOS parameters according to the acquired CPU frequency;
(7) and restarting the computer and entering normal operation.
6. A method for controlling system power consumption by adjusting CPU frequency is characterized in that the method realizes self-adaptive adjustment of CPU frequency by fitting a curve of external temperature and optimal CPU frequency, thereby obtaining the optimal CPU frequency.
7. The method of claim 6, wherein the method comprises the following steps:
s1, initializing the BIOS to make the computer enter the CPU frequency acquisition function;
s2, entering a calling function of a temperature sensor of the BIOS, calling a hardware circuit by the BIOS to acquire the external temperature through the temperature sensor, and writing the temperature into a register;
s3, the self-adaptive CPU frequency module calls the external temperature stored in the register, calculates the CPU frequency and sets the CPU frequency;
s4, calling an automatic refresh module by the BIOS, and resetting BIOS parameters according to the acquired CPU frequency;
and S5, restarting the computer to enter normal operation.
8. The method of claim 6 or 7, wherein a shortcut key is provided in the BIOS, and the computer enters the adaptive CPU frequency module through the shortcut key.
9. An electronic device, comprising: a memory and at least one processor;
wherein the memory has stored thereon a computer program;
the at least one processor executing the computer program stored by the memory causes the at least one processor to perform the method of controlling system power consumption by adjusting CPU frequency according to any of claims 6 to 8.
10. A computer-readable storage medium, in which a computer program is stored, the computer program being executable by a processor to implement the method of controlling system power consumption by adjusting a CPU frequency according to any one of claims 6 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110612695.9A CN113238871A (en) | 2021-06-02 | 2021-06-02 | Device and method for controlling system power consumption by adjusting CPU frequency |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110612695.9A CN113238871A (en) | 2021-06-02 | 2021-06-02 | Device and method for controlling system power consumption by adjusting CPU frequency |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113238871A true CN113238871A (en) | 2021-08-10 |
Family
ID=77136519
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110612695.9A Pending CN113238871A (en) | 2021-06-02 | 2021-06-02 | Device and method for controlling system power consumption by adjusting CPU frequency |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113238871A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114020137A (en) * | 2021-10-29 | 2022-02-08 | 西安超越申泰信息科技有限公司 | Method for adaptively adjusting power consumption of CPU frequency control system |
-
2021
- 2021-06-02 CN CN202110612695.9A patent/CN113238871A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114020137A (en) * | 2021-10-29 | 2022-02-08 | 西安超越申泰信息科技有限公司 | Method for adaptively adjusting power consumption of CPU frequency control system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20160299551A1 (en) | Method and controller for power throttling upon system on portable device, corresponding portable device, and corresponding computer program products | |
US7779284B2 (en) | Techniques for operating a processor subsystem to service masked interrupts during a power-down sequence | |
US8412969B2 (en) | Computer system and overclock controlling method and program thereof | |
EP2847674A1 (en) | Scheduling tasks among processor cores | |
CN109067416B (en) | Method for realizing hot plug and start of SIM card and intelligent hardware | |
US9292356B2 (en) | Thread processing on an asymmetric multi-core processor | |
CN113238871A (en) | Device and method for controlling system power consumption by adjusting CPU frequency | |
CN111050378B (en) | Network searching method and device and electronic equipment | |
CA3164095C (en) | Rapid frequency searching method and apparatus for data processing device, and data processing device | |
CN111338698A (en) | Method and system for accurately booting server by BIOS (basic input output System) | |
US10305292B2 (en) | Methods, apparatus, systems and articles of manufacture to charge a battery based on an electronic device skin temperature | |
CN113390125A (en) | Unit start-stop control method, system and device based on water outlet temperature correction | |
CN106502368B (en) | OTG peripheral control method and system of mobile terminal | |
CN107391399B (en) | Mobile terminal, SD card detection frequency control method thereof and storage medium | |
US20100285842A1 (en) | Apparatus and method for power saving using predictive polling in a portable terminal | |
CN110555009A (en) | processing method and device for Network File System (NFS) service | |
CN115751631A (en) | Air conditioner indoor unit control method and device, electric control box and storage medium | |
CN115189439A (en) | Pre-charging time adjusting method of power distribution unit, terminal and storage medium | |
CN103235728A (en) | Mounting method and device for presetting third party appliances in Android terminal | |
US20200285300A1 (en) | Activation control device, image forming apparatus, and method for controlling activation | |
CN109844688B (en) | System on chip, electronic device including the same, and driving method thereof | |
US20160299179A1 (en) | Scheme capable of estimating available power range according to extra power range and employing available power range as reference of performing power throttling upon a system | |
CN114020137A (en) | Method for adaptively adjusting power consumption of CPU frequency control system | |
CN116734522A (en) | High temperature prevention control method and device for air conditioner compressor, air conditioner and storage medium | |
CN117389657B (en) | Electronic equipment starting method, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |