1. Technical Field
The disclosure generally relates to frequency adjusting method and system, and especially to a method and system for adjusting a central processing unit (CPU) frequency to save power.
2. Description of Related Art
With the rapid development of personal computers, development of high performance components for computers have brought about a corresponding increase in power use. A CPU has a crucial effect on the stability of the computer. A power supply system is specially designed for providing power to the CPU. In many power supply systems, the CPU is controlled by the computer operation system (OS). The OS works out the CPU utilization rate to control the CPU frequency. However, when the CPU works under a low frequency, the Basic Input Output System (BIOS) cannot work out the CPU utilization rate to control the CPU frequency, which leads to a waste of power.
Therefore there is a need for improvement in the art.
Many aspects of the embodiments can be better understood with references to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the embodiments. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one.
Referring to
S201: the computer turns on to boot the BIOS 10;
S202: the BIOS 10 starts the performance monitor 20 in the CPU;
S203: the BIOS 10 turns on the timer 30; the timer 30 reads the system management interrupt program during a time period;
S204: the performance monitor 20 records number of clock signals and time values in two adjacent time periods;
S205: the performance monitor 20 determines the CPU utilization rate according to the number of clock signals, the time values, and the CPU clock speed;
S206: the BIOS 10 adjusts the CPU frequency according to the CPU utilization rate; and the BIOS 10 boots the computer's operation system (OS).
The CPU utilization rate can be calculated according to:
Wherein, C1 and C2 are number of clocked signals while the timer 30 reads the system management interrupt program in the two adjacent time periods. T1 and T2 are time values while the timer 30 reads the system management interrupt program in the two adjacent time periods. f is the CPU clock speed. A differential value of the time values T1 and T2 multiplied by the CPU clock speed f is a total number of clock signals in one clock cycle the timer 30 reads the system management interrupt program. And a differential value of the number of clock signals C1 and C2 divided by the total number of clock signals is the CPU utilization rate.
It is to be understood, however, that even though numerous characteristics and advantages of the embodiments have been set forth in the foregoing description, together with details of the structure and function of the embodiments, the disclosure is illustrative only, and changes may be made in detail, especially in matters of shape, size, and arrangement of parts within the principles of the invention to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed. It is also to be understood that the above description and the claims drawn to a method may include some indication in reference to certain steps. However, the indication used is only to be viewed for identification purposes and not as a suggestion as to an order for the steps.
Number | Date | Country | Kind |
---|---|---|---|
2010 1 0275756 | Sep 2010 | CN | national |
Number | Name | Date | Kind |
---|---|---|---|
6574739 | Kung et al. | Jun 2003 | B1 |
6721894 | Maher et al. | Apr 2004 | B2 |
20040059956 | Chakravarthy et al. | Mar 2004 | A1 |
20100191936 | Khatri et al. | Jul 2010 | A1 |
Number | Date | Country | |
---|---|---|---|
20120060022 A1 | Mar 2012 | US |