Electronic device and control method thereof

By designing an adaptive memory recovery operation in an electronic device and selecting an appropriate recovery rate according to the current operating load level, the problem of CPU overload caused by memory recovery operation is solved, and the optimization of system status and the reduction of delay is achieved.

CN111837105BActive Publication Date: 2025-05-16SAMSUNG ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201980018071.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-06-07
Filing Date
2019-03-05
Publication Date
2025-05-16
Estimated Expiration
2039-03-05

AI Technical Summary

Technical Problem

During memory recovery operation, existing electronic devices can easily cause CPU overload, which in turn causes system delay.

Method used

An electronic device is designed to check the current operating load level through the processor and perform different memory recovery operations according to different threshold values, including a first memory recovery operation and a second memory recovery operation, respectively, with different recovery rates to minimize CPU overload.

Benefits of technology

Through adaptive memory recovery operations, it is possible to ensure the system status while reducing CPU overload and avoid system delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111837105B_ABST
    Figure CN111837105B_ABST
Patent Text Reader

Abstract

An electronic device comprises: a memory; and a processor, wherein the processor executes a process based on data loaded into the memory, checks a current operating load level of the electronic device, and performs any one of a first memory recovery operation and a second memory recovery operation corresponding to the checked current operating load level of the electronic device, wherein the first memory recovery operation is used to increase the available capacity of the memory, and the second memory recovery operation has a memory recovery rate different from the memory recovery rate of the first memory recovery operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to an electronic device and a control method thereof that operates by executing software (such as an operating system and an application program) by hardware (such as a CPU and a processor), and more specifically, to an electronic device and a control method thereof having a structure for ensuring available memory capacity required to execute the software during operation. Background Art

[0002] In order to calculate and process predetermined information according to a specific process, an electronic device that basically includes electronic components for operation such as a CPU, a chipset, and a memory may be classified into various types according to the information to be processed. For example, the electronic device includes an information processing device that processes general information such as a PC or a server, and an image processing device that processes image information. Various electronic devices such as an image processing device, a display device, and an information processing device perform pre-assigned functions as a single entity.

[0003] The basic structure in which the electronic device operates should consider both hardware and software together. In terms of hardware, the electronic device includes a CPU, a processor or a SOC (an entity for operating and processing a process), and a memory for loading data for the process. In terms of software, the electronic device includes an operating system or a kernel that performs basic management of the system, and an application program that drives and executes the process on the operating system. For example, the CPU loads data corresponding to the operating system into the memory and executes the data, and loads the application program into the memory when the operating system is executed, and executes the application program in the operating system, so that the process is executed by executing the application program.

[0004] When the execution and termination of multiple processes are repeated over time, the data share of the process being loaded into the memory (i.e., the used capacity of the memory) increases, while the available capacity of the memory decreases. When the available capacity of the memory decreases to a predetermined limit or lower, the operating system of the electronic device performs an operation of reducing the used capacity of the memory and increasing the available capacity of the memory for the execution of subsequent processes. Generally, this operation is called memory recovery.

[0005] Memory recovery is implemented by program code in the operating system and is executed when predetermined conditions are met. The operating system may have various memory recovery methods, for example, a conventional Linux-based operating system has a memory recovery method of a kernel swap daemon (KSD) and a low memory killer (LMK). However, due to the multitasking feature of the electronic device, the CPU is not only used for memory recovery operations, so this memory recovery operation inevitably generates a CPU load. That is, even when the memory recovery operation is being executed, the CPU may be used by another process, and in this case, CPU overload may occur. CPU overload causes delays in the operation of the electronic device.

[0006] Therefore, there is a need for an electronic device that can adaptively restore memory to a system state while minimizing overload of the CPU. Summary of the invention

[0007] According to one aspect of the present disclosure, an electronic device includes: a memory; and a processor, wherein the processor executes a process based on data loaded into the memory, checks a current operating load level of the electronic device, and performs any one of a first memory recovery operation and a second memory recovery operation corresponding to the checked current operating load level of the electronic device, wherein the first memory recovery operation is used to increase the available capacity of the memory, and the second memory recovery operation has a memory recovery rate different from the memory recovery rate of the first memory recovery operation.

[0008] The current operation load of the electronic device may include a current operation load of a processor.

