Movatterモバイル変換


[0]ホーム

URL:


CN103543982A - Clock frequency management method and mobile device - Google Patents

Clock frequency management method and mobile device
Download PDF

Info

Publication number
CN103543982A
CN103543982ACN201210246332.9ACN201210246332ACN103543982ACN 103543982 ACN103543982 ACN 103543982ACN 201210246332 ACN201210246332 ACN 201210246332ACN 103543982 ACN103543982 ACN 103543982A
Authority
CN
China
Prior art keywords
mobile device
clock frequency
cpu
external unit
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.)
Granted
Application number
CN201210246332.9A
Other languages
Chinese (zh)
Other versions
CN103543982B (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 LtdfiledCriticalAnyka Guangzhou Microelectronics Technology Co Ltd
Priority to CN201210246332.9ApriorityCriticalpatent/CN103543982B/en
Publication of CN103543982ApublicationCriticalpatent/CN103543982A/en
Application grantedgrantedCritical
Publication of CN103543982BpublicationCriticalpatent/CN103543982B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Landscapes

Abstract

The embodiment of the invention discloses a clock frequency management method and a mobile device. The clock frequency management method is used for managing the clock frequency of the mobile device, and particularly used for adjusting the clock frequency of an external device according to the CPU occupancy rate. The clock frequency management method of the embodiment includes the steps of setting the clock frequency of a CPU of the mobile device to be an upper limit value which is the upper limit of the clock frequency of the CPU when the mobile device stably works, obtaining the CPU occupancy rate of the mobile device according to a first period, and adjusting the clock frequency of the external device of the mobile device according to the CPU occupancy rate. By means of the scheme, the fluency of task running can be guaranteed, meanwhile, power consumption of the mobile device is reduced, and therefore the cruising capacity of the mobile device is improved.

Description

A kind of clock frequency management method and mobile device
Technical field
The present invention relates to technical field of data processing, relate in particular to a kind of clock frequency management method and device.
Background technology
Mobile terminal is all the fashion at present, and most mobile terminals adopt OS (Operating System, operating system) hardware management resource and software resource.The hardware resource of mobile device comprises CPU (central processing unit) (Central Process Unit, CPU) and external unit two parts, external unit further comprises dynamic RAM (Dynamic Random Access Memory, DRAM), liquid crystal display (Liquid Crystal Display, LCD), camera (Camera) and flash memory (Flash) etc.Wherein, CPU and external unit are used each self-corresponding clock frequency, and clock frequency is higher, and task run is more smooth, simultaneously for mobile device brings larger power consumption, reduce its flying power.Therefore, the power consumption of mobile device depends on cpu clock frequency and external unit clock frequency.The flying power that needs fluency and the mobile device of balance task run in mobile device management.
The clock frequency Managed Solution using is at present: a default cpu clock frequency and an external unit clock frequency.Before a task of operation, first cpu clock frequency and external unit clock frequency are adjusted into the frequency range adapting with this task, with cpu clock frequency and external unit clock frequency after adjusting, move this task again, after this task run completes, cpu clock frequency and external unit clock frequency are reverted to preset state.
But there is certain difficulty in above-mentioned clock frequency Managed Solution in determining the frequency range process adapting with task, therefore need slip-stick artist when exploitation during by task run required clock frequency take into account, increased slip-stick artist's development difficulty.If multitask running situation, the difficulty of this deterministic process is larger.
Summary of the invention
In order to address the above problem, the embodiment of the present invention provides a kind of clock frequency management method and mobile device, for the clock frequency to mobile device, manages, and especially according to CPU usage, adjusts external unit clock frequency.By implementing the present invention program, can guarantee the fluency of task run, reduce the power consumption of mobile device simultaneously, thereby improve the flying power of mobile device.And can make slip-stick artist's required clock frequency when when exploitation need not be by task run take into account, therefore reduced development difficulty.
A management method, comprising:
The central processing unit CPU clock frequency of mobile device is set as to higher limit, cpu clock frequency upper limit when described higher limit is described mobile device steady operation;
According to the period 1, obtain the CPU usage of described mobile device;
According to described CPU usage, adjust the external unit clock frequency of described mobile device.
Preferably, before the CPU usage of the described mobile device of described calculating, further comprise: create idle task, the priority of described idle task is minimum, for trigger the CPU of described mobile device during in idle condition at described mobile device, enter Suspend Mode, under described Suspend Mode, the CPU of described mobile device task out of service; According to CPU suspension time and described period 1, calculate the CPU usage of described mobile device, the time of the CPU that described CPU suspension time is described mobile device in Suspend Mode.
Preferably, described clock frequency management method further comprises: the external unit clock frequency lower limit that the clock frequency of in running order external unit is required to be set as to described mobile device.
Preferably, the described external unit clock frequency of adjusting described mobile device according to described CPU usage further comprises: when described CPU usage is greater than first threshold, raise the external unit clock frequency of described mobile device; When described CPU usage is less than Second Threshold, according to very first time time delay, lower the external unit clock frequency of described mobile device.
, comprising:
The first setup unit, for the central processing unit CPU clock frequency of described mobile device is set as to higher limit, cpu clock frequency upper limit when described higher limit is 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 unit clock frequency of described mobile device according to described CPU usage.
Preferably, described mobile device further comprises:
Creating unit, be used for creating idle task, the priority of described idle task is minimum, for trigger the CPU of described mobile device during in idle condition at described mobile device, enters Suspend Mode, under described Suspend Mode, the CPU of described mobile device task out of service; Computing unit, for calculating the CPU usage of described mobile device, the time of the CPU that described CPU suspension time is described mobile device in Suspend Mode according to CPU suspension time and described period 1.
Preferably, described mobile device further comprises: the second setup unit, and for the clock frequency of in running order external unit being required to be set as the external unit clock frequency lower limit of described mobile device.
Preferably, described adjustment unit, further comprises: raise subelement, for when described CPU usage is greater than first threshold, raise the external unit clock frequency of described mobile device; Lower subelement, for when described CPU usage is less than Second Threshold, according to very first time time delay, lower the external unit clock frequency of described mobile device.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
By the cpu clock frequency of mobile device is set as to higher limit, can guarantee the fluency of task run, according to CPU usage, adjust the external unit clock frequency of mobile device, can accelerate the power consumption of CPU to the access speed of external unit or reduction mobile device, improve the flying power of mobile device.Thereby slip-stick artist's required clock frequency when when exploitation need not be by task run is taken into account, therefore reduced 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 unit clock frequency setting range of the present invention the first schematic diagram;
Fig. 3-b is external unit clock frequency setting range of the present invention the second schematic diagram;
Fig. 4 is the mobile device structural drawing of third embodiment of the invention;
Fig. 5 is the mobile device structural drawing of fourth embodiment of the invention.
Embodiment
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 the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the present invention provides a kind of clock frequency management method, for the clock frequency to mobile device, manages, and especially according to CPU usage, adjusts external unit clock frequency.By implementing this clock frequency management method, can guarantee the fluency of task run, reduce the power consumption of mobile device simultaneously, thereby improve the flying power of mobile device.And can make slip-stick artist's required clock frequency when when exploitation need not be by task run take into account, therefore reduced development difficulty.The embodiment of the present invention also provides relevant mobile device, will be described in detail respectively below.
First embodiment of the invention will be elaborated to a kind of clock frequency management method, and the clock frequency management method idiographic flow described in the present embodiment refers to Fig. 1, comprises step:
101, the cpu clock frequency of mobile device is set as to higher limit.
In mobile device, CPU and external unit are used each self-corresponding clock frequency, so the clock frequency of the two is separate.While only having the two clock frequency collaborative work in the reasonable scope, could improve the performance of mobile device.
In this step, the cpu clock frequency of mobile device is set as to higher limit.Described higher limit does not refer to the maximum clock frequency that CPU 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 current operating voltage of CPU, and this higher limit can have different values according to the difference of CPU real work voltage.The clock frequency upper limit that CPU can reach when the cpu clock frequency of mobile device is set as to mobile device steady operation, can be in the system-based of this mobile device, the fluency while guaranteeing to greatest extent mobile device operation task.
102, according to the period 1, obtain the CPU usage of mobile device.
The task of CPU usage reflection operation takies the situation of cpu resource.CPU usage is higher, illustrates that mobile device has moved a lot of tasks on certain time period, otherwise less.Mobile device described in the present embodiment is TCM operating system, and system is that time segment is used to CPU.For example, task one takies 10 milliseconds, and then task two takies 30 milliseconds, and then CPU is idle 60 milliseconds, and in aforesaid 100 milliseconds, CPU usage is 40%=[(10+30 so) ÷ (10+30+60)] * 100%.
In this step, according to the period 1, periodically obtain the CPU usage of mobile device.
Wherein, in above-mentioned example, the period 1 is got 100 milliseconds without concrete limit value the period 1.The value size of period 1 can impact be carried out the sensitivity of followingsteps 103, and the period 1 is less, performsstep 103 sensitivelyer, and the period 1 is larger, and it is 103 more blunt to perform step.
103, according to CPU usage, adjust the external unit clock frequency of mobile device.
In this step, the CPU usage of obtaining according tostep 102 is adjusted the external unit clock frequency of described mobile device.Preferably, be specially: when CPU usage is greater than first threshold, raise the external unit clock frequency of described mobile device; When CPU usage is less than Second Threshold, lower the external unit clock frequency of described mobile device.
The present embodiment method is not done concrete restriction to first threshold and Second Threshold, but apparent, first threshold is greater than Second Threshold.
Instep 101, the cpu clock frequency of mobile device is set as to higher limit, only has by analysis two kinds of situations to cause CPU usage very large:
Some instruction sequence is carried out in situation one, the current circulation of CPU;
Situation two, CPU be the state in access external unit for a long time.
The probability that situation one occurs is smaller, can last very long even if occur also not, so CPU usage is very greatly often owing to having occurred situation two.When the situation two of appearance, raise the external unit clock frequency of mobile device and enough can accelerate the access speed of CPU to external unit, thereby shorten the time that CPU accesses external unit.
When CPU usage is very little, illustrate that CPU need not or seldom access external unit, now lower the external unit clock frequency of mobile device, thereby reduce mobile device power consumption.
In the present embodiment, by the cpu clock frequency of mobile device is set as to higher limit, can guarantee the fluency of task run, according to CPU usage, adjust the external unit clock frequency of mobile device, can accelerate the power consumption of CPU to the access speed of external unit or reduction mobile device, improve the flying power of mobile device.Thereby slip-stick artist's required clock frequency when when exploitation need not be by task run is taken into account, therefore reduced development difficulty.
Second embodiment of the invention remarks additionally the clock frequency management method to described in the first embodiment, and the clock frequency management method idiographic flow described in the present embodiment refers to Fig. 2, comprises step:
201, the clock frequency of in running order external unit is required to be set as the external unit clock frequency lower limit of mobile device.
Mobile device comprises at least one external unit, as DRAM, LCD, Camera and Flash etc.If some external units have specific requirement to outside equipment clock frequency in mobile device, this external unit is when in running order so, can send clock frequency requirement to mobile device, the clock frequency that this external unit requires is exactly the lower limit that the external unit clock frequency of mobile device can be lowered.Therefore can guarantee that mobile device works under suitable external unit clock frequency, guarantee the fluency of task run.
Wherein, above-mentioned clock frequency requires can be included in the driver of this external unit.
In addition, when having plural external unit to propose each self-corresponding clock frequency requirement, getting desired maximum clock frequency is the external unit clock frequency lower limit of mobile device.With an example, describe below.
When the external unit of mobile device does not have particular requirement to outside equipment clock frequency, external unit clock frequency adjustable range is as shown in Fig. 3-a.In this case, according to CPU usage situation, external unit clock frequency can be at fminto fmaxbetween dynamically adjust.When there is particular requirement to outside equipment clock frequency in the external unit of mobile device, suppose to exist two such external unit A and B, the clock frequency of external unit A requires as fa, the clock frequency of external unit B requires as fb, and fa< fb, refer to Fig. 3-b, in this case, according to CPU usage situation, external unit clock frequency is only with at fbto fmaxbetween dynamically adjust.In like manner, if do not register the clock frequency requirement of external unit B, so, external unit clock frequency is only with at fato fmaxbetween dynamically adjust.
In this step, the clock frequency of in running order external unit is required to be set as the external unit clock frequency lower limit of described mobile device.
Preferably, the clock frequency of external unit requires and does not require necessarily when mobile device starts just to propose, sostep 201 can also carry out before or after follow-up arbitrary step, and does not limit execution number of times, repeats no more here.
202, create idle task.
In this step, after mobile device starts, create immediately idle task, the priority of described idle task is minimum, therefore only has CPU usage to drop to approach 0 o'clock this idle task just can be moved.At described mobile device during in idle condition, CPU usage drops to and approaches 0, moves the idle task that described priority is minimum, and the practical function of this idle task is that the CPU that triggers mobile device enters Suspend Mode.Under Suspend Mode, even if CPU works in higher clock frequency, its power consumption is also little.
Wherein, a kind of energy-saving mode that Suspend Mode is CPU, under Suspend Mode, the CPU of described mobile device task out of service.CPU Suspend Mode is that a kind of economize on electricity of cpu power management is tactful, the CPU of different models, the difference that is for the description of Suspend Mode, for example:
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, CPU stops carrying out instruction, and allows the state of CPU in a kind of low-power consumption.Even if different CPU is different to the control method of this function, describe also different, but do not affect the enforcement of the present embodiment method.
203, according to the CPU usage of CPU suspension time and period 1 calculating mobile device.
In this step, trigger CPU enter after Suspend Mode in idle task, described idle task can also be calculated according to CPU suspension time and described period 1 the CPU usage of described mobile device.
Wherein, the time of the CPU that described CPU suspension time is described mobile device in Suspend Mode.Suppose that the period 1 is T, suspension time is t, and CPU usage is RcPU.In this step, calculate CPU usage RcPUcalculating formula be:
RCPU=[(T-t)÷T]×100%。
The task of CPU usage reflection operation takies the situation of cpu resource.CPU usage is higher, illustrates that mobile device has moved a lot of tasks on certain time period, otherwise less.For example, task one takies 10 milliseconds, and then task two takies 30 milliseconds, and task one and task two free of discontinuities operations, then CPU is idle 60 milliseconds, and suspension time t is 60 milliseconds, if aforesaid 100 milliseconds is period 1 T, 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 the operation of CPU usage and carried out by idle task, if in a period 1 T without carrying out idle task, idle task can not calculated CPU usage, can get CPU usage is 100%.
204, the cpu clock frequency of mobile device is set as to higher limit.
In mobile device, CPU and external unit are used each self-corresponding clock frequency, so the clock frequency of the two is separate.While only having the two clock frequency collaborative work in the reasonable scope, could improve the performance of mobile device.
In this step, the cpu clock frequency of mobile device is set as to higher limit.Described higher limit does not refer to the maximum clock frequency that CPU 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 current operating voltage of CPU, and this higher limit can have different values according to the difference of CPU real work voltage.The clock frequency upper limit that CPU can reach when the cpu clock frequency of mobile device is set as to mobile device steady operation, can be in the system-based of this mobile device, the fluency while guaranteeing to greatest extent mobile device operation task.
205, according to the period 1, obtain the CPU usage of mobile device.
In this step, according to the period 1, periodically obtain the CPU usage of mobile device.
Wherein, in above-mentioned example, the period 1 is got 100 milliseconds without concrete limit value the period 1.The value size of period 1 can impact be carried out the sensitivity of followingsteps 206, and the period 1 is less, performsstep 206 sensitivelyer, and the period 1 is larger, and it is 206 more blunt to perform step.
Preferably, above-mentioned periodicity is obtained the period 1 of operation institute foundation and can be realized by timer is set, and repeats no more here.
206, according to CPU usage, adjust the external unit clock frequency of mobile device.
The present embodiment inventive method is pursued the balance of mobile device fluency and flying power, but with fluency, is preferably principle simultaneously.
In this step, the CPU usage of obtaining according to step 205 is adjusted the external unit clock frequency of describedmobile device.Step 206 specifically comprisesstep 2061 andstep 2062 liang sub-steps.Order is not relevant withstep 2062 forstep 2061, therefore can freely convert order, repeats no more here.
Step 2061 andstep 2062 are specially:
2061,, when CPU usage is greater than first threshold, raise the external unit clock frequency of mobile device.
Instep 204, the cpu clock frequency of mobile device is set as to higher limit, only has by analysis two kinds of situations to cause CPU usage very large:
Some instruction sequence is carried out in situation one, the current circulation of CPU;
Situation two, CPU be the state in access external unit for a long time.
The probability that situation one occurs is smaller, can last very long even if occur also not, so CPU usage is very greatly often owing to having occurred situation two.When the situation two of appearance, raise the external unit clock frequency of mobile device and enough can accelerate the access speed of CPU to external unit, thereby shorten the time that CPU accesses external unit.
Wherein, the concrete mode of rise can be to increase a range value, as raised 100MHz, can be also to raise in proportion, is as above adjusted to original twice, can also be other rise mode, does not do concrete restriction here.
Preferably, raise the operation meeting of external unit clock frequency and carry out immediately, to guarantee the fluency of task run.Under fluency priority principle, the external unit clock frequency after rise may exceed the external unit clock frequency of actual needs, now can lower gradually external unit clock frequency according to actual conditions again, finely tunes.
2062,, when CPU usage is less than Second Threshold, according to very first time time delay, lower the external unit clock frequency of mobile device.
When CPU usage is very little, illustrate that CPU need not or seldom access external unit, now according to very first time time delay, lower the external unit clock frequency of mobile device, thereby reduce mobile device power consumption.
Wherein, the very first time is not done to concrete restriction.The concrete mode of lowering can be to reduce by a range value, as lowered 100MHz, can be also to lower in proportion, is adjusted to as follows originally 70%, can also be other downward mode, does not do concrete restriction here.
Preferably, lower the operation meeting time delay of external unit clock frequency and carry out, to avoid frequently adjusting the fluency of external unit clock frequency impact operation.Under fluency priority principle, the external unit clock frequency after downward may exceed the external unit clock frequency of actual needs, now can lower gradually external unit clock frequency according to actual conditions again, finely tunes.
The present embodiment method is not done concrete restriction to first threshold and Second Threshold, but apparent, first threshold is greater than Second Threshold.
In the present embodiment, by the cpu clock frequency of mobile device is set as to higher limit, can guarantee the fluency of task run, under fluency priority principle, according to CPU usage, adjust the external unit clock frequency of mobile device, can accelerate the power consumption of CPU to the access speed of external unit or reduction mobile device, improve the flying power of mobile device.Thereby slip-stick artist's required clock frequency when when exploitation need not be by task run is taken into account, therefore reduced development difficulty.
Third embodiment of the invention will be elaborated to a kind of mobile device, in the mobile device described in the present embodiment, comprise one or more unit for realizing one or more steps of preceding method.Therefore, the description of each step in preceding method is applicable to corresponding unit in described mobile device.Mobile device concrete structure described in the present embodiment refers to Fig. 4, comprising:
Thefirst setup unit 401, for being set as higher limit by the cpu clock frequency of described mobile device.
In mobile device, CPU and external unit are used each self-corresponding clock frequency, so the clock frequency of the two is separate.While only having the two clock frequency collaborative work in the reasonable scope, could improve the performance of mobile device.
Thefirst setup unit 401 can be set as higher limit by the cpu clock frequency of mobile device.Described higher limit does not refer to the maximum clock frequency that CPU 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 current operating voltage of CPU, and this higher limit can have different values according to the difference of CPU real work voltage.The clock frequency upper limit that while the cpu clock frequency of mobile device being set as to mobile device steady operation by thefirst setup unit 401, CPU can reach, can be in the system-based of this mobile device, the fluency while guaranteeing to greatest extent mobile device operation task.
Acquiringunit 402, for obtaining the CPU usage of described mobile device according to the period 1.
The task of CPU usage reflection operation takies the situation of cpu resource.CPU usage is higher, illustrates that mobile device has moved a lot of tasks on certain time period, otherwise less.Mobile device described in the present embodiment is TCM operating system, and system is that time segment is used to CPU.For example, task one takies 10 milliseconds, and then task two takies 30 milliseconds, and then CPU is idle 60 milliseconds, and in aforesaid 100 milliseconds, CPU usage is 40%=[(10+30 so) ÷ (10+30+60)] * 100%.
Acquiringunit 402 can periodically obtain according to the period 1 CPU usage of mobile device.
Wherein, in above-mentioned example, the period 1 is got 100 milliseconds without concrete limit value the period 1.The value size of period 1 can affect the sensitivity ofadjustment unit 403, and the period 1 is less, andadjustment unit 403 is sensitiveer, and the period 1 is larger, andadjustment unit 403 is more blunt.
Adjustment unit 403, with acquiringunit 402 communication connections, for adjust the external unit clock frequency of described mobile device according to described CPU usage.
The CPU usage thatadjustment unit 403 can obtain according to acquiringunit 402 is adjusted the external unit clock frequency of described mobile device.Preferably, be specially: when CPU usage is greater than first threshold, raise the external unit clock frequency of described mobile device; When CPU usage is less than Second Threshold, lower the external unit clock frequency of described mobile device.The present embodiment is not done concrete restriction to first threshold and Second Threshold, but apparent, first threshold is greater than Second Threshold.
Thefirst setup unit 401 is set as higher limit by the cpu clock frequency of mobile device, only has by analysis two kinds of situations to cause CPU usage very large:
Some instruction sequence is carried out in situation one, the current circulation of CPU;
Situation two, CPU be the state in access external unit for a long time.
The probability that situation one occurs is smaller, can last very long even if occur also not, so CPU usage is very greatly often owing to having occurred situation two.When the situation two of appearance, the external unit clock frequency thatadjustment unit 403 raises mobile device enough can be accelerated the access speed of CPU to external unit, thereby shortens the time of CPU access external unit.
When CPU usage is very little, illustrate that CPU need not or seldom access external unit, nowadjustment unit 403 is lowered the external unit clock frequency of mobile device, thereby reduces mobile device power consumption.
In the present embodiment, by thefirst setup unit 401, the cpu clock frequency of mobile device is set as to higher limit, can guarantee the fluency of task run,adjustment unit 403 is adjusted the external unit clock frequency of mobile device according to CPU usage, can accelerate the power consumption of CPU to the access speed of external unit or reduction mobile device, improve the flying power of mobile device.Thereby slip-stick artist's required clock frequency when when exploitation need not be by task run is taken into account, therefore reduced development difficulty.
Fourth embodiment of the invention remarks additionally the mobile device to described in the 3rd embodiment, in the mobile device described in the present embodiment, comprises one or more unit for realizing one or more steps of preceding method.Therefore, the description of each step in preceding method is applicable to corresponding unit in described mobile device.Mobile device concrete structure described in the present embodiment refers to Fig. 5, comprising:
Thesecond setup unit 501, for requiring the clock frequency of in running order external unit to be set as the external unit clock frequency lower limit of described mobile device.
If some external units have specific requirement to outside equipment clock frequency in mobile device, this external unit is when in running order so, can send clock frequency requirement to thesecond setup unit 501 of mobile device, the clock frequency that this external unit requires is exactly the lower limit that the external unit clock frequency of mobile device can be lowered.Therefore can guarantee that mobile device works under suitable external unit clock frequency, guarantee the fluency of task run.
Wherein, above-mentioned clock frequency requires can be included in the driver of this external unit.
In addition, when having plural external unit to propose each self-corresponding clock frequency requirement, thesecond setup unit 501 is got the external unit clock frequency lower limit that desired maximum clock frequency is mobile device.
Instantiation refers to the relevant record ofstep 201 in the second embodiment, repeats no more here.
Thesecond setup unit 501 can require the clock frequency of in running order external unit to be set as the external unit clock frequency lower limit of described mobile device.
Creatingunit 502, for creating idle task.
Creatingunit 502 can create immediately idle task after mobile device starts, and the priority of described idle task is minimum, therefore only has CPU usage to drop to approach 0 o'clock this idle task just can be moved.At described mobile device during in idle condition, CPU usage drops to and approaches 0, CPU and move the idle task that described priority is minimum, and the practical function of this idle task is that the CPU that triggers mobile device enters Suspend Mode.Under Suspend Mode, even if CPU works in higher clock frequency, its power consumption is also little.
Wherein, a kind of energy-saving mode that Suspend Mode is CPU, under Suspend Mode, the CPU of described mobile device task out of service.
Computing unit 503, with creatingunit 502 communication connection, for calculate the CPU usage of described mobile device according to CPU suspension time and described period 1.
In idle task, trigger CPU and enter after Suspend Mode,computing unit 503 can calculate according to CPU suspension time and described period 1 the CPU usage of described mobile device.
Wherein, the time of the CPU that described CPU suspension time is described mobile device in Suspend Mode.The example that calculates CPU usage refers to the relevant record of thesecond embodiment step 203, repeats no more here.
Computing unit 503 can periodically calculate CPU usage by the described period 1.
Preferably, if if CPU does not carry out idle task in a period 1 T, computingunit 503 can not calculate CPU usage, and can get CPU usage is 100%.
Thefirst setup unit 504, for being set as higher limit by the central processing unit CPU clock frequency of described mobile device.
In mobile device, CPU and external unit are used each self-corresponding clock frequency, so the clock frequency of the two is separate.While only having the two clock frequency collaborative work in the reasonable scope, could improve the performance of mobile device.
Thefirst setup unit 504 can be set as higher limit by the cpu clock frequency of mobile device.Described higher limit does not refer to the maximum clock frequency that CPU 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 current operating voltage of CPU, and this higher limit can have different values according to the difference of CPU real work voltage.The clock frequency upper limit that CPU can reach when the cpu clock frequency of mobile device is set as to mobile device steady operation, can be in the system-based of this mobile device, the fluency while guaranteeing to greatest extent mobile device operation task.
Acquiringunit 505, for obtaining the CPU usage of described mobile device according to the period 1.
Acquiringunit 505 can periodically obtain according to the period 1 CPU usage of mobile device.
Wherein, the period 1 is without concrete limit value.The value size of period 1 can affect the sensitivity ofadjustment unit 506, and the period 1 is less, andadjustment unit 506 is sensitiveer, and the period 1 is larger, andadjustment unit 506 is more blunt.
Preferably, above-mentioned periodicity is obtained the period 1 of operation institute foundation and can be realized by timer is set, and repeats no more here.
Adjustment unit 506, with acquiringunit 505 communication connections, for adjust the external unit clock frequency of described mobile device according to described CPU usage.
Mobile device described in the present embodiment is pursued the balance of fluency and flying power, but with fluency, is preferably principle simultaneously.
The CPU usage thatadjustment unit 506 can obtain according to acquiringunit 505 is adjusted the external unit clock frequency of described mobiledevice.Adjustment unit 506 specifically also comprisesrise subelement 5061 and lowerssubelement 5062, the two communication connection.
Raise subelement 5061, for when described CPU usage is greater than first threshold, raise the external unit clock frequency of described mobile device.
Thefirst setup unit 504 is set as higher limit by the cpu clock frequency of mobile device, only has by analysis two kinds of situations to cause CPU usage very large:
Some instruction sequence is carried out in situation one, the current circulation of CPU;
Situation two, CPU be the state in access external unit for a long time.
The probability that situation one occurs is smaller, can last very long even if occur also not, so CPU usage is very greatly often owing to having occurred situation two.When the situation two of appearance, raise the external unit clock frequency ofsubelement 5061 rise mobile devices and enough can accelerate the access speed of CPU to external unit, thereby shorten the time of CPU access external unit.
Wherein, the concrete mode of rise can be to increase a range value, as raised 100MHz, can be also to raise in proportion, is as above adjusted to original twice, can also be other rise mode, does not do concrete restriction here.
Preferably, raise the operation meeting ofsubelement 5061 and carry out immediately, to guarantee the fluency of task run.Under fluency priority principle, the external unit clock frequency after rise may exceed the external unit clock frequency of actual needs, now lowers subelement 5062 and can lower gradually external unit clock frequency according to actual conditions again, finely tunes.In like manner, fine setting can also be carried out by raisingsubelement 5061.
Lower subelement 5062, for when described CPU usage is less than Second Threshold, according to very first time time delay, lower the external unit clock frequency of described mobile device.
When CPU usage is very little, illustrate that CPU need not or seldom access external unit, nowlower subelement 5062 and according to very first time time delay, lower the external unit clock frequency of mobile device, thereby reduce mobile device power consumption.
Wherein, the very first time is not done to concrete restriction.The concrete mode of lowering can be to reduce by a range value, as lowered 100MHz, can be also to lower in proportion, is adjusted to as follows originally 70%, can also be other downward mode, does not do concrete restriction here.
Preferably, lower the operation meeting time delay ofsubelement 5062 and carry out, to avoid frequently adjusting the fluency of external unit clock frequency impact operation.Under fluency priority principle, the external unit clock frequency after downward may exceed the external unit clock frequency of actual needs, now lowers subelement 5062 and can lower gradually external unit clock frequency according to actual conditions again, finely tunes.In like manner, fine setting can also be carried out by raisingsubelement 5061.
The present embodiment is not done concrete restriction to first threshold and Second Threshold, but apparent, first threshold is greater than Second Threshold.
Be below one this implement the concrete application scenarios of described mobile device:
Described mobile device is a MP4 digital code player, in the middle of have two application, an application is e-book, Another application is MP3 player.MP4 digital code player is opened after e-book, only in page turning, just needs CPU move a bit of code and carry out low volume data processing, and within the most of the time, CPU just can enter Suspend Mode.Now CPU usage approaches 0, so external unit clock frequency also can be very low.If application the present invention, power consumption can drop to 4 to 5 milliamperes, decreases by more than 70%.
During MP3 player plays MP3, relate to reading and decoding of mp3 file, and the data volume of processing is relevant with compressibility with the sampling rate of MP3, when sampling rate is larger or compressibility is higher, CPU usage will improve, now MP4 digital code player raises external unit clock frequency, will accelerate the access speed of CPU to external unit.If application the present invention, can allow power consumption decline 4 to 10 milliamperes, power consumption declines very obvious.
In the present embodiment, by thefirst setup unit 504, the cpu clock frequency of mobile device is set as to higher limit, can guarantee the fluency of task run, under fluency priority principle,adjustment unit 506 is adjusted the external unit clock frequency of mobile device according to CPU usage, can accelerate the power consumption of CPU to the access speed of external unit or reduction mobile device, improve the flying power of mobile device.Thereby slip-stick artist's required clock frequency when when exploitation need not be by task run is taken into account, therefore reduced development difficulty.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method is to come the hardware that instruction is relevant to complete by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (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, thought according to the embodiment of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (8)

CN201210246332.9A2012-07-162012-07-16A kind of clock frequency management method and mobile deviceActiveCN103543982B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201210246332.9ACN103543982B (en)2012-07-162012-07-16A kind of clock frequency management method and mobile device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201210246332.9ACN103543982B (en)2012-07-162012-07-16A kind of clock frequency management method and mobile device

Publications (2)

Publication NumberPublication Date
CN103543982Atrue CN103543982A (en)2014-01-29
CN103543982B CN103543982B (en)2016-12-21

Family

ID=49967471

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201210246332.9AActiveCN103543982B (en)2012-07-162012-07-16A kind of clock frequency management method and mobile device

Country Status (1)

CountryLink
CN (1)CN103543982B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105005504A (en)*2015-07-302015-10-28深圳创维-Rgb电子有限公司Single-task mode implementation method and system of Android platform
CN105487597A (en)*2014-10-092016-04-13深圳市中兴微电子技术有限公司Clock management method and device of central processing unit
CN106371985A (en)*2015-07-242017-02-01联想(北京)有限公司Information processing method and electronic equipment
CN106897203A (en)*2017-03-292017-06-27北京经纬恒润科技有限公司A kind of cpu load rate computational methods and device
CN107660278A (en)*2015-06-192018-02-02英特尔公司To the technology of the computing resource of control electronics

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101498952A (en)*2009-03-022009-08-05北京红旗胜利科技发展有限责任公司CPU, SoC chip and method for synchronizing clock
CN101576768A (en)*2009-06-152009-11-11北京中星微电子有限公司Method and device for switching device frequency
CN101739359A (en)*2009-12-172010-06-16深圳华为通信技术有限公司Storage device, access method for mobile terminal and data, and frequency modulation method
US20120017104A1 (en)*2009-03-052012-01-19Hitachi, Ltd.Computer and power management system for computer

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101498952A (en)*2009-03-022009-08-05北京红旗胜利科技发展有限责任公司CPU, SoC chip and method for synchronizing clock
US20120017104A1 (en)*2009-03-052012-01-19Hitachi, Ltd.Computer and power management system for computer
CN101576768A (en)*2009-06-152009-11-11北京中星微电子有限公司Method and device for switching device frequency
CN101739359A (en)*2009-12-172010-06-16深圳华为通信技术有限公司Storage device, access method for mobile terminal and data, and frequency modulation method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105487597A (en)*2014-10-092016-04-13深圳市中兴微电子技术有限公司Clock management method and device of central processing unit
CN107660278A (en)*2015-06-192018-02-02英特尔公司To the technology of the computing resource of control electronics
CN106371985A (en)*2015-07-242017-02-01联想(北京)有限公司Information processing method and electronic equipment
CN106371985B (en)*2015-07-242019-05-31联想(北京)有限公司Information processing method and electronic equipment
CN105005504A (en)*2015-07-302015-10-28深圳创维-Rgb电子有限公司Single-task mode implementation method and system of Android platform
CN105005504B (en)*2015-07-302019-01-29深圳创维-Rgb电子有限公司A kind of the single task mode implementation method and system of Android platform
CN106897203A (en)*2017-03-292017-06-27北京经纬恒润科技有限公司A kind of cpu load rate computational methods and device

Also Published As

Publication numberPublication date
CN103543982B (en)2016-12-21

Similar Documents

PublicationPublication DateTitle
US10444819B2 (en)Techniques to control computational resources for an electronic device
KR102222752B1 (en)Method of dynamic voltage frequency scaling of processor
KR101516859B1 (en)System and method for controlling central processing unit power with guaranteed steady state deadlines
EP2527954A1 (en)Postponing suspend
US10234932B2 (en)Method and apparatus for a multiple-processor system
US20170068308A1 (en)Systems and methods for dynamically adjusting memory state transition timers
CN103376874B (en)A kind of multi-nuclear processor equipment and its method realizing clock control
WO2013002864A1 (en)Method and system for determining an energy-efficient operating point of a platform
CN103543982A (en)Clock frequency management method and mobile device
US20140089948A1 (en)Method and device for an intelligent control of portable electronic devices
CN105893141A (en)Regulation control method and apparatus for multi-core processor and mobile terminal using method
US20150006931A1 (en)Generic host-based controller latency method and appartus
WO2017101362A1 (en)Method and system for managing and controlling power consumption of intelligent terminal
US8912830B2 (en)Method and apparatus for atomic frequency and voltage changes
CN204302727U (en)A kind of real-time control system based on ARM and FPGA
CN106155931A (en)The method and apparatus of speed limit read by a kind of disk
US9501299B2 (en)Minimizing performance loss on workloads that exhibit frequent core wake-up activity
US9348407B2 (en)Method and apparatus for atomic frequency and voltage changes
CN111338777B (en)Low-delay high-stability autonomous platform interrupt response method and equipment
US20140250251A1 (en)Automatically and transparently preserving testing state across sessions
CN103051793A (en)Method and device for controlling data transmission mode of mobile terminal
CN106095055A (en) Method and device for closing an application program
CN109669528B (en)Terminal processing component control method and device, computer equipment and storage medium
CN105589544A (en)Method, device and terminal reducing central processor energy consumption
US20120185713A1 (en)Server, storage medium, and method for controlling sleep and wakeup function of the server

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
C14Grant of patent or utility model
GR01Patent grant
PE01Entry into force of the registration of the contract for pledge of patent right
PE01Entry 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

PC01Cancellation 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

PC01Cancellation of the registration of the contract for pledge of patent right
PE01Entry into force of the registration of the contract for pledge of patent right
PE01Entry 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

PC01Cancellation of the registration of the contract for pledge of patent right
PC01Cancellation 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

CP01Change in the name or title of a patent holder
CP01Change 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.

CP02Change in the address of a patent holder
CP02Change 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


[8]ページ先頭

©2009-2025 Movatter.jp