CN107608782A - The method and device of memory compression, operating system, electronic equipment - Google Patents

The method and device of memory compression, operating system, electronic equipment Download PDF

Info

Publication number
CN107608782A
CN107608782A CN201610543568.7A CN201610543568A CN107608782A CN 107608782 A CN107608782 A CN 107608782A CN 201610543568 A CN201610543568 A CN 201610543568A CN 107608782 A CN107608782 A CN 107608782A
Authority
CN
China
Prior art keywords
memory
memory compression
triggering command
virtual machine
compression
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
CN201610543568.7A
Other languages
Chinese (zh)
Other versions
CN107608782B (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.)
Banma Zhixing Network Hongkong Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610543568.7A priority Critical patent/CN107608782B/en
Publication of CN107608782A publication Critical patent/CN107608782A/en
Application granted granted Critical
Publication of CN107608782B publication Critical patent/CN107608782B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

This application discloses the method and device of memory compression, operating system, electronic equipment, in the method for memory compression, operating system sends the triggering command of memory compression to virtual machine;The virtual machine responds the triggering command of the memory compression, to specifying the data in the internal memory shared by background process to be compressed;The specified background process includes the process of service Service attributes and/or the process of permanent Persistent attributes.Scheme provided herein can improve the systematic function of equipment.

Description

