CN111666226A - Page bump protection method for operating system memory recovery and user equipment - Google Patents

Page bump protection method for operating system memory recovery and user equipment Download PDF

Info

Publication number
CN111666226A
CN111666226A CN202010551435.0A CN202010551435A CN111666226A CN 111666226 A CN111666226 A CN 111666226A CN 202010551435 A CN202010551435 A CN 202010551435A CN 111666226 A CN111666226 A CN 111666226A
Authority
CN
China
Prior art keywords
page
memory
protection
bump
performance data
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
CN202010551435.0A
Other languages
Chinese (zh)
Other versions
CN111666226B (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.)
Beijing Ziguang Zhanrui Communication Technology Co Ltd
Original Assignee
Beijing Ziguang Zhanrui Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Ziguang Zhanrui Communication Technology Co Ltd filed Critical Beijing Ziguang Zhanrui Communication Technology Co Ltd
Priority to CN202010551435.0A priority Critical patent/CN111666226B/en
Publication of CN111666226A publication Critical patent/CN111666226A/en
Application granted granted Critical
Publication of CN111666226B publication Critical patent/CN111666226B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0877Cache access modes
    • G06F12/0882Page mode
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the application provides a page bumping protection method and a page bumping protection device for memory recovery of an operating system, wherein the method is applied to User Equipment (UE), and comprises the following steps: if the UE starts page bump protection, setting the UE to be in a low-memory scene, and exciting memory recovery; the UE acquires performance data on line, and compares the performance data with preset data to determine a comparison result, wherein the preset data is the performance data acquired when the UE is located in the low-memory scene and page bump protection is not started; and the UE determines to execute the strategy of the page bump protection according to the comparison result. The technical scheme provided by the application has the advantage of high user experience.

Description

