CN103543982B - A kind of clock frequency management method and mobile device - Google Patents

A kind of clock frequency management method and mobile device Download PDF

Info

Publication number
CN103543982B
CN103543982B CN201210246332.9A CN201210246332A CN103543982B CN 103543982 B CN103543982 B CN 103543982B CN 201210246332 A CN201210246332 A CN 201210246332A CN 103543982 B CN103543982 B CN 103543982B
Authority
CN
China
Prior art keywords
mobile device
cpu
clock frequency
external equipment
described mobile
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.)
Active
Application number
CN201210246332.9A
Other languages
Chinese (zh)
Other versions
CN103543982A (en
Inventor
王国添
徐畅
胡胜发
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Ankai Microelectronics Co.,Ltd.
Original Assignee
Anyka Guangzhou Microelectronics Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Anyka Guangzhou Microelectronics Technology Co Ltd filed Critical Anyka Guangzhou Microelectronics Technology Co Ltd
Priority to CN201210246332.9A priority Critical patent/CN103543982B/en
Publication of CN103543982A publication Critical patent/CN103543982A/en
Application granted granted Critical
Publication of CN103543982B publication Critical patent/CN103543982B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Power Sources (AREA)
  • Telephone Function (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

The embodiment of the invention discloses a kind of clock frequency management method and mobile device, for the clock frequency of mobile device is managed, adjust external equipment clock frequency especially in accordance with CPU usage.The method comprise the steps that by the central processing unit CPU clock frequency set of mobile device be higher limit, described higher limit is cpu clock frequency upper limit during described mobile device steady operation;The CPU usage of described mobile device is obtained according to the period 1;The external equipment clock frequency of described mobile device is adjusted according to described CPU usage.By implementing the present invention program, it is possible to ensure the fluency of task run, reduce the power consumption of mobile device, thus improve the flying power of mobile device simultaneously.

Description

A kind of clock frequency management method and mobile device
Technical field
The present invention relates to technical field of data processing, particularly relate to a kind of clock frequency management method and device.
Background technology
Mobile terminal is all the fashion at present, and most mobile terminals use OS (Operating System, operating system) pipe Reason hardware resource and software resource.The hardware resource of mobile device include CPU (Central Process Unit, CPU) and external equipment two parts, external equipment farther includes dynamic random access memory (Dynamic Random Access Memory, DRAM), liquid crystal display (Liquid Crystal Display, LCD), photographic head (Camera) and dodge Deposit (Flash) etc..Wherein, CPU and external equipment use each self-corresponding clock frequency, and clock frequency is the highest, and task run is more Smoothness, brings bigger power consumption for mobile device simultaneously, reduces its flying power.Therefore, the power consumption of mobile device depends on CPU Clock frequency and external equipment clock frequency.Mobile device management needs fluency that balancing tasks runs and mobile device Flying power.
Currently used clock frequency Managed Solution is: clock frequency when presetting a cpu clock frequency and an external equipment Rate.Running before a task, first cpu clock frequency and external equipment clock frequency are being adjusted to and adapt with this task Frequency range, then run this task with the cpu clock frequency after adjusting and external equipment clock frequency, this task run completes After, cpu clock frequency and external equipment clock frequency are reverted to preset state.
But, above-mentioned clock frequency Managed Solution exists certain difficult during determining the frequency range adapted with task Degree, it is therefore desirable to engineer when exploitation by task run time required clock frequency take into account, add opening of engineer Degree of raising difficult questions.If multitask running situation, then this determines that the difficulty of process is bigger.
Summary of the invention
In order to solve the problems referred to above, embodiments provide a kind of clock frequency management method and mobile device, use In the clock frequency of mobile device is managed, adjust external equipment clock frequency especially in accordance with CPU usage.By reality Execute the present invention program, it is possible to ensure the fluency of task run, reduce the power consumption of mobile device simultaneously, thus improve mobile device Flying power.And enable to engineer when exploitation need not by task run time required clock frequency take into account, Therefore development difficulty is reduced.
A kind of clock frequency management method, including:
Being higher limit by the central processing unit CPU clock frequency set of mobile device, described higher limit is described movement Cpu clock frequency upper limit during equipment steady operation;
The CPU usage of described mobile device is obtained according to the period 1;
The external equipment clock frequency of described mobile device is adjusted according to described CPU usage.
Preferably, farther include before the CPU usage of the described mobile device of described calculating: create idle task, institute The priority stating idle task is minimum, for triggering the CPU of described mobile device when described mobile device is in idle condition Enter Suspend Mode, under described Suspend Mode, the CPU task out of service of described mobile device;According to CPU suspension time and The described period 1 calculates the CPU usage of described mobile device, and described CPU suspension time is at the CPU of described mobile device Time in Suspend Mode.
Preferably, described clock frequency management method farther includes: by the clock of in running order external equipment Frequency requirement is set as the external equipment clock frequency lower limit of described mobile device.
Preferably, the described external equipment clock frequency according to the described CPU usage described mobile device of adjustment is further Including: when described CPU usage is more than first threshold, raise the external equipment clock frequency of described mobile device;When described When CPU usage is less than Second Threshold, lower the external equipment clock frequency of described mobile device according to very first time time delay.
A kind of mobile device, including:
First setup unit, being used for the central processing unit CPU clock frequency set of described mobile device is higher limit, Described higher limit is cpu clock frequency upper limit during described mobile device steady operation;
Acquiring unit, for obtaining the CPU usage of described mobile device according to the period 1;
Adjustment unit, for adjusting the external equipment clock frequency of described mobile device according to described CPU usage.
Preferably, described mobile device farther includes:
Creating unit, is used for creating idle task, and the priority of described idle task is minimum, in described mobile device The CPU triggering described mobile device when being in idle condition enters Suspend Mode, under described Suspend Mode, described mobile device CPU task out of service;Computing unit, for calculating described mobile device according to CPU suspension time and described period 1 CPU usage, described CPU suspension time is the time that the CPU of described mobile device is in Suspend Mode.
Preferably, described mobile device farther includes: the second setup unit, for being set in running order outside Standby clock frequency requires to be set as the external equipment clock frequency lower limit of described mobile device.
Preferably, described adjustment unit, farther include: raise subelement, for when described CPU usage is more than first During threshold value, raise the external equipment clock frequency of described mobile device;Lower subelement, for being less than when described CPU usage During Second Threshold, lower the external equipment clock frequency of described mobile device according to very first time time delay.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that
By the cpu clock frequency of mobile device is set as higher limit, it is possible to ensure the fluency of task run, according to CPU usage adjusts the external equipment clock frequency of mobile device, it is possible to accelerate CPU to the access speed of external equipment or fall The power consumption of low mobile device, improves the flying power of mobile device.So that engineer need not be by task run when exploitation The clock frequency of Shi Suoxu is taken into account, and therefore reduces development difficulty.
Accompanying drawing explanation
Fig. 1 is the clock frequency method flow diagram of first embodiment of the invention;
Fig. 2 is the clock frequency method flow diagram of second embodiment of the invention;
Fig. 3-a is external equipment clock frequency adjusting range the first schematic diagram of the present invention;
Fig. 3-b is external equipment clock frequency adjusting range the second schematic diagram of the present invention;
Fig. 4 is the mobile device structure chart of third embodiment of the invention;
Fig. 5 is the mobile device structure chart of fourth embodiment of the invention.
Detailed description of the invention
Below in conjunction with the Figure of description in the present invention, the technical scheme in invention is clearly and completely described, Obviously, described embodiment is only a part of embodiment of the present invention rather than whole embodiments.Based in the present invention Embodiment, the every other embodiment that those of ordinary skill in the art are obtained under not making creative work premise, all Belong to the scope of protection of the invention.
Embodiments provide a kind of clock frequency management method, for the clock frequency of mobile device is managed Reason, adjusts external equipment clock frequency especially in accordance with CPU usage.By implementing this clock frequency management method, it is possible to protect The fluency of card task run, reduces the power consumption of mobile device simultaneously, thus improves the flying power of mobile device.And can Make engineer when exploitation need not by task run time required clock frequency take into account, therefore reduce development difficulty. The embodiment of the present invention also provides for the mobile device being correlated with, and will be described in detail respectively below.
A kind of clock frequency management method will be described in detail by first embodiment of the invention, described in the present embodiment time Clock frequency rate management method idiographic flow refers to Fig. 1, including step:
101, the cpu clock frequency of mobile device is set as higher limit.
In a mobile device, CPU and external equipment use each self-corresponding clock frequency, therefore the clock frequency phase of the two The most independent.Only could improve the performance of mobile device during the clock frequency of the two collaborative work in the reasonable scope.
In this step, the cpu clock frequency of mobile device is set as higher limit.Described higher limit does not implies that CPU The maximum clock frequency that can reach, but during mobile device steady operation, the clock frequency upper limit that CPU can reach.
Wherein, described higher limit is to determine according to the running voltage that CPU is current, and this higher limit can be according to the actual work of CPU Make the difference of voltage and have different value.During by the cpu clock frequency of mobile device is set as mobile device steady operation The clock frequency upper limit that CPU can reach, it is possible in the system-based of this mobile device, ensures mobile device to greatest extent Fluency during operation task.
102, the CPU usage of mobile device is obtained according to the period 1.
The task that CPU usage reflection runs takies the situation of cpu resource.CPU usage is the highest, illustrates that mobile device exists A lot of task has been run on certain time period, on the contrary less.Mobile device described in the present embodiment is that TCM operation is System, system is that time segment uses to CPU.Such as, task one takies 10 milliseconds, and then task two takies 30 milliseconds, then Idle 60 milliseconds of CPU, then in aforesaid 100 milliseconds, CPU usage be 40%=[(10+30) ÷ (10+30+60)] × 100%.
In this step, the CPU usage of mobile device is periodically obtained according to the period 1.
Wherein, in above-mentioned example, the period 1 takes 100 milliseconds without concrete limit value the period 1.Period 1 Value size can affect the sensitivity performing following steps 103, and the period 1 is the least, performs step 103 the sensitiveest, the period 1 The biggest, perform step 103 the most blunt.
103, the external equipment clock frequency of mobile device is adjusted according to CPU usage.
In this step, the external equipment clock of described mobile device is adjusted according to the CPU usage acquired in step 102 Frequency.Preferably, particularly as follows: when CPU usage is more than first threshold, clock frequency when raising the external equipment of described mobile device Rate;When CPU usage is less than Second Threshold, lower the external equipment clock frequency of described mobile device.
First threshold and Second Threshold are not made concrete restriction by the present embodiment method, but it will be apparent that first threshold is big In Second Threshold.
The most the cpu clock frequency of mobile device is set as higher limit, through analyzing only two kinds of situations Cause CPU usage the biggest:
Situation one, CPU previous cycle perform some job sequence;
Situation two, CPU are in the state accessing external equipment for a long time.
Situation one occur probability smaller, even if occur also will not last very long, so, CPU usage is the biggest Often caused by occurring in that situation two.When there is situation two, the external equipment clock frequency raising mobile device enough can be accelerated The CPU access speed to external equipment, thus shorten CPU and access the time of external equipment.
When CPU usage is the least, illustrates that CPU or need not seldom access external equipment, now lower outside mobile device Portion's equipment clock frequency, thus reduce mobile device power consumption.
In the present embodiment, by the cpu clock frequency of mobile device is set as higher limit, it is possible to ensure task run Fluency, according to CPU usage adjust mobile device external equipment clock frequency, it is possible to accelerate CPU to external equipment Access speed or the power consumption of reduction mobile device, improve the flying power of mobile device.So that engineer is when exploitation Clock frequency required during task run need not be taken into account, therefore reduce development difficulty.
Clock frequency management method described in first embodiment will be remarked additionally by second embodiment of the invention, this reality Execute the clock frequency management method idiographic flow described in example and refer to Fig. 2, including step:
When 201, the clock frequency of in running order external equipment being required the external equipment being set as mobile device Clock lower-frequency limit.
Mobile device includes at least one external equipment, such as DRAM, LCD, Camera and Flash etc..If mobile device In some external equipment outside equipment clock frequency is had specific requirement, then this external equipment is in running order Time, it is possible to sending clock frequency requirement to mobile device, the clock frequency that this external equipment requires is exactly the outside of mobile device The lower limit that equipment clock frequency can be lowered.Therefore, it is possible to ensure mobile device work under suitable external equipment clock frequency Make, it is ensured that the fluency of task run.
Wherein, above-mentioned clock frequency requirement may be embodied in the driver of this external equipment.
It addition, when have plural external equipment propose each self-corresponding clock frequency require time, take required Scale clock frequency is the external equipment clock frequency lower limit of mobile device.Illustrate with an example below.
When the external equipment of mobile device does not has particular requirement to outside equipment clock frequency, external equipment clock frequency Adjustable range is as shown in Fig. 3-a.In this case, according to CPU usage situation, external equipment clock frequency can be fminTo fmaxBetween dynamically adjust.When the external equipment of mobile device exists particular requirement to outside equipment clock frequency Time, it is assumed that there are the clock frequency of two such external equipment A and B, external equipment A requires as fA, the clock of external equipment B Frequency requirement is fB, and fA< fB, refer to Fig. 3-b, in this case, according to CPU usage situation, external equipment clock Frequency may only be at fBTo fmaxBetween dynamically adjust.In like manner, without the clock frequency requirement of registration external equipment B, So, external equipment clock frequency may only be at fATo fmaxBetween dynamically adjust.
In this step, require to be set as described mobile device by the clock frequency of in running order external equipment External equipment clock frequency lower limit.
Preferably, the clock frequency of external equipment requires to be not required in time being scheduled on mobile device and start proposing, therefore Step 201 can also perform before or after follow-up either step, and does not limit execution number of times, repeats no more here.
202, idle task is created.
In this step, mobile device creates idle task after starting immediately, and the priority of described idle task is minimum, because of This only has CPU usage to drop to close to this idle task when 0 to be just run.It is in idle condition in described mobile device Time, CPU usage drops to close to 0, runs the idle task that described priority is minimum, and the practical function of this idle task is tactile The CPU sending out mobile device enters Suspend Mode.Under Suspend Mode, even if CPU works in higher clock frequency, its power consumption is also Not quite.
Wherein, Suspend Mode is a kind of energy-saving mode of CPU, and under Suspend Mode, the CPU of described mobile device stops fortune Row task.CPU Suspend Mode is a kind of power-saving strategies of cpu power management, and the CPU of different models, for Suspend Mode The difference that description is, such as:
ARM is described as: " Wait for interrupt, puts the ARM into a low power state and stops it executing further until and interrupt occurs.”。
MIPS is described as: " Register-Controlled Management, places the system into a Low power state, until an exception or error occurs.Instruction-Controlled Power Management, Causes the intemal clocks to be suspended and pipeline to be Frozen, until any enabled interrupt, NMI, debug interrupt, or reset condition occurs.”。
PowerPC is described as: " Put the processor in the wait state, and is disabled when an interrupt occurs.”。
But, the essence of Suspend Mode is consistent, i.e. CPU stops performing instruction, and allows CPU be in a kind of low-power consumption State.Even if different CPU are different to the control method of this function, describe the most different, but do not affect the present embodiment side The enforcement of method.
203, the CPU usage of mobile device is calculated according to CPU suspension time and period 1.
In this step, after idle task triggers CPU entrance Suspend Mode, described idle task can also be according to CPU Suspension time and described period 1 calculate the CPU usage of described mobile device.
Wherein, described CPU suspension time is the time that the CPU of described mobile device is in Suspend Mode.Assume first week Phase is T, and suspension time is t, and CPU usage is RCPU.In this step, CPU usage R is calculatedCPUCalculating formula be:
RCPU=[(T-t) ÷ T] × 100%.
The task that CPU usage reflection runs takies the situation of cpu resource.CPU usage is the highest, illustrates that mobile device exists A lot of task has been run on certain time period, on the contrary less.Such as, task one takies 10 milliseconds, and then task two takies 30 millis Second, and task one and task two operation free of discontinuities, then idle 60 milliseconds of CPU, i.e. suspension time t is 60 milliseconds, if aforementioned 100 milliseconds be period 1 T, then CPU usage R in period 1 TCPUFor:
RCPU=[(T-t) ÷ T] × 100%=[(100-600) ÷ 100] × 100%=40%.
Mobile device can periodically calculate CPU usage by the described period 1.
Preferably, in this step, calculate CPU usage operation performed by idle task, one first week If will not calculate CPU usage without execution idle task, i.e. idle task in phase T, then can take CPU usage is 100%.
204, the cpu clock frequency of mobile device is set as higher limit.
In a mobile device, CPU and external equipment use each self-corresponding clock frequency, therefore the clock frequency phase of the two The most independent.Only could improve the performance of mobile device during the clock frequency of the two collaborative work in the reasonable scope.
In this step, the cpu clock frequency of mobile device is set as higher limit.Described higher limit does not implies that CPU The maximum clock frequency that can reach, but during mobile device steady operation, the clock frequency upper limit that CPU can reach.
Wherein, described higher limit is to determine according to the running voltage that CPU is current, and this higher limit can be according to the actual work of CPU Make the difference of voltage and have different value.During by the cpu clock frequency of mobile device is set as mobile device steady operation The clock frequency upper limit that CPU can reach, it is possible in the system-based of this mobile device, ensures mobile device to greatest extent Fluency during operation task.
205, the CPU usage of mobile device is obtained according to the period 1.
In this step, the CPU usage of mobile device is periodically obtained according to the period 1.
Wherein, in above-mentioned example, the period 1 takes 100 milliseconds without concrete limit value the period 1.Period 1 Value size can affect the sensitivity performing following steps 206, and the period 1 is the least, performs step 206 the sensitiveest, the period 1 The biggest, perform step 206 the most blunt.
Preferably, the period 1 of above-mentioned periodicity acquisition operation institute foundation can realize, here by arranging intervalometer Repeat no more.
206, the external equipment clock frequency of mobile device is adjusted according to CPU usage.
The present embodiment inventive method pursues the balance of mobile device fluency and flying power, but the most preferential with fluency For principle.
In this step, the external equipment clock of described mobile device is adjusted according to the CPU usage acquired in step 205 Frequency.Step 206 specifically includes step 2061 and step 2062 liang sub-steps.Step 2061 and step 2062 do not have order Relevant, therefore can freely convert order, repeat no more here.
Step 2061 and step 2062 particularly as follows:
2061, when CPU usage is more than first threshold, the external equipment clock frequency of mobile device is raised.
The most the cpu clock frequency of mobile device is set as higher limit, through analyzing only two kinds of situations Cause CPU usage the biggest:
Situation one, CPU previous cycle perform some job sequence;
Situation two, CPU are in the state accessing external equipment for a long time.
Situation one occur probability smaller, even if occur also will not last very long, so, CPU usage is the biggest Often caused by occurring in that situation two.When there is situation two, the external equipment clock frequency raising mobile device enough can be accelerated The CPU access speed to external equipment, thus shorten CPU and access the time of external equipment.
Wherein, the concrete mode of rise can be to increase a range value, as raised 100MHz, it is also possible to be to go up in proportion Adjust, be as above adjusted to original twice, it is also possible to be other rise mode, be not especially limited here.
Preferably, the operation raising external equipment clock frequency can be immediately performed, to ensure the fluency of task run.? Under fluency priority principle, the external equipment clock frequency after rise may exceed the external equipment clock frequency being actually needed, Now can the most gradually lower external equipment clock frequency according to practical situation, i.e. be finely adjusted.
2062, when CPU usage is less than Second Threshold, the external equipment of mobile device is lowered according to very first time time delay Clock frequency.
When CPU usage is the least, illustrate that CPU or need not seldom access external equipment, now according to very first time time delay Lower the external equipment clock frequency of mobile device, thus reduce mobile device power consumption.
Wherein, is not made concrete restriction the very first time.The concrete mode lowered can be to reduce by a range value, as lowered 100MHz, it is also possible to be to lower in proportion, be adjusted to original 70% as follows, it is also possible to be other downward mode, does not makees to have Body limits.
Preferably, the operation lowering external equipment clock frequency can perform, during to avoid frequently adjusting external equipment in time delay The fluency that clock frequency influence runs.Under fluency priority principle, the external equipment clock frequency after downward may be beyond real The external equipment clock frequency that border needs, now can the most gradually lower external equipment clock frequency, i.e. enter according to practical situation Row fine setting.
First threshold and Second Threshold are not made concrete restriction by the present embodiment method, but it will be apparent that first threshold is big In Second Threshold.
In the present embodiment, by the cpu clock frequency of mobile device is set as higher limit, it is possible to ensure task run Fluency, under fluency priority principle, according to CPU usage adjust mobile device external equipment clock frequency, it is possible to Accelerate CPU to the access speed of external equipment or the power consumption of reduction mobile device, the flying power of raising mobile device.Thus Make engineer when exploitation need not by task run time required clock frequency take into account, therefore reduce development difficulty.
A kind of mobile device will be described in detail, in the mobile device described in the present embodiment by third embodiment of the invention Comprise one or more unit for realizing the one or more steps of preceding method.Therefore, to step each in preceding method Description is corresponding unit be applicable to described mobile device.Mobile device concrete structure described in the present embodiment refers to Fig. 4, bag Include:
First setup unit 401, for being set as higher limit by the cpu clock frequency of described mobile device.
In a mobile device, CPU and external equipment use each self-corresponding clock frequency, therefore the clock frequency phase of the two The most independent.Only could improve the performance of mobile device during the clock frequency of the two collaborative work in the reasonable scope.
The cpu clock frequency of mobile device can be set as higher limit by the first setup unit 401.Described higher limit is not Refer to the maximum clock frequency that CPU can reach, but during mobile device steady operation, in the clock frequency that CPU can reach Limit.
Wherein, described higher limit is to determine according to the running voltage that CPU is current, and this higher limit can be according to the actual work of CPU Make the difference of voltage and have different value.The cpu clock frequency of mobile device is set as mobile by the first setup unit 401 The clock frequency upper limit that during equipment steady operation, CPU can reach, it is possible in the system-based of this mobile device, to greatest extent Guarantee mobile device operation task time fluency.
Acquiring unit 402, for obtaining the CPU usage of described mobile device according to the period 1.
The task that CPU usage reflection runs takies the situation of cpu resource.CPU usage is the highest, illustrates that mobile device exists A lot of task has been run on certain time period, on the contrary less.Mobile device described in the present embodiment is that TCM operation is System, system is that time segment uses to CPU.Such as, task one takies 10 milliseconds, and then task two takies 30 milliseconds, then Idle 60 milliseconds of CPU, then in aforesaid 100 milliseconds, CPU usage be 40%=[(10+30) ÷ (10+30+60)] × 100%.
Acquiring unit 402 can periodically obtain the CPU usage of mobile device according to the period 1.
Wherein, in above-mentioned example, the period 1 takes 100 milliseconds without concrete limit value the period 1.Period 1 Value size can affect the sensitivity of adjustment unit 403, and the period 1 is the least, and adjustment unit 403 is the sensitiveest, and the period 1 is more Greatly, adjustment unit 403 is the most blunt.
Adjustment unit 403, communicates to connect with acquiring unit 402, sets for adjusting described movement according to described CPU usage Standby external equipment clock frequency.
Adjustment unit 403 can adjust the outside of described mobile device according to the CPU usage acquired in acquiring unit 402 Equipment clock frequency.Preferably, particularly as follows: when CPU usage is more than first threshold, the outside raising described mobile device sets Standby clock frequency;When CPU usage is less than Second Threshold, lower the external equipment clock frequency of described mobile device.This reality Execute example and first threshold and Second Threshold are not made concrete restriction, but it will be apparent that first threshold is more than Second Threshold.
The cpu clock frequency of mobile device is set as higher limit by the first setup unit 401, through analyzing only two kinds Situation causes CPU usage the biggest:
Situation one, CPU previous cycle perform some job sequence;
Situation two, CPU are in the state accessing external equipment for a long time.
Situation one occur probability smaller, even if occur also will not last very long, so, CPU usage is the biggest Often caused by occurring in that situation two.When situation two occurs, clock frequency when adjustment unit 403 raises the external equipment of mobile device Rate enough can accelerate the CPU access speed to external equipment, thus shorten CPU and access the time of external equipment.
When CPU usage is the least, illustrating that CPU or need not seldom access external equipment, now adjustment unit 403 is lowered and is moved The external equipment clock frequency of dynamic equipment, thus reduce mobile device power consumption.
In the present embodiment, by the first setup unit 401, the cpu clock frequency of mobile device is set as higher limit, Ensure that the fluency of task run, clock frequency when adjustment unit 403 adjusts the external equipment of mobile device according to CPU usage Rate, it is possible to accelerate CPU to the access speed of external equipment or the power consumption of reduction mobile device, the continuation of the journey energy of raising mobile device Power.So that engineer when exploitation need not by task run time required clock frequency take into account, therefore reduce out Degree of raising difficult questions.
Mobile device described in 3rd embodiment will be remarked additionally, described in the present embodiment by fourth embodiment of the invention Mobile device in comprise one or more unit for realizing the one or more steps of preceding method.Therefore, to aforementioned side The description of each step corresponding unit be applicable to described mobile device in method.Mobile device concrete structure described in the present embodiment Refer to Fig. 5, including:
Second setup unit 501, for being set as described by the requirement of the clock frequency of in running order external equipment The external equipment clock frequency lower limit of mobile device.
If in mobile device, some external equipment has specific requirement to outside equipment clock frequency, then set outside this Standby when in running order, it is possible to send clock frequency requirement to the second setup unit 501 of mobile device, this external equipment The clock frequency required is exactly the lower limit that the external equipment clock frequency of mobile device can be lowered.Therefore, it is possible to ensure mobile setting For working under suitable external equipment clock frequency, it is ensured that the fluency of task run.
Wherein, above-mentioned clock frequency requirement may be embodied in the driver of this external equipment.
It addition, when there being plural external equipment to propose the requirement of each self-corresponding clock frequency, the second setup unit 501 take the external equipment clock frequency lower limit that required maximum clock frequency is mobile device.
Instantiation refers to the relevant record of step 201 in the second embodiment, repeats no more here.
The clock frequency of in running order external equipment can be required to be set as described shifting by the second setup unit 501 The external equipment clock frequency lower limit of dynamic equipment.
Creating unit 502, is used for creating idle task.
Creating unit 502 can create idle task, the priority of described idle task after mobile device starts immediately Minimum, the most only CPU usage drops to close to this idle task when 0 and just can be run.It is in sky in described mobile device During not busy state, CPU usage drops to close to 0, and CPU runs the idle task that described priority is minimum, the reality of this idle task Border effect is that the CPU triggering mobile device enters Suspend Mode.Under Suspend Mode, even if CPU works in higher time clock frequency Rate, its power consumption is the most little.
Wherein, Suspend Mode is a kind of energy-saving mode of CPU, and under Suspend Mode, the CPU of described mobile device stops fortune Row task.
Computing unit 503, communicates to connect with creating unit 502, by according to CPU suspension time with based on the described period 1 Calculate the CPU usage of described mobile device.
Triggering CPU in idle task to enter after Suspend Mode, computing unit 503 can be according to CPU suspension time and described Period 1 calculates the CPU usage of described mobile device.
Wherein, described CPU suspension time is the time that the CPU of described mobile device is in Suspend Mode.Calculate CPU to take The example of rate refers to the relevant record of the second embodiment step 203, repeats no more here.
Computing unit 503 can periodically calculate CPU usage by the described period 1.
Preferably, if if CPU is not carried out idle task in a period 1 T, i.e. computing unit 503 will not calculate CPU usage, then can take CPU usage is 100%.
First setup unit 504, being used for the central processing unit CPU clock frequency set of described mobile device is the upper limit Value.
In a mobile device, CPU and external equipment use each self-corresponding clock frequency, therefore the clock frequency phase of the two The most independent.Only could improve the performance of mobile device during the clock frequency of the two collaborative work in the reasonable scope.
The cpu clock frequency of mobile device can be set as higher limit by the first setup unit 504.Described higher limit is not Refer to the maximum clock frequency that CPU can reach, but during mobile device steady operation, in the clock frequency that CPU can reach Limit.
Wherein, described higher limit is to determine according to the running voltage that CPU is current, and this higher limit can be according to the actual work of CPU Make the difference of voltage and have different value.During by the cpu clock frequency of mobile device is set as mobile device steady operation The clock frequency upper limit that CPU can reach, it is possible in the system-based of this mobile device, ensures mobile device to greatest extent Fluency during operation task.
Acquiring unit 505, for obtaining the CPU usage of described mobile device according to the period 1.
Acquiring unit 505 can periodically obtain the CPU usage of mobile device according to the period 1.
Wherein, the period 1 is without concrete limit value.The value size of period 1 can affect the sensitive of adjustment unit 506 Degree, the period 1 is the least, and adjustment unit 506 is the sensitiveest, and the period 1 is the biggest, and adjustment unit 506 is the most blunt.
Preferably, the period 1 of above-mentioned periodicity acquisition operation institute foundation can realize, here by arranging intervalometer Repeat no more.
Adjustment unit 506, communicates to connect with acquiring unit 505, sets for adjusting described movement according to described CPU usage Standby external equipment clock frequency.
Mobile device described in the present embodiment pursues the balance of fluency and flying power, but is preferably with fluency simultaneously Principle.
Adjustment unit 506 can adjust the outside of described mobile device according to the CPU usage acquired in acquiring unit 505 Equipment clock frequency.Adjustment unit 506 raises subelement 5061 and lowers subelement 5062, the two communication link concrete also including Connect.
Raise subelement 5061, for when described CPU usage is more than first threshold, raising outside described mobile device Portion's equipment clock frequency.
The cpu clock frequency of mobile device is set as higher limit by the first setup unit 504, through analyzing only two kinds Situation causes CPU usage the biggest:
Situation one, CPU previous cycle perform some job sequence;
Situation two, CPU are in the state accessing external equipment for a long time.
Situation one occur probability smaller, even if occur also will not last very long, so, CPU usage is the biggest Often caused by occurring in that situation two.When situation two occurs, when raising the external equipment that subelement 5061 raises mobile device Clock frequency rate enough can accelerate the CPU access speed to external equipment, thus shorten CPU and access the time of external equipment.
Wherein, the concrete mode of rise can be to increase a range value, as raised 100MHz, it is also possible to be to go up in proportion Adjust, be as above adjusted to original twice, it is also possible to be other rise mode, be not especially limited here.
Preferably, the operation raising subelement 5061 can be immediately performed, to ensure the fluency of task run.At fluency Under priority principle, the external equipment clock frequency after rise may be beyond the external equipment clock frequency being actually needed, and this is at present Tune unit 5062 can the most gradually lower external equipment clock frequency according to practical situation, is i.e. finely adjusted.In like manner, fine setting is also Can be performed by raising subelement 5061.
Lower subelement 5062, for when described CPU usage is less than Second Threshold, lowering according to very first time time delay The external equipment clock frequency of described mobile device.
When CPU usage is the least, illustrates that CPU or need not seldom access external equipment, now lower 5062, subelement Lower the external equipment clock frequency of mobile device according to very first time time delay, thus reduce mobile device power consumption.
Wherein, is not made concrete restriction the very first time.The concrete mode lowered can be to reduce by a range value, as lowered 100MHz, it is also possible to be to lower in proportion, be adjusted to original 70% as follows, it is also possible to be other downward mode, does not makees to have Body limits.
Preferably, the operation lowering subelement 5062 can perform, to avoid frequently adjusting external equipment clock frequency in time delay The fluency that impact runs.Under fluency priority principle, the external equipment clock frequency after downward may be beyond being actually needed External equipment clock frequency, now lower subelement 5062 clock frequency when can the most gradually lower external equipment according to practical situation Rate, is i.e. finely adjusted.In like manner, fine setting can also be performed by raising subelement 5061.
First threshold and Second Threshold are not made concrete restriction by the present embodiment, but it will be apparent that first threshold is more than the Two threshold values.
It is below the concrete application scenarios of a described mobile device of this enforcement:
Described mobile device is a MP4 digital code player, in the middle of have two application, an application is e-book, another Individual application is MP3 player.After MP4 digital code player opens e-book, only just CPU is needed to run one page turning when little Section code and carry out low volume data process, within the most of the time, CPU just can enter Suspend Mode.Now CPU usage connects Nearly 0, so external equipment clock frequency also can be the lowest.If the application present invention, power consumption can drop to 4 to 5 milliamperes, decrease by 70% Above.
During MP3 player plays MP3, relate to reading and the decoding of mp3 file, and the data volume processed adopting with MP3 Sample rate is relevant with compression ratio, and when sample rate is bigger or compression ratio is higher, CPU usage will improve, now MP4 number Code player raises external equipment clock frequency, will accelerate the CPU access speed to external equipment.If the application present invention, can To allow power consumption decline 4 to 10 milliamperes, power consumption declines clearly.
In the present embodiment, by the first setup unit 504, the cpu clock frequency of mobile device is set as higher limit, Ensure that the fluency of task run, under fluency priority principle, adjustment unit 506 adjusts mobile according to CPU usage The external equipment clock frequency of equipment, it is possible to accelerate CPU to the access speed of external equipment or the power consumption that reduces mobile device, Improve the flying power of mobile device.So that engineer when exploitation need not by task run time required clock frequency examine Worry is entered, and therefore reduces development difficulty.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method is permissible Instructing relevant hardware by program to complete, described program can be stored in a kind of computer-readable recording medium, on Stating the storage medium mentioned can be read only memory, disk or CD etc..
Above a kind of clock frequency management method provided by the present invention and mobile device are described in detail, for One of ordinary skill in the art, according to the thought of the embodiment of the present invention, the most all has In place of change, in sum, this specification content should not be construed as limitation of the present invention.

Claims (8)

1. a clock frequency management method, it is characterised in that including:
Being higher limit by the central processing unit CPU clock frequency set of mobile device, described higher limit is described mobile device Cpu clock frequency upper limit during steady operation;Wherein, described mobile device includes CPU and external equipment, and, described CPU and Described external equipment uses each self-corresponding clock frequency;
The CPU usage of described mobile device is obtained according to the period 1;
The external equipment clock frequency of described mobile device is adjusted according to described CPU usage.
Method the most according to claim 1, it is characterised in that before the CPU usage of the described mobile device of described acquisition Farther include:
Creating idle task, the priority of described idle task is minimum, for touching when described mobile device is in idle condition The CPU sending out mobile device described enters Suspend Mode, under described Suspend Mode, out of service of the CPU of described mobile device Business;
The CPU usage of described mobile device, described CPU suspension time is calculated according to CPU suspension time and described period 1 CPU for described mobile device is in the time of Suspend Mode.
Method the most according to claim 1 and 2, it is characterised in that described clock frequency management method farther includes:
Clock frequency requirement by running order external equipment is set as clock frequency during the external equipment of described mobile device Rate lower limit.
Method the most according to claim 1 and 2, it is characterised in that described according to the described movement of adjustment of described CPU usage The external equipment clock frequency of equipment farther includes:
When described CPU usage is more than first threshold, raise the external equipment clock frequency of described mobile device;
When described CPU usage is less than Second Threshold, lower the external equipment of described mobile device according to very first time time delay Clock frequency.
5. a mobile device, it is characterised in that described mobile device includes CPU and external equipment, and, described CPU and institute State external equipment and use each self-corresponding clock frequency;Described mobile device also includes:
First setup unit, for being higher limit by the central processing unit CPU clock frequency set of described mobile device, described Higher limit is cpu clock frequency upper limit during described mobile device steady operation;
Acquiring unit, for obtaining the CPU usage of described mobile device according to the period 1;
Adjustment unit, for adjusting the external equipment clock frequency of described mobile device according to described CPU usage.
Mobile device the most according to claim 5, it is characterised in that described mobile device farther includes:
Creating unit, is used for creating idle task, and the priority of described idle task is minimum, for being in described mobile device The CPU triggering described mobile device during idle condition enters Suspend Mode, under described Suspend Mode, described mobile device CPU task out of service;
Computing unit, for calculating the CPU usage of described mobile device, institute according to CPU suspension time and described period 1 State the CPU that CPU suspension time is described mobile device and be in the time of Suspend Mode.
7. according to the mobile device described in claim 5 or 6, it is characterised in that described mobile device farther includes:
Second setup unit, for requiring to be set as described mobile device by the clock frequency of in running order external equipment External equipment clock frequency lower limit.
8., according to the mobile device described in claim 5 or 6, it is characterised in that described adjustment unit, farther include:
Raise subelement, be used for when described CPU usage is more than first threshold, when raising the external equipment of described mobile device Clock frequency rate;
Lower subelement, for when described CPU usage is less than Second Threshold, lowering described movement according to very first time time delay The external equipment clock frequency of equipment.
CN201210246332.9A 2012-07-16 2012-07-16 A kind of clock frequency management method and mobile device Active CN103543982B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210246332.9A CN103543982B (en) 2012-07-16 2012-07-16 A kind of clock frequency management method and mobile device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210246332.9A CN103543982B (en) 2012-07-16 2012-07-16 A kind of clock frequency management method and mobile device

Publications (2)

Publication Number Publication Date
CN103543982A CN103543982A (en) 2014-01-29
CN103543982B true CN103543982B (en) 2016-12-21

Family

ID=49967471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210246332.9A Active CN103543982B (en) 2012-07-16 2012-07-16 A kind of clock frequency management method and mobile device

Country Status (1)

Country Link
CN (1) CN103543982B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105487597A (en) * 2014-10-09 2016-04-13 深圳市中兴微电子技术有限公司 Clock management method and device of central processing unit
US10444819B2 (en) * 2015-06-19 2019-10-15 Intel Corporation Techniques to control computational resources for an electronic device
CN106371985B (en) * 2015-07-24 2019-05-31 联想(北京)有限公司 Information processing method and electronic equipment
CN105005504B (en) * 2015-07-30 2019-01-29 深圳创维-Rgb电子有限公司 A kind of the single task mode implementation method and system of Android platform
CN106897203A (en) * 2017-03-29 2017-06-27 北京经纬恒润科技有限公司 A kind of cpu load rate computational methods and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101576768A (en) * 2009-06-15 2009-11-11 北京中星微电子有限公司 Method and device for switching device frequency
CN101739359A (en) * 2009-12-17 2010-06-16 深圳华为通信技术有限公司 Storage device, access method for mobile terminal and data, and frequency modulation method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101498952B (en) * 2009-03-02 2012-12-26 北京红旗胜利科技发展有限责任公司 Method and device for synchronizing clock
US8880922B2 (en) * 2009-03-05 2014-11-04 Hitachi, Ltd. Computer and power management system for computer

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101576768A (en) * 2009-06-15 2009-11-11 北京中星微电子有限公司 Method and device for switching device frequency
CN101739359A (en) * 2009-12-17 2010-06-16 深圳华为通信技术有限公司 Storage device, access method for mobile terminal and data, and frequency modulation method

Also Published As

Publication number Publication date
CN103543982A (en) 2014-01-29

Similar Documents

Publication Publication Date Title
CN102789305B (en) Postponing suspend
TWI599960B (en) Performing power management in a multicore processor
KR101471303B1 (en) Device and method of power management for graphic processing unit
US9626295B2 (en) Systems and methods for scheduling tasks in a heterogeneous processor cluster architecture using cache demand monitoring
EP3272072B1 (en) Method, apparatus and system for dynamic bandwidth management in systems
KR102490908B1 (en) Resource scheduling method and terminal device
CN106415498B (en) Virtual machine power management
CN103543982B (en) A kind of clock frequency management method and mobile device
US9021436B2 (en) Automatic reconnection of debugger to a reactivated application
US9170912B1 (en) System and methods for power and energy modeling in computing devices using system call tracing
KR101659705B1 (en) System and method for controlling central processing unit power with guaranteed transient deadlines
JP5628431B2 (en) Device / Application Break Event Cooperation for Platform Power Saving
KR101707096B1 (en) Generic host-based controller latency method and apparatus
CN104239153A (en) Method and device for balancing multi-core CPU load
KR20130002046A (en) Power management method for storage device including multi-core
CN110795238B (en) Load calculation method and device, storage medium and electronic equipment
CN104615415A (en) Information processing method and electronic equipment
CN111427758A (en) Task calculation amount determining method and device and electronic equipment
US10025372B2 (en) Techniques for managing system power using deferred graphics rendering
Peters et al. Phase-aware web browser power management on hmp platforms
US20140250251A1 (en) Automatically and transparently preserving testing state across sessions
CN101866212A (en) Multi-mode power source managing device and managing method
US10860083B2 (en) System, apparatus and method for collective power control of multiple intellectual property agents and a shared power rail
US20120017100A1 (en) Power System Optimization and Verification for Embedded System Design
CN113918002B (en) Frequency modulation method, frequency modulation device, storage medium and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A kind of clock frequency management method and mobile device

Effective date of registration: 20171102

Granted publication date: 20161221

Pledgee: China Co truction Bank Corp Guangzhou economic and Technological Development Zone sub branch

Pledgor: Anyka (Guangzhou) Microelectronics Technology Co., Ltd.

Registration number: 2017990001008

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20181227

Granted publication date: 20161221

Pledgee: China Co truction Bank Corp Guangzhou economic and Technological Development Zone sub branch

Pledgor: Anyka (Guangzhou) Microelectronics Technology Co., Ltd.

Registration number: 2017990001008

PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Clock frequency management method and mobile device

Effective date of registration: 20190130

Granted publication date: 20161221

Pledgee: China Co truction Bank Corp Guangzhou economic and Technological Development Zone sub branch

Pledgor: Anyka (Guangzhou) Microelectronics Technology Co., Ltd.

Registration number: 2019440000051

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20200320

Granted publication date: 20161221

Pledgee: China Co truction Bank Corp Guangzhou economic and Technological Development Zone sub branch

Pledgor: ANYKA (GUANGZHOU) MICROELECTRONICS TECHNOLOGY Co.,Ltd.

Registration number: 2019440000051

PC01 Cancellation of the registration of the contract for pledge of patent right
CP01 Change in the name or title of a patent holder

Address after: 510663 3rd floor, area C1, innovation building, 182 science Avenue, Guangzhou Science City, Luogang District, Guangzhou City, Guangdong Province

Patentee after: Guangzhou Ankai Microelectronics Co.,Ltd.

Address before: 510663 3rd floor, area C1, innovation building, 182 science Avenue, Guangzhou Science City, Luogang District, Guangzhou City, Guangdong Province

Patentee before: ANYKA (GUANGZHOU) MICROELECTRONICS TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder
CP02 Change in the address of a patent holder

Address after: 510555 No. 107 Bowen Road, Huangpu District, Guangzhou, Guangdong

Patentee after: Guangzhou Ankai Microelectronics Co., Ltd

Address before: 510663 floor 3, zone C1, innovation building, No. 182, science Avenue, Guangzhou Science City, Luogang District, Guangzhou City, Guangdong Province

Patentee before: Guangzhou Ankai Microelectronics Co., Ltd

CP02 Change in the address of a patent holder