The method and device of memory compression, operating system, electronic equipment
Technical field
The application is related to system function optimization technology, more particularly to the method and device of memory compression, operating system electronics Equipment.
Background technology
Process is the elementary cell that the program embodied by operating system is run, a usual program at least one enter Journey, process possess independent memory headroom in the process of implementation.The hardware resource of embedded computer system is than relatively limited, especially It is that run-time memory is typically not too large, system can typically optimize to internal memory use, i.e., reduced as far as possible by memory compression EMS memory occupation, accelerate internal memory release.Memory compression is typically that the memory headroom occupied by process is integrally carried out into data with algorithm Compression, is then pressed onto specific region of memory.At present, in order to be optimized to systematic function, generally directed to there is application interface phase The process (process of Activity attributes) of pass carries out memory compression and defragmentation, but still can not effectively clear up internal memory.When When starting new opplication, if system needs to call LMK (low Memory because resource anxiety can not be using storage allocation Killer, the release of low internal memory) resource is discharged, to make to start using normal, but when this way can cause the startup of application Between it is elongated, cause systematic function to fail.
The content of the invention
The application provides the method and device, operating system, electronic equipment of memory compression, can improve systematic function.
According to the first aspect of the embodiment of the present application, there is provided a kind of method of memory compression, the method comprising the steps of:
Operating system sends the triggering command of memory compression to virtual machine;
The virtual machine responds the triggering command of the memory compression, to specifying the number in the internal memory shared by background process According to being compressed;Process and/or permanent Persistent attribute of the specified background process including service Service attributes Process.
According to the second aspect of the embodiment of the present application, there is provided a kind of method of memory compression, the method comprising the steps of:
The triggering command of memory compression is received, to specifying the data in the internal memory shared by background process to be compressed;Institute Stating specified background process includes the process of service Service attributes and/or the process of permanent Persistent attributes.
According to the third aspect of the embodiment of the present application, there is provided a kind of device of memory compression, including:
Interface module, for receiving the triggering command of memory compression;
Memory compression module, to specifying the data in the internal memory shared by background process to be compressed;The specified backstage Process includes the process of Service attributes and/or the process of Persistent attributes.
According to the fourth aspect of the embodiment of the present application, there is provided a kind of operating system, including:
Process manager module, for managing multiple processes, the process includes background process;
The interface of Virtual machine, for sending the triggering command of memory compression to virtual machine, the memory compression touches Send instructions for triggering virtual machine to specifying the data in the internal memory shared by background process to be compressed;The specified backstage is entered Journey includes the process of service Service attributes and/or the process of permanent Persistent attributes.
According to the 5th of the embodiment of the present application the aspect, there is provided a kind of electronic equipment, including:
Processor;
For storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
The triggering command of memory compression is received, to specifying the data in the internal memory shared by background process to be compressed;Institute Stating specified background process includes the process of Service attributes and/or the process of Persistent attributes.
The application is found that the reason for causing low memory, and the background process for causing low memory to have a major impact is produced Raw internal storage data is compressed, and reaches the optimization aim of system function optimization and relieving system aging, thus can improve because The problem of application startup time is longer caused by low memory.
Brief description of the drawings
Fig. 1 is a kind of device interior logical architecture figure in the embodiment of the present application;
Fig. 2 a are a kind of partial process view of the method for memory compression in the embodiment of the present application;
Fig. 2 b are a kind of partial process view of the method for memory compression in the embodiment of the present application;
Fig. 3 a are the partial process view of the method for the memory compression of an application example;
Fig. 3 b are another flow chart of the method for memory compression in an application example;
Fig. 4 is the hardware architecture diagram of the device of memory compression in the embodiment of the present application;
Fig. 5 is the software logic block diagram of the device of memory compression in the embodiment of the present application;
Fig. 6 is a kind of software logic block diagram of operating system in the embodiment of the present application.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended The example of the consistent apparatus and method of some aspects be described in detail in claims, the application.
It is only merely for the purpose of description specific embodiment in term used in this application, and is not intended to be limiting the application. " one kind " of singulative used in the application and appended claims, " described " and "the" are also intended to including majority Form, unless context clearly shows that other implications.It is also understood that term "and/or" used herein refers to and wrapped Containing the associated list items purpose of one or more, any or all may be combined.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application A little information should not necessarily be limited by these terms.These terms are only used for same type of information being distinguished from each other out.For example, do not departing from In the case of the application scope, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determining ".
Present applicant proposes the scheme that the systematic function to equipment is improved.In certain embodiments, equipment can be Desktop computer, in certain embodiments, equipment can be portable (such as notebook, tablet PC or hands Holding equipment).In certain embodiments, equipment can be wearable (such as intelligent watch, intelligent glasses etc.), in some implementations In example, equipment can be mounted to (such as car-mounted terminal, navigator etc.) in other equipment.
In some examples, the logical architecture of device interior may be referred to Fig. 1, and equipment has operating system 100, operating system The type of (Operating System, OS) is not construed as limiting in this application, for example, can be Windows OS, iOS, MacOS, Android OS, Linux OS, YunOS (cloud OS) etc..Certain operations system possibly relies on virtual machine, for example, Android In OS, YunOS, therefore the upper strata of operating system 100 can be virtual machine 110, and virtual machine (Virtual Machine) is usually Refer to the complete computers system that there is complete hardware system function, operating in a completely isolated environment simulated by software System.It is readily appreciated that, in some examples, the logical framework of device interior may not also include virtual machine 110.System framework (Framework) 120 be a language development software, there is provided the framework of software development, exploitation is had more engineering, simplicity And stability.Equipment can be mounted with a variety of applications, and various applications are installed on application layer 130.Inside application or operating system When the service of offer is run, operating system 100 starts corresponding process, and is the memory headroom of the course allocation independence.
Conventional art is generally internal using conventional GC (Garbage Collection, garbage collection) strategies Deposit and be compressed, and conventional GC strategies can cause the fragment rate more and more higher in heap (heap area) region, therefore would generally enter (such as using when being switched to backstage when not in use from the foreground used) is to the process institute in heap areas when journey is in the non-sensitive phase Caused data do first compression processing.Due to the process (the application be referred to as the process of Activity attribute) related to interface compared with Easily determine the state for entering the non-sensitive phase from sensitive periods, therefore conventional GC strategies are generally directed to there is entering for Activity attributes The data in internal memory shared by journey are compressed and defragmentation, and in some OS, progress can be automatically controlled by virtual machine The time point of compression.But can not it has been found that being compressed for the data in the internal memory shared by Activity processes Solves the problems, such as memory source deficiency, its reason is substantial amounts of background process when equipment is run be present, for example, Services belongs to The process of property and the ratio of the process committed memory of Persistent attributes are very high, due to Services attributes process or Persistent attribute processes are typically the Resident Process on backstage, have no chance to be switched to the non-sensitive phase, so can not pass through GC Strategy does the arrangement optimization in heap regions to these processes, causes system operation time to lengthen and consume more internal memories.Therefore, Applicant proposes the scheme being compressed to the data in the internal memory shared by background process.Part flow in some examples can Referring to Fig. 2 a.
S201a, operating system send the triggering command of memory compression to virtual machine;
S202a, the triggering command of virtual machine response memory compression, to specifying the data in the internal memory shared by background process It is compressed.Background process is specified to include the process of Service attributes and/or the Persistent processes of attribute, it is worthwhile to note that It is not precluded from the possibility being compressed when design needs to the background process of other attributes.
It is found by the applicant that when forced-triggered during some background process memory compression to that can sort out many fragments, in order to both Data in internal memory shared by background process are compressed, and do not influence the normal use of user, in the example shown in Fig. 2 a In son, by selecting suitable opportunity, the compression process of background process is actively triggered by the triggering command of memory compression, to rear Platform process is compressed.
The example of Fig. 2 a descriptions, can be performed the operation of memory compression by virtual machine, certainly, in other examples, According to the difference of operating system, the operation of memory compression can be performed by operating system or other executive agents.Some examples In son, part steps as shown in Figure 2 b can be performed by performing the entity of memory compression:
S201b, receive the triggering command of memory compression;
S202b, to specifying the data in the internal memory shared by background process to be compressed;Specified background process can include The process of Service attributes and/or the Persistent processes of attribute, but be not precluded from when design needs to other attributes The possibility that background process is compressed.
Using executive agent as virtual machine instance, triggering command can come from outside virtual machine;Can also be default certain Trigger condition, when meeting condition, virtual machine internal is sent automatically.In some examples, triggering command is sent from virtual machine outside Opportunity can be operating system call virtual machine provided interface when, or by operating system to virtual machine send specify Signal when actively trigger the triggering command of memory compression.As an example, the interface that virtual machine is provided can be virtual machine layer The newly-increased interface extended, for example, it may be AMS (Activity Manager Service, application management service) module Expansion interface, AMS modules can be managed to application program, such as download, be mobile, deleting, upgrading and buying authority.
The opportunity of memory compression for user can the function of normal use equipment have large effect, applicant is through excessive The experimental study of amount, work out the sensitive periods of resident background process, it is determined that it is several actively trigger background process compression at the time of, For example, active trigger event can be following one or more of modes:
1st, as the event for actively triggering background process compression when equipment is started;
2nd, a control specified can be increased newly, for example, button that a key accelerates etc., the master when the control that user's triggering is specified The event of dynamic triggering background process compression;
The event that background process compresses, example are triggered when the 3rd, can trigger functional by some already present controls in the lump Such as, this moment can be when background process clearing function is triggered.
It is readily appreciated that, cited several moment are merely exemplary to be illustrated, it is not excluded that other situations.
As an example, the process of compression is referred to carry out the process of Activity attributes the mode of GC compressions, such as The compression algorithm of use can be mark-copy or mark-compact etc..In background process memory compression flow After being triggered, the process of all Services attributes and Persistent attributes can be traveled through, internal memory pressure is sent to virtual machine The triggering command of contracting.In order to reduce EMS memory occupation, the request can be Asynchronous Request.Virtual machine receives the triggering of memory compression After instruction, the data in the internal memory shared by background process that can attempt to compress needs are compressed.
In some examples, virtual machine can record this memory compression after the triggering command of memory compression is received The timestamp of triggering command, and record after each memory compression the time of this memory compression.If this receives internal memory pressure The time interval of the time gap last time memory compression of the triggering command of contracting conforms to a predetermined condition, then performs to specifying background process The step of data in shared internal memory are compressed, if not meeting predetermined condition, ignore touching for the memory compression Send instructions, predetermined condition can determine according to the design requirement of designer, for example, 5 minutes can be set as time interval etc.. If this is applicant when fully taking into account that memory compression time interval is too short twice, newly-generated heap fragments are less, again System resource can more be consumed by doing heap compressions, therefore this time cut-off of virtual machine ensure that and frequently be received even in virtual machine To memory compression triggering command when, can also ensure the high yield of memory compression.
In order to guarantee safety, in some examples, can also have to enter the process for sending the internal memory triggering command The step of row Authority Verification, a system process can be set to the security procedure of acquiescence, if sending internal memory triggering command Process is this system process, then Authority Verification passes through;Otherwise, the result of authority authentication failed is returned.
In some examples, the process of Activity attributes can also be compressed in the lump, press at the time of background process compresses Contracting mode may be referred to virtual machine in traditional scheme and send memory compression request pair by receiving the interface of the AMS modules The process that the data in internal memory shared by the process of Activity attributes are compressed.
Can be to the internal memory shared by the process of Activity attributes in some examples, during except platform process upon compression In data be compressed, can also be called with reference to virtual machine in traditional scheme according to preset rules in the interface of AMS modules When, virtual machine is compressed to the process of Activity attributes automatically.
Fig. 3 a are examples under an application scenarios, have multiple applications on mobile terminal, the AMS modules of virtual machine 320 carry For first interface, Activity processes are compressed automatically for virtual machine;The second interface of extension is provided, received for virtual machine outside main The compression instruction of dynamic triggering carries out background process (such as the process of Services attributes and process of Persistent attributes) Compression." key acceleration " button is triggered as the triggering thing for actively triggering background process compression using device power-up and user in this example Part.Fig. 3 b show the part flow being compressed during device power-up to the internal storage data shared by background process.
In the stage 1, trigger memory compression flow:When mobile terminal starts, start specific system process to call AMS modules Second interface, by second interface to virtual machine send memory compression triggering command;
Stage 2 is proof of identity process:Whether second interface verification called side is the system process set, if it is, The background process of all Services attributes and Persistent attributes is traveled through in AMS modules, notice is each currently in The background process of active state, discharged by the first process resource of the process oneself, then sent out by the background process to virtual machine interface The Asynchronous Request of memory compression is sent, notice virtual machine carries out memory compression, if check results are not the system process of setting, The triggering command for receiving memory compression is abandoned;
Stage 3 is memory compression processing procedure:After virtual machine receives request, it can attempt to carry out internal memory pressure to the process Contracting, and record the timestamp of second compression request.
Stage 4 to triggering the handling process of memory compression process again:When user is using during mobile device, lead to The triggering command that " key acceleration " button triggers memory compression again is crossed, then is again started up specific system process to call second Interface performs above-mentioned steps.If virtual machine, which this time receives request, is less than the time specified apart from the time that last compression occurs, Then ignore this second compression (not shown), if not less than the time specified, be compressed again.
It may be noted that when calling second interface progress memory compression, entering for all Activity attributes can also be traveled through Journey is compressed.In addition, when virtual machine internal calls first interface automatically, the process to Activity attributes can also be triggered It is compressed.
For this example, contrasted by following test data with the test data compressed without background process, with The advantage that display background process compression is brought to systematic function.Exemplified by saving as 1G in tested mobile terminal.
Step 1,5 seconds start recording internal storage datas after mobile device 300 is unlocked.This data is as " start internal storage data 1”;
Step 2, on the basis of step 1, internal storage data is recorded after standing 3 minutes.This data is as " start internal storage data 2”;
Step 3,10 minutes start recording internal storage datas after unblock.This data is as " start internal storage data 3 ";Meanwhile this Data will be used as " internal storage data before a key accelerates ";
Step 4, on the basis of step 2, one key of triggering accelerates button, and internal storage data is recorded after standing 10 seconds.This data is made For " key accelerate after internal storage data 1 ";
Step 5,10 minutes are stood after unblock, then triggers a key and accelerate button, internal storage data is recorded after standing 10 seconds.This Data as " key accelerate after internal storage data 2 ";
One key accelerates the effect of optimization to internal memory, mainly may be referred to " internal storage data 2 " and " key acceleration after a key accelerates Preceding internal storage data ".
By above testing procedure, following test result is obtained:
1st, " display of start internal storage data 1 " in the version start of memory compression by saving as:The internal memory used reduces 8.9M, the internal memory increase 8.4M of idle condition;
2nd, " display of start internal storage data 2 " in the version start of memory compression by saving as:The internal memory used reduces 9.5M, the internal memory increase 8.6M of idle condition;
3rd, " display of start internal storage data 3 " in the version start of memory compression by saving as:The internal memory used deposits reduction 3.9M, the internal memory increase 5.3M of idle condition;
4th, " key accelerate before internal storage data ", " after a key accelerates the display of internal storage data 1 " by memory compression version phase Than the version without memory compression, a key accelerates to cause:The internal memory used reduces 16.3M, the internal memory increase of idle condition 15.3M;
5th, " key accelerate before internal storage data ", " after a key accelerates internal storage data 2 " show the version used compare without The version of memory compression is crossed, a key accelerates to cause:Used internal memories reduce 19.6M, Free internal memories increase 18.5M.
It thereby it is assumed that during the normal use of terminal device 300, once the flow of triggering memory compression, Ke Yiduo Save 2% or so internal memory.
Corresponding with the embodiment of the method for foregoing memory compression, present invention also provides the implementation of the device of memory compression Example.
The embodiment of the device of the application memory compression can be applied on an electronic device.Device embodiment can be by soft Part is realized, can also be realized by way of hardware or software and hardware combining.Exemplified by implemented in software, as a logical meaning On device, be to be read corresponding computer program instructions in nonvolatile memory by the processor of electronic equipment where it Get what operation in internal memory was formed.For hardware view, as shown in figure 4, being electronics where the device of the application memory compression A kind of hardware structure diagram of equipment, except the processor shown in Fig. 4, internal memory, network interface and nonvolatile memory it Outside, memory storage processor-executable instruction, the electronic equipment in embodiment where device is generally according to the electronic equipment Actual functional capability, other hardware can also be included, this is repeated no more.Processor, which is configured as performing correlation described above, to be moved Make, for example, in some examples, processor is configured as receiving the triggering command of memory compression, by virtual machine to specifying backstage The data in internal memory shared by process are compressed;The process of the specified background process including Service attributes and/or The process of Persistent attributes.
Fig. 5 is refer to, the device 500 of memory compression, can be included:
Interface module 501, for receiving the triggering command of memory compression;
Memory compression module 502, to specifying the data in the internal memory shared by background process to be compressed;Specified backstage is entered Journey can include the process of Service attributes and/or the process of Persistent attributes.
As an example, the triggering command of memory compression can be sent when meeting active trigger event;Actively trigger Event can include following at least one:
Control, the background process clearing function that equipment starts, user's triggering is specified are triggered, it is not excluded that have other actively Trigger condition.
In some examples, device 500 can also include correction verification module 502, for sending the internal memory triggering command Process carries out Authority Verification, can specifically include:
If sending the system process of the process of the internal memory triggering command for setting, Authority Verification is by and leading to Know the memory compression module 504;Otherwise, the result of authority authentication failed is returned.
In some examples, judge module 503 can also be included, for touching for this memory compression received according to record Whether the time to send instructions, the time interval of judging distance last time memory compression are conformed to a predetermined condition, and institute is notified if meeting The step of memory compression module is performed to specifying the data in the internal memory shared by background process to be compressed is stated, if do not met Predetermined condition, then ignore the triggering command of the memory compression.
As an example, described device 500 can be located at virtual machine, and interface module 501 can connect outside the virtual machine Receive the triggering command of memory compression.
Interface module 501 can be the expansion interface of application management service AMS modules.
In addition, memory compression module 504 can be also used for the number in the internal memory shared by the process of Activity attributes According to being compressed.
Fig. 6 is a kind of part logic diagram of operating system 600, including:
Process manager module 601, for managing multiple processes, the process includes background process;
The interface 602 of Virtual machine, for sending the triggering command of memory compression to virtual machine, the memory compression Triggering command is used to trigger virtual machine to specifying the data in the internal memory shared by background process to be compressed;The specified backstage Process includes the process of service Service attributes and/or the process of permanent Persistent attributes.
Operating system 600 can also include the system process of setting, for calling the interface of the Virtual machine to void Plan machine sends the triggering command of memory compression, is called so as to the interface of Virtual machine when responding active trigger event.
As an example, active trigger event can include following at least one:
Control, the background process clearing function that equipment starts, user's triggering is specified are triggered.
The triggering command of memory compression can be the instruction for the interface for calling the virtual machine to provide or to described Specified signal that virtual machine is sent etc..
As an example, the interface that virtual machine provides can be the expansion interface of AMS modules.
The function of unit and the implementation process of effect specifically refer to and step are corresponded in the above method in said apparatus Implementation process, it will not be repeated here.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part is real referring to method Apply the part explanation of example.Device embodiment described above is only schematical, wherein described be used as separating component The unit of explanation can be or may not be physically separate, can be as the part that unit is shown or can also It is not physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to reality Need to select some or all of module therein to realize the purpose of application scheme.Those of ordinary skill in the art are not paying In the case of going out creative work, you can to understand and implement.
The preferred embodiment of the application is the foregoing is only, not limiting the application, all essences in the application God any modification, equivalent substitution and improvements done etc., should be included within the scope of the application protection with principle.

