CN102226894A - Mobile device memory management method and device - Google Patents
Mobile device memory management method and device Download PDFInfo
- Publication number
- CN102226894A CN102226894A CN2011101351497A CN201110135149A CN102226894A CN 102226894 A CN102226894 A CN 102226894A CN 2011101351497 A CN2011101351497 A CN 2011101351497A CN 201110135149 A CN201110135149 A CN 201110135149A CN 102226894 A CN102226894 A CN 102226894A
- Authority
- CN
- China
- Prior art keywords
- application program
- exchanged
- application
- internal memory
- exchange
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0634—Configuration or reconfiguration of storage systems by changing the state or mode of one or more devices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/60—Subscription-based services using application servers or record carriers, e.g. SIM application toolkits
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Software Systems (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a mobile device memory management method and device, wherein the method comprises the following steps of: searching at least one application program, which is independent from an appointed application program and is accordant to a predefined algorithm, as the application program to be exchanged; and performing memory exchange according to the application program to be exchanged. The method and the device provided by the invention search the application program to be exchanged according to the predefined algorithm while the dependence between the application programs is considered, so that ineffective memory exchange is eliminated and user experience of using the mobile device is improved.
Description
Technical field
The present invention relates to memory management, relate in particular to a kind of mobile device internal storage management system and method.
Background technology
Along with the 3G and the arriving in intelligent machine epoch, the application program on the mobile devices such as mobile phone is more and more, and mobile devices such as this class mobile phone adopt the multi-task operation system, can move a plurality of tasks simultaneously.In order to improve the user experience of multitask, mobile devices such as mobile phone have been equipped with the high capacity internal memory.But the increase of memory size is subjected to the restriction of cost, power consumption, volume etc.Therefore, how under the multitask situation, to reduce the internal memory use amount and become problem demanding prompt solution.
The internal memory exchange is widely used a kind of method that is used for reducing the internal memory use amount on PC and server.Its ultimate principle is: when Installed System Memory is not enough, some content exchange in the internal memory in external memory, thereby vacate memory headroom; When system runs to the content that need be switched to external memory, just exchange to the content that exchanges in the external memory in the internal memory once more; If low memory takes place in this process, will relate to another time exchange process.Like this, the valid memory space size of system is exactly that the actual memory size adds the space sum that can be used for depositing exchanging contents on the external memory.By interior external memory exchange, can realize that the internal memory with less reaches the effect of bigger internal memory.At present, internal memory switching method on PC and the server is that a basic function (the being virtual storage management) module as operating system realizes in the kernel of operating system basically, it uses LRU (Lease Recently Use, least recently used) algorithm, the obsolete preferential exchange of nearest maximum duration is gone out, and be that least unit exchanges with the page.Page is the base unit of operating system management internal memory, and a page size of 32 (SuSE) Linux OS is generally 4KB.
Yet there is following problem in the internal memory exchanged form of using on PC and the server:
1) when the nearest obsolete page of maximum duration is exchanged away, the current application program that will move might take place will use the page of just having been gone out by exchange, so the content in this part page of being gone out by exchange will exchange to internal memory again at once;
2) in order to improve memory usage, operating system can be selected the least possible exchange memory page or leaf at every turn, so the situation of low memory may can take place again in the current application program that will move in normal course of operation, so system can carry out the internal memory exchange again, so that application program can normally be moved down.
These two problems cause the exchange of invalid internal memory and internal memory exchange too frequent, and, carrying out internal memory when exchanging, system can not carry out any other operation.Therefore, the exchange of too much and frequent internal memory will make the application program operation slack-off, move not smoothly, often occurs very brief pause in the operational process, and this is the reduction user experience greatly.PC and server are because cpu performance is powerful, this operation is slack-off relative slight with the not smooth influence to user experience of operation, and the cpu performance of mobile devices such as mobile phone relatively a little less than, move slack-off and the not smooth influence to user experience of operation will be clearly, thereby cause user experience to become very poor.Just because of this reason, on mobile devices such as mobile phone, all do not use internal memory to exchange and reduce the internal memory use amount.
Summary of the invention
The main technical problem to be solved in the present invention is, the method and the device of memory management in a kind of mobile device is provided, and when reducing the internal memory use amount by the internal memory exchange, accomplishes not influence user experience as far as possible.
According to one embodiment of the present invention, a kind of mobile device EMS memory management process is provided, comprising: search at least one application program of not having dependence with specified application and meeting pre-defined algorithm as application program to be exchanged; Carrying out the internal memory exchange according to application program described to be exchanged handles.
Further, described at least one application program not having dependence with specified application and meet pre-defined algorithm of searching comprises as this step of application program to be exchanged: search the application program that meets pre-defined algorithm from the application program of just moving; From the application program that meets pre-defined algorithm that finds, search the application program of not having dependence with specified application, with it as application program to be exchanged.
Among a kind of embodiment, carry out this step of internal memory exchange processing according to application program described to be exchanged and comprise: choose an application program described to be exchanged, the page under the pairing process of this application program of choosing is exchanged in the external memory; Judge that whether the current free memory amount sum of amount of ram that this application program is shared and system is more than or equal to first predetermined threshold value; If not, then continue to carry out to choose this step of application program described to be exchanged.
Among the another kind of embodiment, carry out this step of internal memory exchange processing according to application program to be exchanged and comprise: choose an application program described to be exchanged, this application program of choosing of mark; Judge that whether the current free memory amount sum of amount of ram that the application program of this mark is shared and system is more than or equal to first predetermined threshold value; If not, then continue to carry out to choose this step of application program described to be exchanged; If, then with the page under underlined each self-corresponding process of application program exchange in the external memory.
Among another embodiment, carry out this step of internal memory exchange processing according to application program to be exchanged and comprise: the page under the pairing process of application program described to be exchanged is exchanged in the external memory.
Preferably, described at least one application program of not having dependence with specified application and meeting pre-defined algorithm of searching is as also comprising before this step of application program to be exchanged: judge that whether the current free memory amount of system is more than or equal to second predetermined threshold value; If less than described second predetermined threshold value, then carry out the described application program not having dependence with specified application and meet pre-defined algorithm of searching as application program step to be exchanged; Otherwise do not deal with.
Preferably, the described application program that meets pre-defined algorithm comprises the application program of least recently used CPU.
Preferably, handling this step according to application program execution internal memory exchange of management to be exchanged also comprises afterwards: carry out the described specified application of normal application program launching flow startup; When described specified application was the current new application program that waits for startup of system, the application program that described basis is to be exchanged was carried out the internal memory exchange of management and is also comprised after handling this step: carry out the described new application program of normal application program launching flow startup.
According to another embodiment of the invention, a kind of mobile device memory management device is provided, comprise: application management and control module are used to search at least one application program of not having dependence with specified application and meeting pre-defined algorithm as application program to be exchanged; The internal memory Switching Module is used for the indication according to described application management and control module, and the page under the pairing process of application program described to be exchanged is exchanged in the external memory.
Further, the described application program that meets pre-defined algorithm comprises the application program of least recently used CPU.
Beneficial effect of the present invention is: the time both considered to search application program to be exchanged by pre-defined algorithm carrying out the internal memory exchange, consider the dependence between application program again, thereby eliminated invalid internal memory exchange, and improved the experience sense that the user uses equipment.Also consider the relation of the current maximum memory use amount of page quantity and system that once exchanges away among a kind of embodiment, thereby solved the too frequent problem of internal memory exchange, reduced the internal memory exchange frequency; Consider among another embodiment before start-up routine, to finish the internal memory exchange, guarantee in the application program operational process, not have the internal memory exchange, thereby eliminate the influence of internal memory exchange application programs operational process.
Description of drawings
Fig. 1 is the structural representation of the mobile device memory management device that provides of the embodiment of the invention;
Fig. 2 is the schematic flow sheet of the embodiment of the invention one mobile device EMS memory management process;
Fig. 3 is the schematic flow sheet of the embodiment of the invention two mobile device EMS memory management process;
Fig. 4 is the schematic flow sheet of the embodiment of the invention three mobile device EMS memory management process;
Fig. 5 is the schematic flow sheet of the embodiment of the invention four mobile device EMS memory management process;
Fig. 6 is the schematic flow sheet of the embodiment of the invention five mobile device EMS memory management process;
Fig. 7 is the schematic flow sheet of the embodiment of the invention six mobile device EMS memory management process;
Fig. 8 is the structural representation that an embodiment of the present invention is applied to the memory management device in the Android mobile phone;
Fig. 9 be with the corresponding Android mobile phone of Fig. 8 in the schematic flow sheet of EMS memory management process.
Embodiment
In conjunction with the accompanying drawings the present invention is described in further detail below by embodiment.
The design philosophy of the embodiment of the invention is: during the page 1) selecting to exchange away, both considered to use pre-defined algorithm to select application program, consider also whether the current application program that will move may be used, have only the selected exchange of page ability of satisfying these two conditions simultaneously to go out; 2) the page quantity that once exchanges away will satisfy the possible maximum memory use amount of the current application program that will move; 3) the internal memory exchange was finished before starting the current application program that will move.Wherein, thought point 1) eliminated invalid internal memory exchange, thought point 2) reduced the internal memory exchange frequency to having only thought point 31 time) guarantee in the application program operational process, not have internal memory to exchange, thus the elimination internal memory exchanges bothering of application programs operational process.Among a kind of embodiment these 3 are combined, just can use internal memory to exchange and reduce the internal memory use amount, can not reduce the speed and the fluency of application program operation again, eliminated the shortcoming of convential memory switching technology on mobile device such as mobile phone.
As shown in Figure 1, the memory management device comprises in the mobile device that provides of an embodiment of the present invention: application management and control module and internal memory Switching Module.Wherein, application management and control module are used to search at least one application program of not having dependence with specified application and meeting pre-defined algorithm as application program to be exchanged; Described internal memory Switching Module is used for the indication according to described application management and control module, and the page under the pairing process of application program described to be exchanged is exchanged in the external memory.Among a kind of embodiment, internal memory is RAM, and external memory is FLASH.
Embodiment of the present invention provides based on above-mentioned memory management device's memory management method, comprising: search at least one application program of not having dependence with specified application and meeting pre-defined algorithm as application program to be exchanged; Carrying out the internal memory exchange according to application program described to be exchanged handles.
Among a kind of embodiment, pre-defined algorithm adopts the algorithm of similar least recently used page replacement algorithm (LRU), be that least recently used CPU algorithm (is described for convenient, hereinafter the algorithm with least recently used CPU is also referred to as lru algorithm), that is to say, in this embodiment, the application program that meets pre-defined algorithm is the application program of least recently used CPU; Can also use other algorithms among other embodiment, the invention is not restricted to this algorithm of LRU.
Among a kind of embodiment, described at least one application program not having dependence with specified application and meet pre-defined algorithm of searching comprises as this step of application program to be exchanged: search the application program that meets pre-defined algorithm from the application program of just moving; From the application program that meets pre-defined algorithm that finds, search the application program of not having dependence with specified application, with it as application program to be exchanged.For this step, a kind of exemplary way is: search an application program that meets pre-defined algorithm; Judge between application program that this finds and the specified application and whether have dependence; If there is dependence, then search the application program that the next one meets pre-defined algorithm again.
Handle this step for carry out the internal memory exchange according to application program described to be exchanged:
Among a kind of embodiment, this step comprises: the page under the pairing process of application program described to be exchanged is exchanged in the external memory.
This step comprises among the another kind of embodiment: choose an application program described to be exchanged, the page under the pairing process of this application program of choosing is exchanged in the external memory; Judge that whether the current free memory amount sum of amount of ram that this application program is shared and system is more than or equal to first predetermined threshold value; If not, then continue to carry out to choose this step of application program described to be exchanged.Consideration for carrying out on the efficient can be optimized this embodiment, and promptly this step comprises: choose an application program described to be exchanged, this application program of choosing of mark; Judge that whether the current free memory amount sum of amount of ram that the application program of this mark is shared and system is more than or equal to first predetermined threshold value; If not, then continue to carry out to choose this step of application program described to be exchanged; If, then with the page under underlined each self-corresponding process of application program exchange in the external memory.Here, first predetermined threshold value is an experiment value, and first predetermined threshold value is to satisfy the amount of ram of needs when any one application program is moved in the mobile device among the embodiment.
Among a kind of embodiment, described at least one application program of not having dependence with specified application and meeting pre-defined algorithm of searching is as also comprising before this step of application program to be exchanged: judge that whether the current free memory amount of system is more than or equal to second predetermined threshold value; If less than second predetermined threshold value, then carry out the described application program not having dependence with specified application and meet pre-defined algorithm of searching as application program step to be exchanged; Otherwise do not deal with.Here, second predetermined threshold value is an experiment value, and second predetermined threshold value is to satisfy the amount of ram of needs when any one application program is moved in the mobile device among the embodiment.
Among a kind of embodiment, handle this step according to application program execution internal memory exchange of management to be exchanged and also comprise afterwards: carry out the described specified application of normal application program launching flow startup; When described specified application was the current new application program that waits for startup of system, the application program that described basis is to be exchanged was carried out the internal memory exchange of management and is also comprised after handling this step: carry out the described new application program of normal application program launching flow startup.
Below the mobile device EMS memory management process that provides according to embodiment of the present invention is provided in detail by several embodiment and in conjunction with Fig. 2-9.For ease of describing, below among each embodiment the unified pre-defined algorithm that adopts be aforementioned lru algorithm, promptly least recently used CPU; Should be understood that the embodiment of the invention can also use other algorithms, be not limited to lru algorithm.
Embodiment one:
As shown in Figure 2, present embodiment comprises following steps:
Step S201: search APP by pre-defined algorithm;
Adopt lru algorithm to search application A PP, i.e. application program of in the current tabulation that runs application, searching least recently used CPU; Be appreciated that the application program of moving might not be the application program that is just taking CPU, but operating system has been created the application program of process for this application program.
Step S202: judge whether specified application depends on the assembly of the application A PP that is searched, here, specified application is meant other application programs except that application A PP in the current tabulation that runs application.
If there are dependence in specified application and application A PP, then get rid of application A PP, change step S201, the application program of searching next least recently used CPU; Be appreciated that getting rid of application A PP is meant and does not consider the page under the process of application A PP correspondence as the page that can exchange away.
If there are not dependence in predetermined application program and application A PP, then change step S203.
Step S203: carry out the internal memory exchange, particularly, the page under the pairing process of the application A PP of the least recently used CPU that finds as the page that can exchange away, is exchanged to it in external memory.
Step S204: internal memory exchange flow process finishes.
Present embodiment not only considered the advantage of lru algorithm but also considered the dependence of assembly between the application program, have only satisfy these two conditions simultaneously page just selected exchange go out, thereby eliminated invalid internal memory exchange.
Embodiment two:
As shown in Figure 3, present embodiment comprises following steps:
Step S301: identical with the step S201 of embodiment one, that is, in the current tabulation that runs application, search the application A PP of least recently used CPU.
Step S302: judge whether specified application depends on the assembly of application A PP, similarly, the specified application here is the application program except that application A PP in the current tabulation that runs application.If there is dependence, then get rid of application A PP, change step S301, the application program of searching next least recently used CPU; If there is not dependence, then change step S303;
Step S303: meet pre-defined algorithm and do not exist all pages under the pairing process of application program of dependence as the page that can exchange away what obtain among the step S302, the notice memory management module exchanges to these pages in the external memory;
Step S304: the free memory amount current system adds the amount of ram that exchanges away among the step S303, judges that whether sum of the two is more than or equal to first predetermined threshold value.Here, the first predetermined threshold value implication does not repeat them here as described above
If sum of the two more than or equal to predetermined threshold value, is changeed step S305; Otherwise change step S301, the application program of searching next least recently used CPU;
Step S305: internal memory exchange flow process finishes.
Present embodiment had not only not only been considered the advantage of lru algorithm but also had been considered the dependency relationships of assembly between the application program, also considered to carry out the maximum memory amount that the amount of ram of an internal memory exchange will satisfy to use, have only the selected exchange of page ability of satisfying these three conditions simultaneously to go out, thereby both eliminated invalid internal memory exchange, reduced exchange frequency again to internal memory exchange for once.
Embodiment three:
As shown in Figure 4, present embodiment comprises the steps:
Step S401: identical with the step S201 of embodiment one, that is, in the current tabulation that runs application, search the application A PP of least recently used CPU.
Step S402: judge whether specified application depends on the assembly of application A PP, similarly, the specified application here is the application program except that application A PP in the current tabulation that runs application.If there is dependence, then get rid of application A PP, change step S401, the application program of searching next least recently used CPU; If there is not dependence, then change step S403;
Step S403: what obtain among the markers step S402 meets pre-defined algorithm and does not have the application A PP of dependence
Step S404: the current free memory amount of system is added the shared amount of ram of application program of mark among the step S403, judge that whether sum of the two is more than or equal to first predetermined threshold value.Here, first predetermined threshold value is an experiment value, and first predetermined threshold value is to satisfy the amount of ram of needs when any one application program is moved in the mobile device among the embodiment.
If sum of the two more than or equal to predetermined threshold value, is changeed step S405; Otherwise change step S401, the application program of searching next least recently used CPU;
Step S405: with all pages under the underlined pairing separately process of application program as the page that can exchange away, the notice memory management module exchanges to these pages in the external memory;
Step S406: internal memory exchange flow process finishes.
As can be seen, present embodiment is actually embodiment two in the optimization aspect the execution, after finding out all application programs that need exchange away by circulation, concentrate then once the page under these processes to be exchanged in the external memory, thereby optimized the efficient of carrying out.
Embodiment four:
As shown in Figure 5, present embodiment comprises the steps:
Step S501: whether at first judge the current internal memory available quantity of system greater than second predetermined threshold value, if change step S505; If not, then change step S502; Here, the second predetermined threshold value implication does not repeat them here as described above
Step S502, S503, S504, S505 are identical with step S201, S202, S203, S204 among the embodiment one respectively, do not repeat them here.
Present embodiment is before carrying out internal memory exchange, and the current internal memory available quantity of taking into account system at first, and then carry out internal memory switching method as embodiment one has further been eliminated invalid internal memory exchange.
Embodiment five:
As shown in Figure 6, present embodiment comprises the steps:
Step S601: whether at first judge the current internal memory available quantity of system greater than predetermined threshold value, if change step S606; If not, then change step S602;
Step S602, S603, S604, S605, S606 are identical with step S301, S302, S303, S304, S305 among the embodiment two respectively, do not repeat them here.
Present embodiment is before carrying out internal memory exchange, and the current internal memory available quantity of taking into account system at first, and then carry out internal memory switching method as embodiment two has further been eliminated invalid internal memory exchange.
Embodiment six:
As shown in Figure 7, comprise the steps:
Step S701: whether at first judge the current internal memory available quantity of system greater than predetermined threshold value, if change step S606; If not, then change step S602;
Step S702 to the S707 step S401 to S406 with embodiment three respectively is identical, does not repeat them here.
Present embodiment is before carrying out internal memory exchange, and the current internal memory available quantity of taking into account system at first, and then carry out internal memory switching method as embodiment three has further been eliminated invalid internal memory exchange.
Before the internal memory switching method of above-mentioned each embodiment can be applicable to and starts specified application, promptly before starting specified application, carry out internal memory exchange flow process, wait internal memory exchange finishing back carrying out this specified application as above-mentioned each embodiment; Especially, when this specified application is system's new application program current to be started, before starting this new application program, carry out as the internal memory exchange flow process of above-mentioned each embodiment, wait internal memory exchange finishing back carrying out this new application program.This mode has not only been eliminated invalid internal memory exchange, also guarantees not have in the application program operational process internal memory exchange, thereby has eliminated bothering of internal memory exchange application programs operational process.
Be appreciated that according to the various embodiments described above, in the mobile device memory management device that the embodiment of the invention provides, the internal memory Switching Module is responsible for finishing the content exchange of the page of appointment in external memory, and the content of the page of exchange in external memory (when just CPU will read and write the content of the affiliated address of these pages) when needs use is read in the page of appointment automatically; And application management and control module are responsible for selecting page that will exchange away and the opportunity that determines page is exchanged away, it should be noted that, application management and control module are just controlled and are exchanged away among the embodiment, the content exchange that exchange is gone out is come in then to finish (this function is to be interrupted finishing by skipping leaf of operating system nucleus, and those skilled in the art can pass through existing techniques in realizing) automatically by the internal memory Switching Module.Be appreciated that, this Module Division among the present invention is for convenience and a kind of notion in logic of introducing, during specific implementation, both can one the corresponding software module entity (as function, class, process, thread etc.) independently of module, also can the corresponding software module entity of a plurality of modules, the perhaps corresponding a plurality of software module entities of module.
Be that example further specifies the mobile device EMS memory management process that an embodiment of the present invention provides with the Android mobile phone below.In the prior art, the Android mobile phone has adopted (SuSE) Linux OS technology and Java technology, and this makes that the operation of Android mobile phone is very responsive to memory size.When internal memory was smaller, the operation of Android mobile phone can be very slow.For this reason, the Android mobile phone all has been equipped with jumbo internal memory basically.
As shown in Figure 8, application management and control module are made up of ActivityManagerService and these two classes of PackageManageService, and the internal memory Switching Module is made up of the virtual memory management code module in the (SuSE) Linux OS kernel.In addition, communicating by letter between application controls and administration module and the internal memory Switching Module adopts that virtual device driver---MMUDriver finishes.
As shown in Figure 9, this example comprises following steps:
Step S901:ActivityManagerService opens MMUDriver and drives, and prepares to carry out the internal memory exchange and handles.
Whether the current available internal memory amount of step S902:ActivityManagerService check system is more than or equal to predetermined threshold value, if commentaries on classics step S909 if not, then changes step S903.Here, predetermined threshold value is definite by testing, and is the amount of ram that can satisfy needs when any one uses operation on the mobile phone in principle;
Step S903:ActivityManagerService finds out the application program that nearest maximum duration is not used CPU from the application list that is moving;
Step S904:ActivityManagerService checks the current descriptor for the treatment of application program started by PackageManagerService, see the external application assembly that it will rely on, can describe by the Intent mode, these information further be converted to the application name that will rely on;
The application list that step S905:ActivityManagerService inquiry is moving, do not use the principle of CPU to sort (being called the LRU table) by nearest maximum duration in this table, from LRU table, select first not the application program in step S904 (that is to say, the nearest maximum duration of this application program does not use CPU and its assembly not to be relied on), as the application program that will exchange away;
Step S906:ActivityManagerService issues MMUDriver to the pairing process number of the application program of selecting among the step S905 in the mode of writing MMUDriver and driving and drives, and waits for that MMUDriver drives and returns result by reading mode that MMUDriver drives then;
After step S907:MMUDriver drives and receives the process number that ActivityManagerService sends among the step S906, the memory content that the function of accent linux kernel occupies this process by the virtual memory module of kernel exchanges in the external memory, after finishing this operation, MMUDriver drives to state value of upper strata write-back;
Step S908: ActivityManagerService is waiting for the return results that MMUDriver drives always among the step S906, when treating that the result feeds back, ActivityManagerService removes wait, read the state value that MMUDriver drives write-back, continue down to carry out following operation: whether the current free memory of the system of checking more than or equal to predetermined threshold value, if, then change step S909, otherwise, from the LRU table, get rid of the application that just exchanges away, change step S905;
Step S909: executive utility starts, and flow process finishes.
Be appreciated that, as a kind of optimization of carrying out on the efficient, after ActivityManagerService can circulate earlier and find out all application programs that need exchange away, concentrate then and once notify the MMUDriver driving that the page under the pairing process of these application programs is exchanged in the external memory.
From the various embodiments described above as can be seen, the embodiment of the invention reduces invalid internal memory exchange by improving traditional internal memory switching method, weaken the influence of convential memory switching method application programs operation fluency, thereby the internal memory use amount on mobile device such as the mobile phone is minimized and do not influence user experience again.
The foregoing description is of the present invention giving an example, although disclose most preferred embodiment of the present invention and accompanying drawing for the purpose of illustration, but it will be appreciated by those skilled in the art that: without departing from the spirit and scope of the invention and the appended claims, various replacements, variation and modification all are possible.Therefore, the present invention should not be limited to most preferred embodiment and the disclosed content of accompanying drawing.
Claims (10)
1. a mobile device EMS memory management process is characterized in that, may further comprise the steps:
Search at least one application program of not having dependence with specified application and meeting pre-defined algorithm as application program to be exchanged;
Carrying out the internal memory exchange according to application program described to be exchanged handles.
2. the method for claim 1 is characterized in that, described at least one application program not having dependence with specified application and meet pre-defined algorithm of searching comprises as this step of application program to be exchanged:
From the application program of just moving, search the application program that meets pre-defined algorithm;
From the application program that meets pre-defined algorithm that finds, search the application program of not having dependence with specified application, with it as application program to be exchanged.
3. method as claimed in claim 1 or 2 is characterized in that, carries out this step of internal memory exchange processing according to application program described to be exchanged and comprises:
Choose an application program described to be exchanged, the page under the pairing process of this application program of choosing is exchanged in the external memory;
Judge that whether the current free memory amount sum of amount of ram that this application program is shared and system is more than or equal to first predetermined threshold value; If not, then continue to carry out to choose this step of application program described to be exchanged.
4. method as claimed in claim 1 or 2 is characterized in that, carries out this step of internal memory exchange processing according to application program to be exchanged and comprises:
Choose an application program described to be exchanged, this application program of choosing of mark;
Judge that whether the current free memory amount sum of amount of ram that the application program of this mark is shared and system is more than or equal to first predetermined threshold value; If not, then continue to carry out to choose this step of application program described to be exchanged; If, then with the page under underlined each self-corresponding process of application program exchange in the external memory.
5. method as claimed in claim 1 or 2 is characterized in that, carries out this step of internal memory exchange processing according to application program to be exchanged and comprises: the page under the pairing process of application program described to be exchanged is exchanged in the external memory.
6. as each described method of claim 1-5, it is characterized in that described at least one application program of not having dependence with specified application and meeting pre-defined algorithm of searching is as also comprising before this step of application program to be exchanged:
Judge that whether the current free memory amount of system is more than or equal to second predetermined threshold value; If less than described second predetermined threshold value, then carry out the described application program not having dependence with specified application and meet pre-defined algorithm of searching as application program step to be exchanged; Otherwise do not deal with.
7. as each described method of claim 1-6, it is characterized in that the described application program that meets pre-defined algorithm comprises the application program of least recently used CPU.
8. as each described method of claim 1-7, it is characterized in that, handle this step according to application program execution internal memory exchange of management to be exchanged and also comprise afterwards: carry out the described specified application of normal application program launching flow startup; When described specified application was the current new application program that waits for startup of system, the application program that described basis is to be exchanged was carried out the internal memory exchange of management and is also comprised after handling this step: carry out the described new application program of normal application program launching flow startup.
9. a mobile device memory management device is characterized in that, comprising:
Application management and control module are used to search at least one application program of not having dependence with specified application and meeting pre-defined algorithm as application program to be exchanged;
The internal memory Switching Module is used for the indication according to described application management and control module, and the page under the pairing process of application program described to be exchanged is exchanged in the external memory.
10. device as claimed in claim 9 is characterized in that the described application program that meets pre-defined algorithm comprises the application program of least recently used CPU.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710026421.5A CN106843758A (en) | 2011-05-23 | 2011-05-23 | A kind of mobile device EMS memory management process and device |
CN2011101351497A CN102226894A (en) | 2011-05-23 | 2011-05-23 | Mobile device memory management method and device |
PCT/CN2011/079602 WO2012159394A1 (en) | 2011-05-23 | 2011-09-14 | Method and apparatus for managing mobile device memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011101351497A CN102226894A (en) | 2011-05-23 | 2011-05-23 | Mobile device memory management method and device |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710026421.5A Division CN106843758A (en) | 2011-05-23 | 2011-05-23 | A kind of mobile device EMS memory management process and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102226894A true CN102226894A (en) | 2011-10-26 |
Family
ID=44807862
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011101351497A Pending CN102226894A (en) | 2011-05-23 | 2011-05-23 | Mobile device memory management method and device |
CN201710026421.5A Withdrawn CN106843758A (en) | 2011-05-23 | 2011-05-23 | A kind of mobile device EMS memory management process and device |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710026421.5A Withdrawn CN106843758A (en) | 2011-05-23 | 2011-05-23 | A kind of mobile device EMS memory management process and device |
Country Status (2)
Country | Link |
---|---|
CN (2) | CN102226894A (en) |
WO (1) | WO2012159394A1 (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103117923A (en) * | 2013-01-18 | 2013-05-22 | 杭州华三通信技术有限公司 | Process management method and process management equipment |
WO2013182157A1 (en) * | 2012-11-20 | 2013-12-12 | 中兴通讯股份有限公司 | Application program processing method and device |
WO2014127695A1 (en) * | 2013-02-21 | 2014-08-28 | 北京奇虎科技有限公司 | System running acceleration method and apparatus |
CN104156226A (en) * | 2013-05-15 | 2014-11-19 | 索尼公司 | Pending or shutdown method for hybrid memory device |
CN104461737A (en) * | 2014-12-10 | 2015-03-25 | 广东欧珀移动通信有限公司 | Memory management method and device thereof |
WO2016138785A1 (en) * | 2015-03-04 | 2016-09-09 | 华为技术有限公司 | Method and device for running process |
CN105988842A (en) * | 2015-02-12 | 2016-10-05 | 广东欧珀移动通信有限公司 | Method for transferring application program, and terminal |
CN106502768A (en) * | 2016-09-22 | 2017-03-15 | 南京酷派软件技术有限公司 | A kind of applied program processing method, device, terminal and server |
CN106873664A (en) * | 2017-02-28 | 2017-06-20 | 努比亚技术有限公司 | A kind of temprature control method and mobile terminal |
CN110554837A (en) * | 2018-06-03 | 2019-12-10 | 苹果公司 | Intelligent switching of fatigue-prone storage media |
CN111475083A (en) * | 2020-04-03 | 2020-07-31 | 惠州Tcl移动通信有限公司 | Application skipping method and device, storage medium and mobile terminal |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110018902B (en) * | 2018-01-10 | 2023-01-31 | Oppo广东移动通信有限公司 | Memory processing method and device, electronic equipment and computer readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020161932A1 (en) * | 2001-02-13 | 2002-10-31 | International Business Machines Corporation | System and method for managing memory compression transparent to an operating system |
CN101686340A (en) * | 2008-09-26 | 2010-03-31 | 深圳市朗科科技股份有限公司 | Method and system for expanding function of image communication equipment |
CN101847127A (en) * | 2010-06-18 | 2010-09-29 | 福建星网锐捷网络有限公司 | Memory management method and device |
CN101882160A (en) * | 2010-06-29 | 2010-11-10 | 宇龙计算机通信科技(深圳)有限公司 | Web page management method and mobile terminal |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1505506A1 (en) * | 2003-08-05 | 2005-02-09 | Sap Ag | A method of data caching |
CN100555222C (en) * | 2007-02-15 | 2009-10-28 | 凌阳科技股份有限公司 | Method and address relocation device that the application program relocatable loads |
-
2011
- 2011-05-23 CN CN2011101351497A patent/CN102226894A/en active Pending
- 2011-05-23 CN CN201710026421.5A patent/CN106843758A/en not_active Withdrawn
- 2011-09-14 WO PCT/CN2011/079602 patent/WO2012159394A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020161932A1 (en) * | 2001-02-13 | 2002-10-31 | International Business Machines Corporation | System and method for managing memory compression transparent to an operating system |
CN101686340A (en) * | 2008-09-26 | 2010-03-31 | 深圳市朗科科技股份有限公司 | Method and system for expanding function of image communication equipment |
CN101847127A (en) * | 2010-06-18 | 2010-09-29 | 福建星网锐捷网络有限公司 | Memory management method and device |
CN101882160A (en) * | 2010-06-29 | 2010-11-10 | 宇龙计算机通信科技(深圳)有限公司 | Web page management method and mobile terminal |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013182157A1 (en) * | 2012-11-20 | 2013-12-12 | 中兴通讯股份有限公司 | Application program processing method and device |
CN103838620A (en) * | 2012-11-20 | 2014-06-04 | 中兴通讯股份有限公司 | Method and device for processing application programs |
CN103117923A (en) * | 2013-01-18 | 2013-05-22 | 杭州华三通信技术有限公司 | Process management method and process management equipment |
CN103117923B (en) * | 2013-01-18 | 2016-06-29 | 杭州华三通信技术有限公司 | A kind of process management method and equipment |
WO2014127695A1 (en) * | 2013-02-21 | 2014-08-28 | 北京奇虎科技有限公司 | System running acceleration method and apparatus |
CN104156226A (en) * | 2013-05-15 | 2014-11-19 | 索尼公司 | Pending or shutdown method for hybrid memory device |
CN104156226B (en) * | 2013-05-15 | 2019-01-15 | 索尼公司 | Mix hang-up or the closedown method of memory device |
CN104461737B (en) * | 2014-12-10 | 2018-01-16 | 广东欧珀移动通信有限公司 | A kind of EMS memory management process and device |
CN104461737A (en) * | 2014-12-10 | 2015-03-25 | 广东欧珀移动通信有限公司 | Memory management method and device thereof |
CN105988842A (en) * | 2015-02-12 | 2016-10-05 | 广东欧珀移动通信有限公司 | Method for transferring application program, and terminal |
CN105988842B (en) * | 2015-02-12 | 2019-06-11 | Oppo广东移动通信有限公司 | A kind of method and terminal shifting application program |
CN105988875A (en) * | 2015-03-04 | 2016-10-05 | 华为技术有限公司 | Method and device for running process |
WO2016138785A1 (en) * | 2015-03-04 | 2016-09-09 | 华为技术有限公司 | Method and device for running process |
US10261918B2 (en) | 2015-03-04 | 2019-04-16 | Huawei Technologies Co., Ltd. | Process running method and apparatus |
CN105988875B (en) * | 2015-03-04 | 2020-08-14 | 华为技术有限公司 | Method and device for running process |
CN106502768A (en) * | 2016-09-22 | 2017-03-15 | 南京酷派软件技术有限公司 | A kind of applied program processing method, device, terminal and server |
CN106873664A (en) * | 2017-02-28 | 2017-06-20 | 努比亚技术有限公司 | A kind of temprature control method and mobile terminal |
CN110554837A (en) * | 2018-06-03 | 2019-12-10 | 苹果公司 | Intelligent switching of fatigue-prone storage media |
CN111475083A (en) * | 2020-04-03 | 2020-07-31 | 惠州Tcl移动通信有限公司 | Application skipping method and device, storage medium and mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN106843758A (en) | 2017-06-13 |
WO2012159394A1 (en) | 2012-11-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102226894A (en) | Mobile device memory management method and device | |
EP3514689B1 (en) | Memory management method and apparatus | |
EP3362898B1 (en) | Method for efficient task scheduling in the presence of conflicts | |
US9697124B2 (en) | Systems and methods for providing dynamic cache extension in a multi-cluster heterogeneous processor architecture | |
Vijaykumar et al. | A case for richer cross-layer abstractions: Bridging the semantic gap with expressive memory | |
CN102695999B (en) | Domain specific language, compiler and JIT for dynamic power management | |
CN103092920B (en) | Storage method of semi-structured data and storage system | |
CN102495756A (en) | Method and system for switching operating system between different central processing units | |
US20120254520A1 (en) | Non-volatile memory device, a data processing device using the same, and a swapping method used by the data processing and non-volatile memory devices | |
CN100538641C (en) | The method of operation calculation device | |
US20150261686A1 (en) | Systems and methods for supporting demand paging for subsystems in a portable computing environment with restricted memory resources | |
CN102667714B (en) | Support the method and system that the function provided by the resource outside operating system environment is provided | |
KR102646619B1 (en) | Method and system providing file system for an electronic device comprising a composite memory device | |
CN101107599B (en) | Cache memory control method and cache memory control device | |
JP4961931B2 (en) | Job execution scheduling program, job execution scheduling method, and job execution scheduling apparatus | |
CN104239134A (en) | Method and device for managing tasks of many-core system | |
CN101178701A (en) | Communicating method and system between multi-processor | |
WO2016182683A1 (en) | System and method for dynamic granularity control of parallelized work in a portable computing device (pcd) | |
US8433873B2 (en) | Disposition instructions for extended access commands | |
CN103049546B (en) | The method and apparatus of a kind of management, access system daily record | |
Ahmed et al. | Heterogeneous energy-aware load balancing for industry 4.0 and IoT environments | |
CN104391803A (en) | Storage management method for partition operating system | |
Zhang et al. | Hetero-db: next generation high-performance database systems by best utilizing heterogeneous computing and storage resources | |
CN103092677A (en) | Internal storage energy-saving system and method suitable for virtualization platform | |
CN103377034A (en) | Method and device for instruction presending, instruction management system and operation core |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20111026 |