[0009] When the checked level is greater than a first threshold, the processor performs a first memory recovery operation having a faster memory recovery rate than a second memory recovery operation; and when the checked level is not greater than the first threshold, the processor performs the second memory recovery operation.

[0010] The first memory recovery operation may be based on a low memory killer (LMK) type, and the second memory recovery operation may be based on a kernel swap daemon (KSD) type.

[0011] When it is detected that the available capacity is less than the second threshold, any one of the first memory recovery operation and the second memory recovery operation may be performed.

[0012] When the available capacity is lower than a third threshold value (the third threshold value is lower than the second threshold value) after performing any one of the first memory recovery operation and the second memory recovery operation, the processor may perform the first memory recovery operation and the second memory recovery operation together.

[0013] The second memory recovery operation may classify the data of the process loaded into the memory according to preset importance, and perform memory recovery on some of the classified data according to the classification result.

[0014] The first memory restore operation may perform a memory restore on all data of the process loaded into the memory.

[0015] According to another aspect of the present disclosure, a control method of an electronic device includes: performing processing based on data loaded into a memory of the electronic device; checking a current operating load level of the electronic device; and performing any one of a first memory recovery operation and a second memory recovery operation corresponding to the checked current operating load level of the electronic device, wherein the first memory recovery operation is used to increase the available capacity of the memory, and the second memory recovery operation has a memory recovery rate that is different from the memory recovery rate of the first memory recovery operation.

[0016] The current operation load of the electronic device may include a current operation load of a processor.

[0017] Executing any one of the first memory recovery operation and the second memory recovery operation may include: when the checked level is greater than a first threshold, executing the first memory recovery operation having a faster memory recovery rate than the second memory recovery operation; and when the checked level is not greater than the first threshold, executing the second memory recovery operation.

[0018] The first memory recovery operation may be based on the LMK type, and the second memory recovery operation may be based on the KSD type.

[0019] When it is detected that the available capacity is lower than the second threshold, any one of the first memory recovery operation and the second memory recovery operation may be performed.

[0020] The control method may further include: when the available capacity is lower than a third threshold after performing any one of the first memory recovery operation and the second memory recovery operation, performing the first memory recovery operation and the second memory recovery operation together, the third threshold being lower than the second threshold.

[0021] The second memory recovery operation may classify the data of the process loaded into the memory according to preset importance, and perform memory recovery on some of the classified data according to the classification result.

[0022] The first memory restore operation may perform a memory restore on all data of the process loaded into the memory. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1is a block diagram of a configuration of a display device according to an embodiment of the present disclosure.

[0024] Figure 2 is an exemplary diagram illustrating a principle in which a processor of a display device loads data into a RAM according to an embodiment of the present disclosure.

[0025] Figure 3 is a flowchart illustrating a control method of a display device according to an embodiment of the present disclosure.

[0026] Figure 4 is an exemplary diagram illustrating a principle in which a display device according to an embodiment of the present disclosure performs KSD.

[0027] Figure 5 is an exemplary diagram illustrating a principle in which a display device according to an embodiment of the present disclosure performs LMK.

[0028] Figure 6 is a flowchart of a method of selectively performing KSD and LMK by a display device according to an embodiment of the present disclosure.

[0029] Figure 7 is a diagram showing a temporal variation trend of available capacity of a RAM in a display device according to an embodiment of the present disclosure.

[0030] Figure 8 is an exemplary diagram illustrating a principle of selecting a memory recovery operation corresponding to a usage rate of a processor of a display device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0031] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. Unless otherwise specified, the embodiments described with reference to each of the accompanying drawings are not mutually exclusive configurations, and multiple embodiments can be selectively combined and implemented in one device. The combination of embodiments can be arbitrarily selected and applied by those skilled in the art to implement the spirit of the present disclosure.

[0032] If there are terms including ordinal numbers such as first component, second component, etc. in the embodiments, these terms are used to describe various components, and these terms are used to distinguish one component from other components, and therefore, the meanings of these components are not limited by these terms. The terms used in the embodiments are used to describe the embodiments and do not limit the spirit of the present disclosure.

[0033] In addition, in the case where an expression of "at least one" of a plurality of components is described in the present specification, this expression refers not only to the entirety of the plurality of components but also to each component excluding the remaining components or all combinations thereof.

[0034] Figure 1 is a block diagram of a configuration of a display device according to an embodiment of the present disclosure.