Claims (27)

  1. A kind of 1. method of memory compression, it is characterised in that the method comprising the steps of:
    Operating system sends the triggering command of memory compression to virtual machine;
    The virtual machine responds the triggering command of the memory compression, to specifying the data in the internal memory shared by background process to enter Row compression;The specified background process includes the service process of Service attributes and/or entering for permanent Persistent attributes Journey.
  2. 2. according to the method for claim 1, it is characterised in that the triggering command of the memory compression is meeting actively to trigger Sent during event;The active trigger event includes following at least one:
    Control, the background process clearing function that equipment starts, user's triggering is specified are triggered.
  3. 3. according to the method for claim 1, it is characterised in that the triggering command of the memory compression is by the operating system The system process of interior setting is sent;
    Methods described also includes the step of virtual machine carries out Authority Verification to the process for sending the triggering command of the memory compression:
    If the process for sending the triggering command of the memory compression is the system process of setting, Authority Verification passes through;Otherwise, Return to the result of authority authentication failed;
    The step of to specifying the data in the internal memory shared by background process to be compressed, passes through rear execution in Authority Verification.
  4. 4. according to the method for claim 1, it is characterised in that the virtual machine is to specifying the internal memory shared by background process In data be compressed before also include:
    The time of the triggering command of this memory compression received is recorded, if the time interval apart from last time memory compression meets Predetermined condition, then the step of execution to specifying the data in the internal memory shared by background process to be compressed, if do not met pre- Fixed condition, then ignore the triggering command of the memory compression.
  5. A kind of 5. method of memory compression, it is characterised in that the method comprising the steps of:
    The triggering command of memory compression is received, to specifying the data in the internal memory shared by background process to be compressed;The finger Determining background process includes the process of service Service attributes and/or the process of permanent Persistent attributes.
  6. 6. according to the method for claim 5, it is characterised in that the triggering command of the memory compression is meeting actively to trigger Sent during event.
  7. 7. according to the method for claim 6, it is characterised in that the active trigger event includes following at least one:
    Control, the background process clearing function that equipment starts, user's triggering is specified are triggered.
  8. 8. according to the method for claim 5, it is characterised in that also include entering the process for sending the internal memory triggering command The step of row Authority Verification:
    If the process for sending the internal memory triggering command is the system process of setting, Authority Verification passes through;Otherwise, returning right Limit the result of authentication failed;
    The step of to specifying the data in the internal memory shared by background process to be compressed, passes through rear execution in Authority Verification.
  9. 9. according to the method for claim 5, it is characterised in that to specifying the data in the internal memory shared by background process to enter Also include before row compression:
    The time of the triggering command of this memory compression received is recorded, if the time interval apart from last time memory compression meets Predetermined condition, then the step of execution to specifying the data in the internal memory shared by background process to be compressed, if do not met pre- Fixed condition, then ignore the triggering command of the memory compression.
  10. 10. according to the method for claim 5, it is characterised in that methods described is performed by virtual machine;The memory compression Triggering command is come outside self virtualizing machine.
  11. 11. according to the method for claim 10, it is characterised in that the triggering command of the memory compression is adjusted for operating system The specified signal that the instruction of the interface provided with the virtual machine or operating system are sent to the virtual machine.
  12. 12. according to the method for claim 11, it is characterised in that the interface that the virtual machine provides is application management service The expansion interface of AMS modules.
  13. 13. according to the method for claim 10, it is characterised in that methods described also includes:
    The virtual machine is compressed to the data in the internal memory shared by the process of Activity attributes.
  14. A kind of 14. device of memory compression, it is characterised in that including:
    Interface module, for receiving the triggering command of memory compression;
    Memory compression module, to specifying the data in the internal memory shared by background process to be compressed;The specified background process The process of process and/or Persistent attributes including Service attributes.
  15. 15. device according to claim 14, it is characterised in that the triggering command of the memory compression is meeting actively to touch Sent during hair event;The active trigger event includes following at least one:
    Control, the background process clearing function that equipment starts, user's triggering is specified are triggered.
  16. 16. device according to claim 14, it is characterised in that also including correction verification module, for sending the internal memory The process of triggering command carries out Authority Verification, specifically includes:
    If sending the system process of the process of the internal memory triggering command for setting, Authority Verification is by and described in notifying Memory compression module;Otherwise, the result of authority authentication failed is returned.
  17. 17. device according to claim 14, it is characterised in that also including judge module, for this according to record Whether the time of the triggering command of the memory compression received, the time interval of judging distance last time memory compression meet predetermined bar Part, the memory compression module is notified to perform to specifying the data in the internal memory shared by background process to press if meeting The step of contracting, if not meeting predetermined condition, ignore the triggering command of the memory compression.
  18. 18. device according to claim 14, it is characterised in that described device is located at virtual machine,
    Triggering command of the interface module from the virtual machine external reception memory compression.
  19. 19. device according to claim 14, it is characterised in that the interface module is that application management services AMS modules Expansion interface.
  20. 20. device according to claim 14, it is characterised in that the memory compression module is additionally operable to belong to Activity The data in internal memory shared by the process of property are compressed.
  21. A kind of 21. operating system, it is characterised in that including:
    Process manager module, for managing multiple processes, the process includes background process;
    The interface of Virtual machine, for sending the triggering command of memory compression to virtual machine, the triggering of the memory compression refers to Make for triggering virtual machine to specifying the data in the internal memory shared by background process to be compressed;The specified background process bag Include the process of service Service attributes and/or the process of permanent Persistent attributes.
  22. 22. operating system according to claim 21, it is characterised in that the system that the operating system also includes setting is entered Journey, for calling the interface of the Virtual machine to the triggering command of virtual machine transmission memory compression.
  23. 23. operating system according to claim 21, it is characterised in that the interface of the Virtual machine is in response active It is called during trigger event.
  24. 24. operating system according to claim 23, it is characterised in that the active trigger event includes following at least one Kind:
    Control, the background process clearing function that equipment starts, user's triggering is specified are triggered.
  25. 25. operating system according to claim 21, it is characterised in that the triggering command of the memory compression is calling institute The specified signal that the instruction of the interface of virtual machine offer is provided or sent to the virtual machine.
  26. 26. operating system according to claim 25, it is characterised in that the interface that the virtual machine provides is application management Service the expansion interface of AMS modules.
  27. 27. a kind of electronic equipment, it is characterised in that including:
    Processor;
    For storing the memory of processor-executable instruction;
    Wherein, the processor is configured as:
    The triggering command of memory compression is received, to specifying the data in the internal memory shared by background process to be compressed;The finger Determining background process includes the process of Service attributes and/or the process of Persistent attributes.