Page bump protection method for operating system memory recovery and user equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a page jolt protection method for operating system memory recovery and a user equipment.
Background
The android system (linux kernel) adopts the use principle of 'available and usable, and busy hour recycling' for the memory. Memory reclamation causes some frequently used document pages to be scanned twice in succession, so that activity quickly decreases to INACTIVE, and eventually is reclaimed to the buddy system. Subsequent applications have in turn accessed the corresponding location of the file, so that the act of allocating physical pages/reading in the contents of the file takes place again, typically with this process being page thrashing.
The performance of the system is reduced due to the excessive number of page jolts, the use of a user is influenced, and the user experience is reduced.
Disclosure of Invention
The embodiment of the application discloses a page jolting protection method for memory recovery of an operating system, which can reduce the influence of page jolting on the system, improve the performance of the system and improve the experience of a user.
The first aspect of the embodiment of the present application discloses a page bumping protection method for operating system memory recovery, which is applied to User Equipment (UE), and the method includes the following steps:
if the UE starts page bump protection, setting the UE to be in a low-memory scene, and exciting memory recovery;
the UE acquires performance data on line, and compares the performance data with preset data to determine a comparison result, wherein the preset data is the performance data acquired when the UE is located in the low-memory scene and page bump protection is not started;
the UE determines a strategy for executing the page bump protection according to the comparison result
In a second aspect, a page thrashing protection apparatus for operating system memory reclamation is provided, where the apparatus is applied to a user equipment UE, and the apparatus includes:
the excitation unit is used for setting the UE to be in a low-memory scene and exciting memory recovery if the UE starts page bump protection;
the acquisition unit is used for acquiring performance data on line;
the processing unit is used for comparing the performance data with preset data to determine a comparison result, wherein the preset data is the performance data collected when the UE is located in the low-memory scene and page bump protection is not started; and determining a strategy for executing the page bump protection according to the comparison result.
In a third aspect, there is provided a terminal comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps of the method of the first aspect.
A fourth aspect of embodiments of the present application discloses a computer-readable storage medium, which is characterized by storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute the method of the first aspect.
A fifth aspect of embodiments of the present application discloses a computer program product, wherein the computer program product comprises a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to perform some or all of the steps as described in the first aspect of embodiments of the present application. The computer program product may be a software installation package.
By implementing the embodiment of the application, if the UE starts page bump protection, the technical scheme provided by the application sets the UE to be in a low-memory scene, and stimulates memory recovery; the UE acquires performance data on line, and compares the performance data with preset data to determine a comparison result, wherein the preset data is the performance data acquired when the UE is located in the low-memory scene and page bump protection is not started; and determining a strategy for executing the page bump protection according to the comparison result. According to the technical scheme, after page bump protection, performance data are dynamically acquired, the performance data are compared with preset data to determine a result, and then a page bump protection strategy is adjusted, so that negative effects can be avoided, the performance of a system is improved, and the experience degree of a user is improved.
Drawings
The drawings used in the embodiments of the present application are described below.
Fig. 1 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 2 is a schematic flowchart illustrating a page thrashing protection method for operating system memory reclamation according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart illustrating a page thrashing protection method for operating system memory reclamation according to an embodiment of the present application;
fig. 4 is a schematic flowchart illustrating a page thrashing protection method for operating system memory reclamation according to a second embodiment of the present application;
fig. 5 is a schematic structural diagram of a page thrashing protection device for operating system memory recycling according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
The embodiments of the present application will be described below with reference to the drawings.
The term "and/or" in this application is only one kind of association relationship describing the associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in this document indicates that the former and latter related objects are in an "or" relationship.
The "plurality" appearing in the embodiments of the present application means two or more. The descriptions of the first, second, etc. appearing in the embodiments of the present application are only for illustrating and differentiating the objects, and do not represent the order or the particular limitation of the number of the devices in the embodiments of the present application, and do not constitute any limitation to the embodiments of the present application. The term "connect" in the embodiments of the present application refers to various connection manners, such as direct connection or indirect connection, to implement communication between devices, which is not limited in this embodiment of the present application.
A terminal in the embodiments of the present application may refer to various forms of UE, access terminal, subscriber unit, subscriber station, mobile station, MS (mobile station), remote station, remote terminal, mobile device, user terminal, terminal device (terminal equipment), wireless communication device, user agent, or user equipment. The terminal device may also be a cellular phone, a cordless phone, an SIP (session initiation protocol) phone, a WLL (wireless local loop) station, a PDA (personal digital assistant), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, a terminal device in a future 5G network or a terminal device in a future evolved PLMN (public land mobile network, chinese), and the like, which are not limited in this embodiment.
Operating systems (e.g., android, UNIX in enhanced mode, Windows) use virtual memory. In fact, memory is a technology that uses disk space to emulate RAM (random access memory) so that a machine behaves as if it has more memory than it actually does. In the terminal, there is a hardware called a Memory Management Unit (MMU).
The MMU treats memory as a contiguous byte of a certain size, typically 4096 or 8192 bytes, consisting of a series of "pages". The operating system sets up and maintains a table called Process Memory Map (PMM) for each running program. The PMM contains all memory pages that the program can access, as well as the actual location of each memory page.
The MMU processes this address (referred to as a "virtual address") each time a program accesses any portion of memory. The MMU looks up the actual location of the memory in the PMM (referred to as the "physical address"), which may be any location in the memory or disk allocated to it by the operating system, and if the location to be accessed by the program is on disk, the page containing it must be read from disk into memory, and the PMM must be updated to reflect this operation (this is referred to as a "page fault").
Because accessing disk is much slower than accessing RAM, the operating system attempts to save as much virtual memory in RAM as possible. If a large enough program is running (or several small programs are running at the same time), there may not be enough RAM to hold all the memory used by the program, so some of that memory must be moved out of RAM and onto disk (an operation called "paging").
The operating system guesses which memory regions are unlikely to be used for some time (usually based on past memory usage), and if it guesses incorrectly, or if the current program accesses a large amount of memory in many places, many page faults occur in order to read in the called out page. Because all of the RAM is in use, each page that is read in must be called out, which may result in more page faults, because the other page of memory is now moved to disk, and the problem of many page faults in a short period of time, called "page thrashing," can significantly reduce the performance of the system.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a terminal disclosed in an embodiment of the present application, the terminal 100 includes a storage and processing circuit 110, and a sensor 170 connected to the storage and processing circuit 110, where the sensor 170 may include a camera, a distance sensor, a gravity sensor, and the like, the electronic device may include two transparent display screens, the transparent display screens are disposed on a back side and a front side of the electronic device, and part or all of components between the two transparent display screens may also be transparent, so that the electronic device may be a transparent electronic device in terms of visual effect, and if part of the components are transparent, the electronic device may be a hollow electronic device. Wherein:
the terminal 100 may include control circuitry, which may include storage and processing circuitry 110. The storage and processing circuitry 110 may be a memory, such as a hard drive memory, a non-volatile memory (e.g., flash memory or other electronically programmable read-only memory used to form a solid state drive, etc.), a volatile memory (e.g., static or dynamic random access memory, etc.), etc., and the embodiments of the present application are not limited thereto. Processing circuitry in the storage and processing circuitry 110 may be used to control the operation of the terminal 100. The processing circuitry may be implemented based on one or more microprocessors, microcontrollers, digital signal processors, baseband processors, power management units, audio codec chips, application specific integrated circuits, display driver integrated circuits, and the like.
The storage and processing circuitry 110 may be used to run software in the terminal 100, such as an Internet browsing application, a Voice Over Internet Protocol (VOIP) telephone call application, an email application, a media playing application, operating system functions, and so forth. Such software may be used to perform control operations such as camera-based image capture, ambient light measurement based on an ambient light sensor, proximity sensor measurement based on a proximity sensor, information display functionality based on status indicators such as status indicator lights of light emitting diodes, touch event detection based on a touch sensor, functionality associated with displaying information on multiple (e.g., layered) display screens, operations associated with performing wireless communication functionality, operations associated with collecting and generating audio signals, control operations associated with collecting and processing button press event data, and other functions in the terminal 100, to name a few, embodiments of the present application are not limited.
The terminal 100 may include an input-output circuit 150. The input-output circuit 150 may be used to enable the terminal 100 to input and output data, i.e., to allow the terminal 100 to receive data from external devices and also to allow the terminal 100 to output data from the terminal 100 to external devices. The input-output circuit 150 may further include a sensor 170. Sensor 170 vein identification module, can also include ambient light sensor, proximity sensor based on light sum electric capacity, fingerprint identification module, touch sensor (for example, based on light touch sensor and/or capacitanc touch sensor, wherein, touch sensor can be touch-control display screen's partly, also can regard as a touch sensor structure independent utility), acceleration sensor, the camera, and other sensors etc. the camera can be leading camera or rear camera, fingerprint identification module can integrate in the display screen below, a fingerprint image is used for gathering, fingerprint identification module can be: optical fingerprint module, etc., and is not limited herein. The front camera can be arranged below the front display screen, and the rear camera can be arranged below the rear display screen. Of course, the front camera or the rear camera may not be integrated with the display screen, and certainly in practical applications, the front camera or the rear camera may also be a lifting structure.
Input-output circuit 150 may also include one or more display screens, and when multiple display screens are provided, such as 2 display screens, one display screen may be provided on the front of the electronic device and another display screen may be provided on the back of the electronic device, such as display screen 130. The display 130 may include one or a combination of liquid crystal display, transparent display, organic light emitting diode display, electronic ink display, plasma display, and display using other display technologies. The display screen 130 may include an array of touch sensors (i.e., the display screen 130 may be a touch display screen). The touch sensor may be a capacitive touch sensor formed by a transparent touch sensor electrode (e.g., an Indium Tin Oxide (ITO) electrode) array, or may be a touch sensor formed using other touch technologies, such as acoustic wave touch, pressure sensitive touch, resistive touch, optical touch, and the like, and the embodiments of the present application are not limited thereto.
The terminal 100 can also include an audio component 140. Audio component 140 may be used to provide audio input and output functionality for terminal 100. The audio components 140 in the terminal 100 may include a speaker, a microphone, a buzzer, a tone generator, and other components for generating and detecting sound.
The communication circuit 120 can be used to provide the terminal 100 with the capability to communicate with external devices. The communication circuit 120 may include analog and digital input-output interface circuits, and wireless communication circuits based on radio frequency signals and/or optical signals. The wireless communication circuitry in communication circuitry 120 may include radio-frequency transceiver circuitry, power amplifier circuitry, low noise amplifiers, switches, filters, and antennas. For example, the wireless Communication circuitry in Communication circuitry 120 may include circuitry to support Near Field Communication (NFC) by transmitting and receiving Near Field coupled electromagnetic signals. For example, the communication circuit 120 may include a near field communication antenna and a near field communication transceiver. The communications circuitry 120 may also include a cellular telephone transceiver and antenna, a wireless local area network transceiver circuitry and antenna, and so forth.
The terminal 100 may further include a battery, a power management circuit, and other input-output units 160. The input-output unit 160 may include buttons, joysticks, click wheels, scroll wheels, touch pads, keypads, keyboards, cameras, light emitting diodes and other status indicators, and the like.
A user may input commands through input-output circuitry 150 to control operation of terminal 100 and may use output data of input-output circuitry 150 to enable receipt of status information and other outputs from terminal 100.
Referring to fig. 2, an embodiment of the present application provides a page thrashing protection method for operating system memory recycling, where the method is applied to a UE, and as shown in fig. 2, the method includes the following steps:
step S201, if the UE starts page bump protection, setting the UE to be in a low memory scene, and triggering memory recovery.
The setting of the low memory scene may be specifically set by a manufacturer of the UE, or may be set by a user, for example, in an optional scheme, the manufacturer may set the game scene to be the low memory scene. Of course, in another alternative, the user may set the game scene + the WeChat may be a low memory scene. The technical scheme for activating the memory recovery can adopt the existing memory recovery mode.
Certainly, in an optional scheme, the UE in the low memory scenario specifically includes: and the UE directly applies the proportion of the memory after running the current scene, and if the proportion is lower than a proportion threshold value, the current scene is determined to be a low-memory scene.
In another optional scheme, the setting that the UE is located in the low memory scenario specifically may include:
the method comprises the steps that UE extracts a preset application program list of a low-memory scene, the UE runs all application programs in the application program list, the UE obtains a proportion value of a direct application memory, and if the proportion value is lower than a proportion threshold value, the UE is determined to be located in the low-memory scene.
Step S202, the UE collects performance data on line, the performance data is compared with preset data to determine a comparison result, and the preset data is the performance data collected when the UE is located in the low-memory scene and page bump protection is not started.
In an optional scheme, the preset data may correspond to a low memory scene, for example, in an optional embodiment, a mapping relationship between the low memory scene and the preset data is established, and after determining an identifier of the low memory scene, the UE queries the preset data corresponding to the identifier in the mapping relationship. In another optional embodiment, a mapping relationship between the application program and the preset data is established, and the UE determines the preset data from the mapping relationship according to the currently running application program.
Step S203, the UE determines to execute the policy of page thrashing protection according to the comparison result.
The implementation method of step S203 may specifically include:
if the comparison result shows that the page bump protection is not influenced negatively, the UE cancels the page bump protection;
and if the comparison result shows that the page bump range is influenced negatively, the UE executes the page bump range adjusting step until the negative influence disappears.
Such negative effects include, but are not limited to: the performance data is reduced, the performance data is lower than the preset data, and the difference value between the performance data and the preset data is lower than the difference threshold value.
The page thrashing range adjusting step may specifically include: and the UE adjusts the page jolt protection range, acquires performance data on line every time the page jolt protection range is adjusted, and compares the performance data with preset data to determine whether the negative influence disappears.
The UE adjusting the protection range of the page thrashing may specifically include: the UE adjusts the amount or area of physical memory for page thrashing protection.
According to the technical scheme, after the UE starts page bump protection, the UE is set to be in a low-memory scene, and memory recovery is triggered; the UE acquires performance data on line, and compares the performance data with preset data to determine a comparison result, wherein the preset data is the performance data acquired when the UE is located in the low-memory scene and page bump protection is not started; and determining a strategy for executing the page bump protection according to the comparison result. According to the technical scheme, after page bump protection, performance data are dynamically acquired, the performance data are compared with preset data to determine a result, and then a page bump protection strategy is adjusted, so that negative effects can be avoided, the performance of a system is improved, and the experience degree of a user is improved.
Example one
An embodiment of the present application provides a page bumping protection method for operating system memory recovery, where the embodiment is executed in a UE, the UE is an android system, a structure of the method may be as shown in fig. 1, and the method is as shown in fig. 3, and the method includes the following steps:
step S301, after the UE starts page bump protection, setting the UE to run game app and WeChat, acquiring the proportion of a direct application memory of a current scene, and executing subsequent steps if the proportion is lower than a proportion threshold;
step S302, the UE collects performance data on line, and the performance data is compared with preset data corresponding to game app and WeChat to obtain a comparison result;
step S303, if the comparison result shows that the page bump protection has negative influence, adjusting the number of physical memories of the page bump protection; step S302 and step S303 are repeatedly performed until there is no negative influence.
According to the technical scheme, after the UE starts page bump protection, the UE is set to be in a low-memory scene, and memory recovery is triggered; the UE acquires performance data on line, and compares the performance data with preset data to determine a comparison result, wherein the preset data is the performance data acquired when the UE is located in the low-memory scene and page bump protection is not started; with a negative impact, the amount of physical memory for page thrashing protection is adjusted until there is no negative impact. According to the technical scheme, after page bump protection, performance data are dynamically acquired, the performance data are compared with preset data to determine a result, and then a page bump protection strategy is adjusted, so that negative effects can be avoided, the performance of a system is improved, and the experience degree of a user is improved.
Example two
An embodiment of the present application provides a page bumping protection method for operating system memory recovery, where the embodiment is executed in a UE, the UE is an android system, a structure of the method may be as shown in fig. 1, and the method is as shown in fig. 4, and includes the following steps:
step S401, after the UE starts page bump protection, setting UE running game app + WeChat, acquiring the proportion of a direct application memory of a current scene, and executing subsequent steps if the proportion is lower than a proportion threshold;
s402, the UE collects performance data on line, and compares the performance data with preset data corresponding to the game app and the WeChat to obtain a comparison result;
step S403, if the comparison result shows that there is no negative effect, the page bump protection is cancelled.
According to the technical scheme, after the UE starts page bump protection, the UE is set to be in a low-memory scene, and memory recovery is triggered; the UE acquires performance data on line, and compares the performance data with preset data to determine a comparison result, wherein the preset data is the performance data acquired when the UE is located in the low-memory scene and page bump protection is not started; if the comparison result has no negative influence, the page bump protection is directly cancelled, so that the excessive page bump protection is avoided, and the fluency of the system is improved. According to the technical scheme, after page bump protection, performance data are dynamically acquired, the performance data are compared with preset data to determine a result, and then the strategy of page bump protection is adjusted, so that excessive page bump protection can be avoided, the smoothness of a system is improved, and the experience degree of a user is improved.
Referring to fig. 5, fig. 5 provides a page thrashing protection apparatus for operating system memory reclamation, the apparatus is applied to a user equipment UE, and the apparatus includes:
an excitation unit 501, configured to set the UE to be in a low-memory scene and excite memory recycling if the UE starts page bump protection;
an acquisition unit 502 for acquiring performance data online;
a processing unit 503, configured to compare the performance data with preset data to determine a comparison result, where the preset data is performance data collected when the UE is located in the low-memory scene and page bump protection is not started; and determining a strategy for executing the page bump protection according to the comparison result.
According to the technical scheme, after the UE starts page bump protection, the UE is set to be in a low-memory scene, and memory recovery is triggered; the UE acquires performance data on line, and compares the performance data with preset data to determine a comparison result, wherein the preset data is the performance data acquired when the UE is located in the low-memory scene and page bump protection is not started; and determining a strategy for executing the page bump protection according to the comparison result. According to the technical scheme, after page bump protection, performance data are dynamically acquired, the performance data are compared with preset data to determine a result, and then a page bump protection strategy is adjusted, so that negative effects can be avoided, the performance of a system is improved, and the experience degree of a user is improved.
In an alternative arrangement, the first and second electrodes may be,
a processing unit 503, specifically configured to cancel the page thrashing protection by the UE if the comparison result indicates that there is no negative impact;
and if the comparison result shows that the page bump range is influenced negatively, the UE executes the page bump range adjusting step until the negative influence disappears.
In an optional scheme, the page thrashing range adjusting step specifically includes: and the UE adjusts the page jolt protection range, acquires performance data on line every time the page jolt protection range is adjusted, and compares the performance data with preset data to determine whether the negative influence disappears.
In an alternative, the processing unit 503 is specifically configured to adjust the amount or area of the physical memory for page thrashing protection.
Referring to fig. 6, fig. 6 is a terminal 70 according to an embodiment of the present application, where the terminal 70 includes a processor 701, a memory 702, and a communication interface 703, and the processor 701, the memory 702, and the communication interface 703 are connected to each other through a bus 704.
The memory 702 includes, but is not limited to, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a portable read-only memory (CD-ROM), and the memory 702 is used for related computer programs and data. The communication interface 703 is used for receiving and transmitting data.
The processor 701 may be one or more Central Processing Units (CPUs), and in the case that the processor 701 is one CPU, the CPU may be a single-core CPU or a multi-core CPU.
The processor 701 in the terminal 70 is configured to read the computer program code stored in the memory 702 and perform the following operations:
if the page bump protection is started, setting the terminal to be in a low-memory scene, and exciting memory recovery;
the method comprises the steps that a terminal collects performance data on line, the performance data is compared with preset data to determine a comparison result, and the preset data are the performance data collected when the terminal is located in a low-memory scene and page bump protection is not started;
and the terminal determines to execute the page bump protection strategy according to the comparison result.
In an alternative arrangement, the first and second electrodes may be,
if the comparison result shows that no negative influence exists, the terminal cancels the page bump protection;
and if the comparison result shows that the page bump range has negative influence, the terminal executes the page bump range adjusting step until the negative influence disappears.
In an alternative arrangement, the first and second electrodes may be,
the page bump range adjusting step specifically includes: and adjusting the page bump protection range by the terminal, acquiring performance data on line every time the page bump protection range is adjusted, and comparing the performance data with preset data to determine whether the negative influence disappears.
In an alternative arrangement, the first and second electrodes may be,
the low memory scenario is specifically: and the terminal operates the proportion of the direct application memory after the current scene, and if the proportion is lower than a proportion threshold value, the current scene is determined to be a low memory scene.
In an alternative arrangement, the first and second electrodes may be,
the terminal adjusts the amount or area of physical memory for page thrashing protection.
The embodiment of the present application further provides a chip system, where the chip system includes at least one processor, a memory and an interface circuit, where the memory, the transceiver and the at least one processor are interconnected by a line, and the at least one memory stores a computer program; when the computer program is executed by the processor, the method flows shown in fig. 2, fig. 3 and fig. 4 are realized.
Embodiments of the present application further provide a computer-readable storage medium, in which a computer program is stored, and when the computer program runs on a network device, the method flows shown in fig. 2, fig. 3, and fig. 4 are implemented.
Embodiments of the present application further provide a computer program product, where when the computer program product runs on a terminal, the method flows shown in fig. 2, fig. 3, and fig. 4 are implemented.
Embodiments of the present application also provide a terminal, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing steps in the method of the embodiment shown in fig. 2, or fig. 3, and fig. 4.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It will be appreciated that the electronic device, in order to carry out the functions described above, may comprise corresponding hardware structures and/or software templates for performing the respective functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no acts or templates referred to are necessarily required by the application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (11)

1. A page bump protection method for operating system memory recovery is characterized in that the method is applied to User Equipment (UE), and the method comprises the following steps:
if the UE starts page bump protection, setting the UE to be in a low-memory scene, and exciting memory recovery;
the UE acquires performance data on line, and compares the performance data with preset data to determine a comparison result, wherein the preset data is the performance data acquired when the UE is located in the low-memory scene and page bump protection is not started;
and the UE determines to execute the strategy of the page bump protection according to the comparison result.
2. The method of claim 1, wherein the determining, by the UE, the policy for performing the page thrashing protection according to the comparison result specifically comprises:
if the comparison result shows that the page bump protection is not influenced negatively, the UE cancels the page bump protection;
and if the comparison result shows that the page bump range is influenced negatively, the UE executes the page bump range adjusting step until the negative influence disappears.
3. The method of claim 2,
the page bump range adjusting step specifically includes: and the UE adjusts the page jolt protection range, acquires performance data on line every time the page jolt protection range is adjusted, and compares the performance data with preset data to determine whether the negative influence disappears.
4. The method of claim 1,
the low memory scenario is specifically: and if the proportion of the direct application memory after the UE operates the current scene is lower than a proportion threshold value, determining that the current scene is a low-memory scene.
5. The method of claim 3, wherein the UE adjusting the protection range of page thrashing specifically comprises:
the UE adjusts the amount or area of physical memory for page thrashing protection.
6. A page bump protection device for operating system memory recovery, the device being applied to a User Equipment (UE), the device comprising:
the excitation unit is used for setting the UE to be in a low-memory scene and exciting memory recovery if the UE starts page bump protection;
the acquisition unit is used for acquiring performance data on line;
the processing unit is used for comparing the performance data with preset data to determine a comparison result, wherein the preset data is the performance data collected when the UE is located in the low-memory scene and page bump protection is not started; and determining a strategy for executing the page bump protection according to the comparison result.
7. The apparatus of claim 6,
the processing unit is specifically configured to cancel the page thrashing protection by the UE if the comparison result indicates that no negative impact is caused;
and if the comparison result shows that the page bump range is influenced negatively, the UE executes the page bump range adjusting step until the negative influence disappears.
8. The apparatus of claim 7,
the page bump range adjusting step specifically includes: and the UE adjusts the page jolt protection range, acquires performance data on line every time the page jolt protection range is adjusted, and compares the performance data with preset data to determine whether the negative influence disappears.
9. The apparatus of claim 8,
the processing unit is specifically configured to adjust the number or area of the physical memory for page thrashing protection.
10. A terminal comprising a processor, memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-5.
11. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-5.
CN202010551435.0A 2020-06-16 2020-06-16 Page bump protection method for operating system memory recovery and user equipment Active CN111666226B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010551435.0A CN111666226B (en) 2020-06-16 2020-06-16 Page bump protection method for operating system memory recovery and user equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010551435.0A CN111666226B (en) 2020-06-16 2020-06-16 Page bump protection method for operating system memory recovery and user equipment

Publications (2)

Publication Number Publication Date
CN111666226A true CN111666226A (en) 2020-09-15
CN111666226B CN111666226B (en) 2022-09-13

Family

ID=72388339

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010551435.0A Active CN111666226B (en) 2020-06-16 2020-06-16 Page bump protection method for operating system memory recovery and user equipment

Country Status (1)

Country Link
CN (1) CN111666226B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051186A (en) * 2021-03-08 2021-06-29 北京紫光展锐通信技术有限公司 Method and device for processing page jolt in memory recovery and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729249A (en) * 2012-10-11 2014-04-16 财团法人工业技术研究院 Method and computer system for memory management on virtual machine system
US20140108764A1 (en) * 2012-10-11 2014-04-17 Industrial Technology Research Institute Method and computer system for memory management on virtual machine
CN105095099A (en) * 2015-07-21 2015-11-25 浙江大学 Integration method for large memory pages based on bitmap alteration of memory pages
CN105335306A (en) * 2014-06-30 2016-02-17 华为技术有限公司 Memory control method and memory control device
CN108363930A (en) * 2018-03-21 2018-08-03 中国人民解放军战略支援部队信息工程大学 A kind of internal storage data guard method and system
CN109697119A (en) * 2017-10-20 2019-04-30 中兴通讯股份有限公司 Terminal Memory recycle processing method and processing device
CN109992523A (en) * 2017-12-29 2019-07-09 广东欧珀移动通信有限公司 Internal memory processing method and device, electronic equipment, computer readable storage medium
US20190220418A1 (en) * 2016-09-28 2019-07-18 Huawei Technologies Co., Ltd. Memory Management Method and Apparatus

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729249A (en) * 2012-10-11 2014-04-16 财团法人工业技术研究院 Method and computer system for memory management on virtual machine system
US20140108764A1 (en) * 2012-10-11 2014-04-17 Industrial Technology Research Institute Method and computer system for memory management on virtual machine
CN105335306A (en) * 2014-06-30 2016-02-17 华为技术有限公司 Memory control method and memory control device
CN105095099A (en) * 2015-07-21 2015-11-25 浙江大学 Integration method for large memory pages based on bitmap alteration of memory pages
US20190220418A1 (en) * 2016-09-28 2019-07-18 Huawei Technologies Co., Ltd. Memory Management Method and Apparatus
CN109697119A (en) * 2017-10-20 2019-04-30 中兴通讯股份有限公司 Terminal Memory recycle processing method and processing device
CN109992523A (en) * 2017-12-29 2019-07-09 广东欧珀移动通信有限公司 Internal memory processing method and device, electronic equipment, computer readable storage medium
CN108363930A (en) * 2018-03-21 2018-08-03 中国人民解放军战略支援部队信息工程大学 A kind of internal storage data guard method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王兆文 等: "一种提高Linux内存管理实时性的设计方案", 《计算机工程》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051186A (en) * 2021-03-08 2021-06-29 北京紫光展锐通信技术有限公司 Method and device for processing page jolt in memory recovery and electronic equipment
CN113051186B (en) * 2021-03-08 2022-06-24 北京紫光展锐通信技术有限公司 Method and device for processing page bump in memory recovery and electronic equipment
WO2022188778A1 (en) * 2021-03-08 2022-09-15 北京紫光展锐通信技术有限公司 Method and apparatus for processing page thrashing in memory recovery, and electronic device

Also Published As

Publication number Publication date
CN111666226B (en) 2022-09-13

Similar Documents

Publication Publication Date Title
US11133563B2 (en) Method of detecting swelling of battery using pressure sensor and electronic device using the method
US20190220318A1 (en) Memory Reclamation Method and Apparatus
CN108701043B (en) Display processing method and device
CN112055424B (en) Electronic device and method for switching electronic device
CN106127481A (en) A kind of fingerprint method of payment and terminal
CN107888768B (en) Unlocking control method, terminal and computer readable storage medium
CN110475020B (en) Equipment control method and related product
CN110837343B (en) Snapshot processing method and device and terminal
US20200252502A1 (en) Method for responding to incoming call by means of fingerprint recognition, storage medium, and mobile terminal
CN111666227B (en) Page bump protection method and device for memory recovery of operating system
CN110221696B (en) Eyeball tracking method and related product
CN111274160A (en) Data storage method, electronic device, and medium
CN111666226B (en) Page bump protection method for operating system memory recovery and user equipment
CN110264184B (en) Payment control method and related product
CN107045610B (en) Data migration method, terminal device and computer readable storage medium
CN110069322B (en) Background application processing method, terminal equipment and storage medium
CN109902484B (en) Processing method of associated application and terminal
CN110611347B (en) Charging control method and related product
CN109144811A (en) A kind of application monitoring method, device and mobile terminal
CN110197370B (en) Two-dimensional code generation and payment method, terminal equipment and storage medium
CN113170305B (en) Application downloading and installing method and related product
CN111601300A (en) Multi-card PDU session establishment method and related equipment
CN110825682A (en) USB control method and electronic equipment
CN111654848B (en) NFC card detection method and device, storage medium and mobile terminal
CN110990606B (en) Picture storage method and device, storage medium and electronic equipment

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
GR01 Patent grant
GR01 Patent grant