[0035] like Figure 1 As shown, the device according to the present embodiment is implemented as a display device 100. However, the device according to the spirit of the present disclosure can be implemented not only as the display device 100, but also as various types of electronic devices provided to perform predetermined processing when various applications are installed and the corresponding applications are executed. Such electronic devices can be implemented as various types of devices, such as TVs, desktop computers or laptop computers, tablet computers, mobile phones, portable multimedia players, wearable devices, video walls, electronic frames, and home devices.

[0036] The display device 100 includes: a communication unit 110 for communicating with an external device, a signal input / output unit 120 provided for inputting / outputting predetermined data, a display unit 130 for displaying an image, a user input unit 140 for performing user input, a storage unit 150 for storing data, and a processor 160 for processing data.

[0037] The communication unit 110 is a component for communication connection to a network, and is a bidirectional communication circuit, including at least one of components such as a communication module and a communication chip corresponding to various types of wired and wireless communication protocols. For example, the communication unit 110 includes a wireless communication module for wirelessly communicating with an AP according to a Wi-Fi method, a LAN card connected to a router or a gateway, and the like.

[0038] The signal input / output unit 120 is a component for local connection and is connected to a predetermined external device in a one-to-one or one-to-many manner to receive data from the external device or output data to the outside. The signal input / output unit 120 includes at least one port configured to be connected to a connector according to a predetermined transmission standard, such as an HDMI port and a USB port.

[0039] The display unit 130 includes a display panel that can display an image on a screen. The display panel is configured as a light receiving structure such as a liquid crystal type or a self-luminous structure such as an OLED type. Depending on the structure of the display panel, the display unit 130 may also include additional components. For example, if the display panel is a liquid crystal type, the display unit 130 includes a backlight unit that provides light to the liquid crystal display panel and a panel driving substrate that drives the liquid crystal of the liquid crystal display panel.

[0040] The user input unit 140 includes various types of input interfaces configured to perform user input. Depending on the type of the display device 100, the user input unit 140 may be configured in various forms, and may be, for example, a mechanical or electronic key unit of the display device 100, a remote controller separated from the display device 100, a touch panel, a touch screen mounted on the display unit 130, etc.

[0041] The storage unit 150 is accessed through the processor 160, and performs operations such as reading, writing, modifying, deleting, and updating data according to the control of the processor 160. The storage unit 150 includes a non-volatile memory 151 that can store data regardless of whether power is supplied, and a volatile memory 152 that can store data when power is supplied but does not lose the data when power is supplied. Examples of the non-volatile memory 151 include a flash memory, a hard disk drive, a solid state drive (SSD), etc., and examples of the volatile memory 152 include a cache, a RAM, etc.

[0042] The processor 160 includes at least one hardware processor implemented as a CPU, a chipset, a cache, a circuit, etc. mounted on a printed circuit board, and may be implemented as a system on chip (SOC) depending on a design method. The processor 160 includes modules corresponding to various processes such as a demultiplexer, a decoder, a scaler, an audio DSP, and an amplifier, some or all of which may be implemented as an SOC. For example, modules related to image processing (such as a demultiplexer, a decoder, and a scaler) may be implemented as an image processing SOC, and an audio DSP may be implemented as a chipset separate from the SOC.

[0043] The processor 160 is a hardware body for performing general operations of the display device 100. In terms of software, a predetermined operation of the display device 100 is performed by an operating system or a kernel, or by an application program executed on the kernel, and the processor 160 performs operations, processing, and control on data to enable the software to be executed. For example, the processor 160 executes an operating system or a kernel of the display device 100, and also executes an application program or a program on the kernel to perform processing.

[0044] The processor 160 first loads data related to the process into the RAM as the volatile memory 152, and executes the process based on the data loaded into the RAM. Hereinafter, the principle of the processor 160 loading data into the RAM will be described.

[0045] Figure 2 is an exemplary diagram illustrating a principle in which a processor of a display device loads data into a RAM according to an embodiment of the present disclosure.

[0046] like Figure 2 As shown, the display device 200 includes a flash memory 210 as a non-volatile memory for storing data of a kernel 240 and a plurality of application programs 250, a RAM 220 as a volatile memory, and a processor 230. The operation of the application programs 250 and the kernel 240 as software is performed by the operation, processing, and control of the processor 230 as hardware.

[0047] When the power of the display device 200 is turned on, power-on is performed, and during the power-on, the kernel 240 is loaded from the flash memory 210 into the RAM 220 and executed on the RAM 220. The kernel 240 responds to various events generated when the operation of the display device 200 proceeds, and as a result, each application 250 is loaded into the RAM 220. The application 250 loaded into the RAM 220 occupies the available capacity of the RAM 220 and is executed on the kernel 240.

[0048] The available capacity of the RAM 220 refers to the capacity in the storage area of ​​the RAM 220 that is not loaded or allocated data for the currently executed process. Meanwhile, the used capacity of the RAM 220 refers to the capacity in the storage area of ​​the RAM 220 that is loaded or allocated data for the currently executed process.

[0049] According to execution events or termination events of various processes, the kernel 240 may load the application 250 of the flash memory 210 into the RAM 220 and execute the application 250 , or may release data allocation of the application 250 in a storage area of ​​the RAM 220 .

[0050] However, if a process is repeatedly executed as the operating time of the display device 200 passes, the used capacity of the RAM 220 increases, and thus the available capacity of the RAM 200 may be insufficient. When the available capacity of the RAM 220 is insufficient, it is difficult to load data for a new process into the RAM 220.

[0051] Therefore, when it is determined that the available capacity of RAM 220 is insufficient, kernel 240 performs a memory recovery operation. Kernel 240 may determine whether the available capacity of RAM 220 is insufficient in various ways. For example, if it is determined that the available capacity of RAM 220 is lower than a preset first threshold, the used capacity of RAM 220 is greater than a preset second threshold, or the number of processes currently being executed is greater than a preset third threshold, it may be determined that kernel 240 requires a memory recovery operation.

[0052] Hereinafter, a memory recovery operation of the core 240 or the processor 230 according to an embodiment of the present disclosure will be described.

[0053] Figure 3 is a flowchart illustrating a control method of a display device according to an embodiment of the present disclosure.

[0054] like Figure 3 As shown, the processor driving the core installed in the display device performs the following operations.

[0055] In step 310, the display device detects that the available capacity of the RAM is lower than a predetermined first threshold. If the available capacity of the RAM is not lower than the first threshold, the display device maintains the currently executed process.

[0056] On the other hand, if it is detected that an event has occurred in which the available capacity of the RAM is lower than the first threshold, then in step 320 , the display device checks the current operation load level of the display device.

[0057] In step 330 , the display device compares the checked current operation load level with a predetermined second threshold value.

[0058] If the current operation load level is greater than the second threshold, then in step 340 , the display device performs a first memory recovery operation among a plurality of memory recovery operations.

[0059] On the other hand, if the current operation load level is not greater than the second threshold, in step 350 , the display device performs a second memory recovery operation having a memory recovery rate different from the first memory recovery operation among the plurality of memory recovery operations.

[0060] The above operations are implemented by the program code contained in the kernel.

[0061] As a result, the display device can minimize system overload due to the memory recovery operation by selecting an optimized memory recovery operation in response to the current operation load of the display device.

[0062] Here, there may be various methods to check the current operation load level of the display device. For example, the display device may determine the current operation load level of the display device according to the number of processes currently being executed or the current usage rate of the processor indicated by a percentage. That is, when the current usage rate of the processor is high, the display device determines that the operation load level is high; and when the current usage rate of the processor is low, the display device determines that the operation load level is low.

[0063] In addition, in the present embodiment, it has been described that the display device performs the first memory recovery operation when the current operation load level is relatively high, and performs the second memory recovery operation when the current operation load level is relatively low. However, there may be three or more different methods of memory recovery operations; and the display device may be configured to divide the possible range of the current operation load level into a plurality of ranges, and perform respective memory recovery operations corresponding to each divided range.

[0064] Meanwhile, depending on the type or feature of the kernel, a plurality of memory recovery operations may be applied to the display device in various ways. For example, a Linux-based kernel has a memory recovery method of a kernel swap daemon (KSD) and a low memory killer (LMK). In the present embodiment, the first memory recovery operation has a faster memory recovery rate, a lower processor load, and a lower memory recovery efficiency than the second memory recovery operation.

[0065] That is, when a memory recovery operation is to be performed, the display device according to an embodiment of the present disclosure performs a first memory recovery operation with a relatively faster memory recovery rate when the current operation load of the device is high, and performs a second memory recovery operation with a relatively lower memory recovery rate when the current operation load of the device is low. Therefore, it is possible to minimize the delay of various processes executed on the display device while performing the memory recovery operation.

[0066] In view of this, the first memory recovery operation corresponds to LMK in the Linux-based kernel, and the second memory recovery operation corresponds to KSD. Hereinafter, LMK and KSD will be described in detail.

[0067] Figure 4 is an exemplary diagram illustrating a principle in which a display device according to an embodiment of the present disclosure performs KSD.

[0068] like Figure 4 As shown, the bar graph indicating step 410 before memory recovery indicates the used capacity currently occupied by various processes of the display device in the total capacity of the RAM. Assuming that the total capacity of the entire storage area of ​​the RAM is 100%, the used capacity 411 of the RAM occupied by the process in step 410 is m%, and the remaining available capacity 412 of the RAM is (100-m)%.

[0069] KSD is a method of restoring a memory by classifying main data and additional data in the data of a process loaded into RAM, and maintaining the main data in RAM and removing the additional data from RAM according to the classification result. Here, main data is core data necessary for executing a process, and includes program code of an application, etc. Additional data is data in a process that has a lower importance than main data, that is, data that may or may not be selectively used in the execution of a process, and includes cache data, metadata, etc.

[0070] The display device executes KSD to perform memory recovery. According to the bar graph of step 420 after memory recovery, among the data occupying m% of the process in the previous step 410, the main data 421 occupying n% of the process is maintained, and the additional data 422 occupying (mn)% of the process is recovered.

[0071] As described above, since the master data 421 of the process is not recovered and maintained in the RAM, when the corresponding process is re-executed later, the memory recovery operation according to the KSD can still use the master data 421 maintained in the RAM. Therefore, when the corresponding process is re-executed, the KSD has a relatively fast response speed and a relatively high memory recovery efficiency.

[0072] On the other hand, since the KSD needs to distinguish the main data 421 and the additional data 422 in the process data loaded into the RAM, the load of the processor is relatively high and the memory recovery rate is relatively slow.

[0073] Figure 5 is an exemplary diagram illustrating a principle in which a display device according to an embodiment of the present disclosure performs LMK.

[0074] like Figure 5 As shown, the bar graph indicating step 510 before memory recovery indicates the used capacity currently occupied by various processes of the display device in the total capacity of the RAM. Assuming that the total capacity of the entire storage area of ​​the RAM is 100%, the used capacity 511 of the RAM occupied by the process in step 510 is m%, and the available capacity 512 of the RAM is (100-m)%.

[0075] Unlike KSD, LMK does not distinguish between main data and additional data in process data loaded into RAM. LMK is a method of recovering memory by removing from RAM all data of processes having lower importance among processes loaded into RAM. More specifically, a plurality of groups divided by predefined importance are set, and LMK is a method of identifying a process belonging to a low importance group among the plurality of groups and recovering data of the identified process.

[0076] The display device executes LMK to perform memory recovery. According to the bar graph of step 520 after memory recovery, it can be seen that all data 511 occupying m% of the process in the previous step 510 are recycled. Figure 5 The RAM capacity is shown as 0%, which is simplified for a clear comparison with the KSD above. Figure 5 , in step 520 where LMK is applied, only the case of processes with low importance is shown.

[0077] As described above, the memory recovery operation according to the LMK requires a process in which all data of the process are recovered from the RAM, so when the corresponding process is re-executed later, the data of the corresponding process is loaded into the RAM again. Therefore, when the corresponding process is re-executed, the LMK has a relatively slow response speed and a relatively low memory recovery efficiency.

[0078] On the other hand, LMK does not distinguish between main data and additional data in the data of the process loaded into RAM, but recycles all data of the selected process according to importance, so the processor load is relatively low and the memory recovery rate is relatively fast.

[0079] The difference between KSD and LMK is as follows. KSD has a high processor load, a slow memory recovery rate, a high memory recovery efficiency, and a relatively fast response speed when re-executing a process after memory recovery. On the other hand, LMK has a low processor load, a fast memory recovery rate, a low memory recovery efficiency, and a relatively slow response speed when re-executing a process after memory recovery.

[0080] Therefore, when the load of the processor is high during the memory recovery operation, KSD may cause the processor to be overloaded, so LMK that can quickly recover the memory has an advantage over KSD. On the other hand, even if KSD is performed during the memory recovery operation, if the processor can withstand the load, KSD may be more advantageous than LMK with low memory recovery efficiency.

[0081] When two memory recovery methods KSD and LMK are applied to a display device according to an embodiment of the present disclosure, the display device operates as follows.

[0082] Figure 6 is a flowchart of a method of selectively performing KSD and LMK by a display device according to an embodiment of the present disclosure.

[0083] Reference Figure 6 , the following operations are performed by a kernel installed in the display device or a processor driving the corresponding kernel.

[0084] In step 610 , the display device detects an event that the available capacity of the RAM is lower than a first threshold.

[0085] In step 620, the display device checks the current load level of the processor.

[0086] In step 630 , the display device checks whether the checked current load level of the processor is greater than a second threshold value.

[0087] If the current load level of the processor is greater than the second threshold, then in step 640 , the display device executes LMK to perform memory recovery.

[0088] On the other hand, if the current load level of the processor is not greater than the second threshold, in step 650, the display device executes KSD to perform memory recovery.

[0089] The present embodiment describes the case where two types of LMK and KSD are applied, but even when three or more types of various memory recovery operations are applied, the idea of ​​the present disclosure can be performed according to the same principle as the present embodiment.

[0090] However, in some cases, even by the above-mentioned memory recovery method, the available capacity of the RAM cannot be fully ensured, and the available capacity of the RAM may be lower than the above-mentioned case. In this case, the display device ensures the available capacity of the RAM as quickly as possible by executing KSD and LMK together. Hereinafter, these embodiments will be described.

[0091] Figure 7 is a diagram showing a temporal variation trend of available capacity of a RAM in a display device according to an embodiment of the present disclosure.

[0092] like Figure 7 As shown, the available capacity of RAM changes with time. In this figure, the horizontal axis represents time and the vertical axis represents the available capacity of RAM. Regarding the unit, the time unit can be clocks, and the available capacity unit of RAM can be bytes, but each unit can be used for convenience, and various other units can be applied.

[0093] Two thresholds are preset in the display device, such as a first threshold h1 and a second threshold h2 greater than the first threshold. The first threshold h1 and the second threshold h2 can be determined by various experiments in the manufacturing process. The two thresholds are used as triggers for the memory recovery operation.

[0094] If it is determined that the available capacity of the RAM at the first time t1 is reduced to the second threshold value h2 or less, the display device selectively performs KSD or LMK in response to the current operation load of the display device (710). This operation is based on the same principle as in the previous embodiment, and therefore its detailed description is omitted. If the available capacity of the RAM is increased again to be greater than the second threshold value h2 by performing KSD or LMK, the display device ends the memory recovery operation.

[0095] However, depending on the state of the display device, the available capacity of the RAM may be reduced to the first threshold value h1 or lower at the second time t2 despite the execution of KSD or LMK. If it is determined that this is the case, the display device performs a memory recovery operation by executing KSD and LMK together. Thereafter, when the available capacity of the RAM becomes a value between the first threshold value h1 and the second threshold value h2, the display device selectively executes KSD or LMK in response to the current operating load of the display device, and when the available capacity of the RAM increases again to be greater than the second threshold value h2, the display device ends the memory recovery operation.

[0096] The method of executing KSD and LMK together makes it possible to more quickly and secure the available capacity of RAM without increasing the operating load of the display device. For example, while distinguishing main data and additional data according to KSD for a process with higher importance, the display device first quickly performs memory recovery according to LMK for a process with relatively lower importance, and then performs memory recovery for the distinguished additional data.

[0097] According to this method, the display device can cope with a situation in which the available capacity of the RAM is reduced despite the memory recovery operation.

[0098] On the other hand, the previous embodiments have described the case where two memory recovery operations are selectively used in response to the load of the processor, but the spirit of the present disclosure can be extended to the case where three or more memory recovery operations are selectively used. Hereinafter, these embodiments will be described.

[0099] Figure 8 is an exemplary diagram illustrating a principle of selecting a memory recovery operation corresponding to a usage rate of a processor of a display device according to an embodiment of the present disclosure.

[0100] Reference Figure 8 , the usage rate of the processor can be expressed as being in the range between 0% and 100%. In the usage rate of the processor, a preset p% and r% greater than p% are preset in the display device. The values ​​of these p and r are positive numbers and can be determined by experiments during the manufacturing process of the display device. Through this setting, the usage rate of the processor can be divided into a first range between 0% and p%, a second range between p% and r%, and a third range between r% and 100%.

[0101] On the other hand, the plurality of memory recovery operations include the following three different types: a first memory recovery operation, a second memory recovery operation having a faster memory recovery rate than the first memory recovery operation, and a third memory recovery operation having a faster memory recovery rate than the second memory recovery operation. That is, among the three memory recovery operations, the first memory recovery operation has the highest processor load and memory recovery efficiency. In the second memory recovery operation, the representation values ​​of the three metrics of processor load, memory recovery rate, and memory recovery efficiency are between the first memory recovery operation and the third memory recovery operation.

[0102] The display device performs a first memory recovery operation when the current load level of the processor is within a first range, performs a second memory recovery operation when the current load level of the processor is within a second range, and performs a third memory recovery operation when the current load level of the processor is within a third range.

[0103] That is, when the current load level of the processor is relatively low, the display device executes a first memory recovery operation having the slowest memory recovery rate among multiple memory recovery operations; when the current load level of the processor is medium, the display device executes a second memory recovery operation having a medium memory recovery rate; when the current load level of the processor is high, the display device executes a third memory recovery operation having the fastest memory recovery rate.

[0104] Therefore, the display device may selectively perform three or more memory recovery operations in response to the current load of the processor.

[0105] The operation of the device as described in the above embodiment can be performed by artificial intelligence installed in the device. Artificial intelligence can be applied to various systems using machine learning algorithms. An artificial intelligence system is a computer system that realizes intelligence corresponding to or equivalent to the human level, and is a system in which a machine, device or system autonomously performs learning and determination, and the recognition rate and determination accuracy are improved based on the accumulation of usage experience. Artificial intelligence technology includes machine learning (deep learning) technology that uses algorithms to classify / learn the features of input data, element technology that uses machine learning algorithms to simulate the recognition, determination and other functions of the human brain, etc.

[0106] Examples of element technologies include language understanding technology for recognizing human language / characters, visual understanding technology for recognizing objects like human vision, reasoning / prediction technology for logically reasoning and predicting information by determining the information, knowledge expression technology for processing human experience information with knowledge data, or at least one of motion control technology for controlling vehicle autonomous driving and robot movement.

[0107] Language understanding is the technology of recognizing and applying / processing human language / characters, and includes natural language processing, machine translation, dialogue systems, question and answer, speech recognition / synthesis, etc.

[0108] Reasoning / prediction is the technology of determining information, logically inferring and predicting information, and includes knowledge / probability-based reasoning, optimization prediction, preference-based planning, recommendations, etc.

[0109] Knowledge representation is a technology that automates and processes human experience information into knowledge data, and includes knowledge establishment (data generation / classification), knowledge management (data utilization), and the like.

[0110] The method according to the embodiment of the present disclosure can be implemented in the form of a program command that can be executed by various computer devices and can be recorded in a computer-readable recording medium. The computer-readable recording medium may include a separate program command, a data file, a data structure, etc., or a combination thereof. For example, the computer-readable recording medium may be stored in a volatile or non-volatile memory such as a read-only memory (ROM), a memory such as a random access memory (RAM), a memory chip, a device, or an integrated circuit; or an optically or magnetically readable and machine (e.g., computer) readable storage medium such as a compact disc (CD), a digital versatile disk (DVD), a disk, a tape, etc., regardless of whether the data is erasable or rewritable. It may be suitable that the memory that may be included in the mobile terminal is an example of a storage medium suitable for storing one or more programs, the program including instructions for implementing the embodiment of the present disclosure and being readable by the machine. The program instructions recorded in the storage medium may be specially designed and constructed for the present disclosure, or may be known and available to a technician in the field of computer software.

Claims