CN201610543568.7A 2016-07-11 2016-07-11 Memory compression method and device, operating system and electronic equipment Active CN107608782B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610543568.7A CN107608782B (en) 2016-07-11 2016-07-11 Memory compression method and device, operating system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610543568.7A CN107608782B (en) 2016-07-11 2016-07-11 Memory compression method and device, operating system and electronic equipment

Publications (2)

Publication Number Publication Date
CN107608782A true CN107608782A (en) 2018-01-19
CN107608782B CN107608782B (en) 2021-01-29

Family

ID=61054812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610543568.7A Active CN107608782B (en) 2016-07-11 2016-07-11 Memory compression method and device, operating system and electronic equipment

Country Status (1)

Country Link
CN (1) CN107608782B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111290792A (en) * 2018-12-07 2020-06-16 成都鼎桥通信技术有限公司 Method for carrying out system switching in multi-container domain at top speed

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6151618A (en) * 1995-12-04 2000-11-21 Microsoft Corporation Safe general purpose virtual machine computing system
CN102103524A (en) * 2010-12-23 2011-06-22 北京航空航天大学 Memory redundancy oriented virtual machine migration device and method
US20120036325A1 (en) * 2010-07-13 2012-02-09 Vmware, Inc. Memory compression policies
CN103617133A (en) * 2013-12-06 2014-03-05 北京奇虎科技有限公司 Method and device for compressing virtual memory in Windows system
CN104125458A (en) * 2013-04-27 2014-10-29 展讯通信(上海)有限公司 Lossless stored data compression method and device
CN104503740A (en) * 2014-12-01 2015-04-08 小米科技有限责任公司 Memory management method and device
CN104572485A (en) * 2015-01-28 2015-04-29 宇龙计算机通信科技(深圳)有限公司 Allocation method and device of memory shared by two systems

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6151618A (en) * 1995-12-04 2000-11-21 Microsoft Corporation Safe general purpose virtual machine computing system
US20120036325A1 (en) * 2010-07-13 2012-02-09 Vmware, Inc. Memory compression policies
CN102103524A (en) * 2010-12-23 2011-06-22 北京航空航天大学 Memory redundancy oriented virtual machine migration device and method
CN104125458A (en) * 2013-04-27 2014-10-29 展讯通信(上海)有限公司 Lossless stored data compression method and device
CN103617133A (en) * 2013-12-06 2014-03-05 北京奇虎科技有限公司 Method and device for compressing virtual memory in Windows system
CN104503740A (en) * 2014-12-01 2015-04-08 小米科技有限责任公司 Memory management method and device
CN104572485A (en) * 2015-01-28 2015-04-29 宇龙计算机通信科技(深圳)有限公司 Allocation method and device of memory shared by two systems

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
潘晓东: "基于内存压缩的虚拟机实时迁移机制研究", 《中国优秀硕士学位论文全文数据库》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111290792A (en) * 2018-12-07 2020-06-16 成都鼎桥通信技术有限公司 Method for carrying out system switching in multi-container domain at top speed