1. An electronic device, comprising: Memory; as well as Processor, configured as: executing a process based on data loaded into said memory, Based on the available capacity of the memory being lower than a first capacity threshold, checking a current usage rate of the processor, and based on the current usage rate of the processor being greater than a usage rate threshold, performing a first memory recovery operation having a first memory recovery rate, and based on the current usage rate of the processor being not greater than the usage rate threshold, performing a second memory recovery operation having a second memory recovery rate that is slower than the first memory recovery rate of the first memory recovery operation, and After performing one of the first memory recovery operation and the second memory recovery operation, based on an available capacity of the memory being lower than a second capacity threshold, performing the first memory recovery operation and the second memory recovery operation together, the second capacity threshold being lower than the first capacity threshold, and The first memory recovery operation includes an operation of recovering from the memory all data loaded into the memory to execute a process of low importance so as to increase the available capacity of the memory, and the second memory recovery operation includes an operation of recovering from the memory an additional data portion other than main data of the data loaded into the memory so as to increase the available capacity of the memory.

2. The electronic device according to claim 1, wherein: The current usage rate of the processor includes a current operating load level of the processor.

3. The electronic device according to claim 1, wherein: The first memory recovery operation performs memory recovery based on the low memory killer LMK, and The second memory recovery operation performs memory recovery based on a kernel swap daemon KSD.

4. The electronic device according to claim 1, wherein: The second memory recovery operation includes: classifying the data loaded into the memory according to preset importance, and performing memory recovery on some of the classified data according to the classification result.

5. The electronic device according to claim 1, wherein: The processor is further configured to: Based on the available capacity of the memory being lower than the first capacity threshold and the current usage of the processor being greater than the usage threshold, performing the first memory recovery operation, and Based on the fact that the available capacity of the memory is lower than the first capacity threshold and the current usage rate of the processor is not greater than the usage rate threshold, the second memory recovery operation is performed.

6. The electronic device according to claim 1, wherein: The processor is also configured to: after executing the first memory recovery operation and the second memory recovery operation together, perform one of the first memory recovery operation and the second memory recovery operation based on the available capacity of the memory being lower than the first capacity threshold and greater than or equal to the second capacity threshold.

7. A method for controlling an electronic device, comprising: executing a process based on data loaded into a memory of the electronic device; Based on the available capacity of the memory being lower than a first capacity threshold, checking a current usage rate of a processor of the electronic device, and based on the current usage rate of the processor of the electronic device being greater than a usage rate threshold, performing a first memory recovery operation having a first memory recovery rate, and based on the current usage rate of the processor of the electronic device being not greater than the usage rate threshold, performing a second memory recovery operation having a second memory recovery rate that is slower than the first memory recovery rate of the first memory recovery operation, and After performing one of the first memory recovery operation and the second memory recovery operation, based on an available capacity of the memory being lower than a second capacity threshold, performing the first memory recovery operation and the second memory recovery operation together, the second capacity threshold being lower than the first capacity threshold, and The first memory recovery operation includes an operation of recovering from the memory all data loaded into the memory to execute a process of low importance so as to increase the available capacity of the memory, and the second memory recovery operation includes an operation of recovering from the memory an additional data portion other than main data of the data loaded into the memory so as to increase the available capacity of the memory.

8. The control method according to claim 7, wherein: The current usage rate of the processor includes a current operating load level of the processor.

9. The control method according to claim 7, wherein: The first memory recovery operation performs memory recovery based on the low memory killer LMK, and The second memory recovery operation performs memory recovery based on a kernel swap daemon KSD.

10. The control method according to claim 7, wherein: The second memory recovery operation includes: classifying the data loaded into the memory according to preset importance, and performing memory recovery on some of the classified data according to the classification result.

11. The control method according to claim 7, wherein: Executing the first memory recovery operation includes: based on the available capacity of the memory being lower than the first capacity threshold and the current usage rate of the processor being greater than the usage rate threshold, executing the first memory recovery operation, and The performing of the second memory recovery operation includes: performing the second memory recovery operation based on that the available capacity of the memory is lower than the first capacity threshold and the current usage rate of the processor is not greater than the usage rate threshold.

12. The control method according to claim 7, further comprising: After performing the first memory recovery operation and the second memory recovery operation together, one of the first memory recovery operation and the second memory recovery operation is performed based on the available capacity of the memory being lower than the first capacity threshold and greater than or equal to the second capacity threshold.

Citation Information

Patent Citations

  • Method and device thereof for reclaiming memory

    CN101833512A

  • Dynamic configuration of compressed virtual memory

    WO2018000128A1