Also Published As

Publication number Publication date
CN107608782B (en) 2021-01-29

Similar Documents

Publication Publication Date Title
EP2950203B1 (en) Application scenario identification method, power consumption management method and apparatus and terminal device
US20190220216A1 (en) Memory reclaiming method and terminal
US9678797B2 (en) Dynamic resource management for multi-process applications
EP3404538B1 (en) Data processing method, and data processing apparatus
EP3506105B1 (en) Method and device for processing a memory and storage medium
CN110059477B (en) Attack detection method and device
JP2007272576A5 (en)
CN110018902B (en) Memory processing method and device, electronic equipment and computer readable storage medium
EP3506114B1 (en) Memory processing method and device and storage medium
CN111858112B (en) Method, client and server for detecting memory leakage
CN109150642B (en) Application memory error detection method, detection device and storage medium
US9575827B2 (en) Memory management program, memory management method, and memory management device
CN108228077B (en) Storage area management method, operation method, device, equipment and readable medium
US10599444B2 (en) Extensible input stack for processing input device data
WO2019128542A1 (en) Application processing method, electronic device, computer readable storage medium
CN112835639B (en) Hook realization method, device, equipment, medium and product
US8768988B2 (en) Accessing snapshots of a time based file system
CN107608782A (en) The method and device of memory compression, operating system, electronic equipment
CN111444117A (en) Method and device for realizing fragmentation of storage space, storage medium and electronic equipment
KR101595936B1 (en) Optimization method, optimization server and computer readable recording medium for providing service with vaccine and optimization functions
EP4354293A1 (en) Detection method and apparatus, and electronic device
WO2019139738A1 (en) Extensible input stack for processing input device data
CN103269341A (en) Spyware analysis method and computer system
CN114385368A (en) Method and device for flashing pre-written log
CN112231290A (en) Method, device and equipment for processing local log and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1249613

Country of ref document: HK

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201211

Address after: Room 603, 6 / F, Roche Plaza, 788 Cheung Sha Wan Road, Kowloon, China

Applicant after: Zebra smart travel network (Hong Kong) Limited

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant