WO2022030774A1 - 메모리 관리 방법 및 전자 장치 - Google Patents

메모리 관리 방법 및 전자 장치 Download PDF

Info

Publication number
WO2022030774A1
WO2022030774A1 PCT/KR2021/008712 KR2021008712W WO2022030774A1 WO 2022030774 A1 WO2022030774 A1 WO 2022030774A1 KR 2021008712 W KR2021008712 W KR 2021008712W WO 2022030774 A1 WO2022030774 A1 WO 2022030774A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory
electronic device
processor
situation
capacity
Prior art date
Application number
PCT/KR2021/008712
Other languages
English (en)
French (fr)
Inventor
송지섭
권지만
김학열
박재현
신주용
이동욱
Original Assignee
삼성전자 주식회사
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 삼성전자 주식회사 filed Critical 삼성전자 주식회사
Publication of WO2022030774A1 publication Critical patent/WO2022030774A1/ko
Priority to US18/106,131 priority Critical patent/US20230185458A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0616Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/18Handling requests for interconnection or transfer for access to memory bus based on priority control
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0634Configuration or reconfiguration of storage systems by changing the state or mode of one or more devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0653Monitoring storage devices or systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • 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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping

Definitions

  • Various embodiments of the present disclosure relate to a memory management method and an electronic device.
  • the electronic device may terminate at least one application running in the background to secure the memory capacity.
  • the electronic device needs to detect a memory shortage situation within a limited memory capacity and apply an appropriate solution in response to the memory shortage situation.
  • the electronic device may set a criterion for detecting a situation in which the memory is insufficient.
  • the electronic device may collect information related to an application program being executed, time information, and/or log information, and utilize the collected information to provide a solution to the memory insufficient situation can be provided to users.
  • Various embodiments of the present disclosure may provide a memory management method and an electronic device implementing the same by detecting a memory insufficient situation in an electronic device and proposing an appropriate solution in response to the detected situation.
  • An electronic device may include a memory management module, a processor operatively connected to the memory management module, and a memory controlled by the memory management module and operatively connected to the processor.
  • the processor executes the at least one process, checks a rate at which the at least one process is terminated based on a preset first cycle, and the determined rate is a first threshold value It is possible to detect a situation exceeding
  • a rate at which the at least one process is terminated is checked based on an operation of executing at least one process under the control of a memory management module for managing a memory of the electronic device, and a preset first cycle and detecting a situation in which the checked ratio exceeds a first threshold value, and performing a reboot operation when the detected situation continuously occurs and exceeds a second threshold value.
  • Various embodiments of the present invention may detect a memory shortage situation and flexibly cope with the memory shortage situation by applying a preset solution in response to the detected memory shortage situation.
  • the electronic device may collect context information, time information, and information about a running application program in a memory shortage situation, and may appropriately apply the collected information to a solution based on the collected information.
  • various effects directly or indirectly identified through this document may be provided.
  • FIG. 1 is a block diagram of an electronic device in a network environment according to various embodiments of the present disclosure
  • FIG. 2 is a block diagram of a program module according to various embodiments of the present invention.
  • FIG. 3 is a block diagram illustrating a process of detecting a memory shortage situation in a kernel space and a user space according to various embodiments of the present invention.
  • FIG. 4 is an exemplary diagram illustrating a process of detecting a memory shortage condition based on one cycle according to various embodiments of the present disclosure.
  • FIG. 5 is a flowchart illustrating a memory management method according to a memory shortage situation according to various embodiments of the present disclosure.
  • FIG. 6 is a flowchart illustrating a method of managing a memory in consideration of a memory capacity according to various embodiments of the present disclosure.
  • FIG. 7A is an exemplary diagram illustrating a method of detecting a rate at which a process is terminated based on one cycle according to various embodiments of the present disclosure.
  • FIG. 7B is a table in which a process termination rate is applied differently based on a memory capacity according to various embodiments of the present disclosure
  • 8A is an exemplary diagram illustrating a method of detecting a rate at which a packaged process is terminated based on one cycle according to various embodiments of the present disclosure
  • 8B is a table for confirming whether a corresponding program is terminated based on a packaged process according to various embodiments of the present invention.
  • FIG. 1 is a block diagram of an electronic device 101 in a network environment 100 according to various embodiments.
  • an electronic device 101 communicates with an electronic device 102 through a first network 198 (eg, a short-range wireless communication network) or a second network 199 . It may communicate with the electronic device 104 or the server 108 through (eg, a long-distance wireless communication network). According to an embodiment, the electronic device 101 may communicate with the electronic device 104 through the server 108 .
  • a first network 198 eg, a short-range wireless communication network
  • a second network 199 e.g., a second network 199
  • the electronic device 101 may communicate with the electronic device 104 through the server 108 .
  • the electronic device 101 includes a processor 120 , a memory 130 , an input module 150 , a sound output module 155 , a display module 160 , an audio module 170 , and a sensor module ( 176), interface 177, connection terminal 178, haptic module 179, camera module 180, power management module 188, battery 189, communication module 190, subscriber identification module 196 , or an antenna module 197 may be included.
  • at least one of these components eg, the connection terminal 178
  • may be omitted or one or more other components may be added to the electronic device 101 .
  • some of these components are integrated into one component (eg, display module 160 ). can be
  • the processor 120 for example, executes software (eg, a program 140) to execute at least one other component (eg, a hardware or software component) of the electronic device 101 connected to the processor 120 . It can control and perform various data processing or operations. According to one embodiment, as at least part of data processing or operation, the processor 120 converts commands or data received from other components (eg, the sensor module 176 or the communication module 190 ) to the volatile memory 132 . may be stored in the volatile memory 132 , and may process commands or data stored in the volatile memory 132 , and store the result data in the non-volatile memory 134 .
  • software eg, a program 140
  • the processor 120 converts commands or data received from other components (eg, the sensor module 176 or the communication module 190 ) to the volatile memory 132 .
  • the volatile memory 132 may be stored in the volatile memory 132 , and may process commands or data stored in the volatile memory 132 , and store the result data in the non-volatile memory 134 .
  • the processor 120 is the main processor 121 (eg, a central processing unit or an application processor) or a secondary processor 123 (eg, a graphic processing unit, a neural network processing unit) a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor).
  • the main processor 121 e.g, a central processing unit or an application processor
  • a secondary processor 123 eg, a graphic processing unit, a neural network processing unit
  • NPU neural processing unit
  • an image signal processor e.g., a sensor hub processor, or a communication processor.
  • the main processor 121 e.g, a central processing unit or an application processor
  • a secondary processor 123 eg, a graphic processing unit, a neural network processing unit
  • NPU neural processing unit
  • an image signal processor e.g., a sensor hub processor, or a communication processor.
  • the main processor 121 e.g, a central processing unit or an application processor
  • a secondary processor 123
  • the auxiliary processor 123 is, for example, on behalf of the main processor 121 while the main processor 121 is in an inactive (eg, sleep) state, or the main processor 121 is active (eg, executing an application). ), together with the main processor 121, at least one of the components of the electronic device 101 (eg, the display module 160, the sensor module 176, or the communication module 190) It is possible to control at least some of the related functions or states.
  • the co-processor 123 eg, an image signal processor or a communication processor
  • may be implemented as part of another functionally related component eg, the camera module 180 or the communication module 190. have.
  • the auxiliary processor 123 may include a hardware structure specialized for processing an artificial intelligence model.
  • Artificial intelligence models can be created through machine learning. Such learning may be performed, for example, in the electronic device 101 itself on which artificial intelligence is performed, or may be performed through a separate server (eg, the server 108).
  • the learning algorithm may include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but in the above example not limited
  • the artificial intelligence model may include a plurality of artificial neural network layers.
  • Artificial neural networks include deep neural networks (DNNs), convolutional neural networks (CNNs), recurrent neural networks (RNNs), restricted boltzmann machines (RBMs), deep belief networks (DBNs), bidirectional recurrent deep neural networks (BRDNNs), It may be one of deep Q-networks or a combination of two or more of the above, but is not limited to the above example.
  • the artificial intelligence model may include, in addition to, or alternatively, a software structure in addition to the hardware structure.
  • the memory 130 may store various data used by at least one component of the electronic device 101 (eg, the processor 120 or the sensor module 176 ).
  • the data may include, for example, input data or output data for software (eg, the program 140 ) and instructions related thereto.
  • the memory 130 may include a volatile memory 132 or a non-volatile memory 134 .
  • the program 140 may be stored as software in the memory 130 , and may include, for example, an operating system 142 , middleware 144 , or an application 146 .
  • the input module 150 may receive a command or data to be used in a component (eg, the processor 120 ) of the electronic device 101 from the outside (eg, a user) of the electronic device 101 .
  • the input module 150 may include, for example, a microphone, a mouse, a keyboard, a key (eg, a button), or a digital pen (eg, a stylus pen).
  • the sound output module 155 may output a sound signal to the outside of the electronic device 101 .
  • the sound output module 155 may include, for example, a speaker or a receiver.
  • the speaker can be used for general purposes such as multimedia playback or recording playback.
  • the receiver may be used to receive an incoming call. According to one embodiment, the receiver may be implemented separately from or as part of the speaker.
  • the display module 160 may visually provide information to the outside (eg, a user) of the electronic device 101 .
  • the display module 160 may include, for example, a control circuit for controlling a display, a hologram device, or a projector and a corresponding device.
  • the display module 160 may include a touch sensor configured to sense a touch or a pressure sensor configured to measure the intensity of a force generated by the touch.
  • the audio module 170 may convert a sound into an electric signal or, conversely, convert an electric signal into a sound. According to an embodiment, the audio module 170 acquires a sound through the input module 150 , or an external electronic device (eg, a sound output module 155 ) connected directly or wirelessly with the electronic device 101 . A sound may be output through the electronic device 102 (eg, a speaker or headphones).
  • an external electronic device eg, a sound output module 155
  • a sound may be output through the electronic device 102 (eg, a speaker or headphones).
  • the sensor module 176 detects an operating state (eg, power or temperature) of the electronic device 101 or an external environmental state (eg, user state), and generates an electrical signal or data value corresponding to the sensed state. can do.
  • the sensor module 176 may include, for example, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, It may include a temperature sensor, a humidity sensor, or an illuminance sensor.
  • the interface 177 may support one or more designated protocols that may be used by the electronic device 101 to directly or wirelessly connect with an external electronic device (eg, the electronic device 102 ).
  • the interface 177 may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.
  • HDMI high definition multimedia interface
  • USB universal serial bus
  • SD card interface Secure Digital Card
  • the connection terminal 178 may include a connector through which the electronic device 101 can be physically connected to an external electronic device (eg, the electronic device 102 ).
  • the connection terminal 178 may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (eg, a headphone connector).
  • the haptic module 179 may convert an electrical signal into a mechanical stimulus (eg, vibration or movement) or an electrical stimulus that the user can perceive through tactile or kinesthetic sense.
  • the haptic module 179 may include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
  • the camera module 180 may capture still images and moving images. According to an embodiment, the camera module 180 may include one or more lenses, image sensors, image signal processors, or flashes.
  • the power management module 188 may manage power supplied to the electronic device 101 .
  • the power management module 188 may be implemented as, for example, at least a part of a power management integrated circuit (PMIC).
  • PMIC power management integrated circuit
  • the battery 189 may supply power to at least one component of the electronic device 101 .
  • battery 189 may include, for example, a non-rechargeable primary cell, a rechargeable secondary cell, or a fuel cell.
  • the communication module 190 is a direct (eg, wired) communication channel or a wireless communication channel between the electronic device 101 and an external electronic device (eg, the electronic device 102, the electronic device 104, or the server 108). It can support establishment and communication performance through the established communication channel.
  • the communication module 190 may include one or more communication processors that operate independently of the processor 120 (eg, an application processor) and support direct (eg, wired) communication or wireless communication.
  • the communication module 190 is a wireless communication module 192 (eg, a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module 194 (eg, : It may include a LAN (local area network) communication module, or a power line communication module).
  • GNSS global navigation satellite system
  • a corresponding communication module among these communication modules is a first network 198 (eg, a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network 199 (eg, legacy It may communicate with the external electronic device 104 through a cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (eg, a telecommunication network such as a LAN or a WAN).
  • a first network 198 eg, a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)
  • a second network 199 eg, legacy It may communicate with the external electronic device 104 through a cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (eg, a telecommunication network such as a LAN or a WAN).
  • a telecommunication network
  • the wireless communication module 192 uses the subscriber information (eg, International Mobile Subscriber Identifier (IMSI)) stored in the subscriber identification module 196 within a communication network such as the first network 198 or the second network 199 .
  • the electronic device 101 may be identified or authenticated.
  • the wireless communication module 192 may support a 5G network after a 4G network and a next-generation communication technology, for example, a new radio access technology (NR).
  • NR access technology includes high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimization of terminal power and access to multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low-latency) -latency communications)).
  • eMBB enhanced mobile broadband
  • mMTC massive machine type communications
  • URLLC ultra-reliable and low-latency
  • the wireless communication module 192 may support a high frequency band (eg, mmWave band) to achieve a high data rate, for example.
  • a high frequency band eg, mmWave band
  • the wireless communication module 192 includes various technologies for securing performance in a high-frequency band, for example, beamforming, massive multiple-input and multiple-output (MIMO), all-dimensional multiplexing. It may support technologies such as full dimensional MIMO (FD-MIMO), an array antenna, analog beam-forming, or a large scale antenna.
  • the wireless communication module 192 may support various requirements specified in the electronic device 101 , an external electronic device (eg, the electronic device 104 ), or a network system (eg, the second network 199 ).
  • the wireless communication module 192 may include a peak data rate (eg, 20 Gbps or more) for realizing eMBB, loss coverage (eg, 164 dB or less) for realizing mMTC, or U-plane latency for realizing URLLC ( Example: downlink (DL) and uplink (UL) each 0.5 ms or less, or round trip 1 ms or less).
  • a peak data rate eg, 20 Gbps or more
  • loss coverage eg, 164 dB or less
  • U-plane latency for realizing URLLC
  • the antenna module 197 may transmit or receive a signal or power to the outside (eg, an external electronic device).
  • the antenna module 197 may include an antenna including a conductor formed on a substrate (eg, a PCB) or a radiator formed of a conductive pattern.
  • the antenna module 197 may include a plurality of antennas (eg, an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network such as the first network 198 or the second network 199 is connected from the plurality of antennas by, for example, the communication module 190 . can be selected. A signal or power may be transmitted or received between the communication module 190 and an external electronic device through the selected at least one antenna.
  • other components eg, a radio frequency integrated circuit (RFIC)
  • RFIC radio frequency integrated circuit
  • the antenna module 197 may form a mmWave antenna module.
  • the mmWave antenna module comprises a printed circuit board, an RFIC disposed on or adjacent to a first side (eg, bottom side) of the printed circuit board and capable of supporting a designated high frequency band (eg, mmWave band); and a plurality of antennas (eg, an array antenna) disposed on or adjacent to a second side (eg, top or side) of the printed circuit board and capable of transmitting or receiving signals of the designated high frequency band. can do.
  • peripheral devices eg, a bus, general purpose input and output (GPIO), serial peripheral interface (SPI), or mobile industry processor interface (MIPI)
  • GPIO general purpose input and output
  • SPI serial peripheral interface
  • MIPI mobile industry processor interface
  • the command or data may be transmitted or received between the electronic device 101 and the external electronic device 104 through the server 108 connected to the second network 199 .
  • Each of the external electronic devices 102 or 104 may be the same as or different from the electronic device 101 .
  • all or a part of operations executed in the electronic device 101 may be executed in one or more external electronic devices 102 , 104 , or 108 .
  • the electronic device 101 may perform the function or service itself instead of executing the function or service itself.
  • one or more external electronic devices may be requested to perform at least a part of the function or the service.
  • One or more external electronic devices that have received the request may execute at least a part of the requested function or service, or an additional function or service related to the request, and transmit a result of the execution to the electronic device 101 .
  • the electronic device 101 may process the result as it is or additionally and provide it as at least a part of a response to the request.
  • cloud computing distributed computing, mobile edge computing (MEC), or client-server computing technology may be used.
  • the electronic device 101 may provide an ultra-low latency service using, for example, distributed computing or mobile edge computing.
  • the external electronic device 104 may include an Internet of things (IoT) device.
  • Server 108 may be an intelligent server using machine learning and/or neural networks.
  • the external electronic device 104 or the server 108 may be included in the second network 199 .
  • the electronic device 101 may be applied to an intelligent service (eg, smart home, smart city, smart car, or health care) based on 5G communication technology and IoT-related technology.
  • FIG. 2 is a block diagram of a program module according to various embodiments of the present invention.
  • the program module 210 (eg, the program 140 of FIG. 1 ) is an operating system and/or operating system that controls resources related to an electronic device (eg, the electronic device 101 of FIG. 1 ). It may include various applications 270 (eg, the application 146 of FIG. 1 ) running on the .
  • the operating system may include, for example, Android TM , iOS TM , Windows TM , Symbian TM , Tizen TM , or Bada TM .
  • the program module 210 includes a kernel 220 , middleware 230 (eg, middleware 144 of FIG. 1 ), API 260 , and/or application 270 (eg, FIG. 1 ). 1 application 146). At least a portion of the program module 210 is preloaded on the electronic device 101 or can be downloaded from an external electronic device (eg, the electronic devices 102 and 104 and/or the server 106 ).
  • the kernel 220 may include a system resource manager 221 and/or a device driver 223 .
  • the system resource manager 221 may control, allocate, or recover system resources.
  • the system resource manager 221 may include a process manager, a memory manager, or a file system manager.
  • the system resource manager 221 located in the kernel space includes a memory management module (eg, LMKD, low memory killer demon) 330 for managing the memory (eg, the memory 130 of FIG. 1 ).
  • the memory management module 330 may be defined as a memory management unit.
  • the memory management module 330 may detect whether the memory is insufficient based on the capacity of the memory 130 .
  • the memory management module 330 may determine whether to terminate at least one application program using the memory 130 .
  • the memory management module 330 may determine whether to terminate at least one process related to the application program residing in the memory 130 .
  • the memory management module 330 may terminate at least one process allocated to the memory 130 when the memory is insufficient, and may perform an operation for securing the memory 130 .
  • the memory management module 330 may terminate at least one process currently residing in the memory 130 when a situation in which an available memory needs to be secured for execution of a specific process occurs. When a corresponding condition is satisfied based on a preset condition, the memory management module 330 may terminate at least one process to secure available memory.
  • the device driver 223 included in the kernel 220 may include, for example, a display driver, a camera driver, a Bluetooth driver, a shared memory driver, a USB driver, a keypad driver, a WiFi driver, an audio driver, or It may include an inter-process communication (IPC) driver.
  • IPC inter-process communication
  • the middleware 230 provides, for example, a function commonly required by the applications 270 or API 260 so that the applications 270 can use limited system resources inside the electronic device. ), various functions may be provided to the application 270 .
  • the middleware 230 includes a runtime library 235 , an application manager 241 , a window manager 242 , a multimedia manager 243 , a resource manager 244 , a power manager 245 , and a database manager ( 246 ), a package manager 247 , a connectivity manager 248 , a notification manager 249 , a location manager 250 , a graphics manager 251 , and/or a security manager 252 . have.
  • the middleware 230 may include a runtime library 235 .
  • the runtime library 235 may include, for example, a library module used by the compiler to add a new function through a programming language while the application 270 is being executed.
  • the runtime library 235 may perform input/output management, memory management, or arithmetic function processing.
  • the application manager 241 may manage, for example, the life cycle of the application 270 .
  • the window manager 242 may manage graphic user interface (GUI) resources used in the screen.
  • the multimedia manager 243 may identify a format required to reproduce the media files, and may encode or decode the media files using a codec suitable for the format.
  • the resource manager 244 may manage the space of the source code or memory of the application 270 .
  • the power manager 245 may, for example, manage the capacity or power of a battery and provide power information required for the operation of the electronic device. According to an embodiment, the power manager 245 may interwork with a basic input/output system (BIOS).
  • BIOS basic input/output system
  • the database manager 246 may create, search, or change a database to be used in the application 270 , for example.
  • the package manager 247 may manage installation or update of an application distributed in the form of a package file.
  • the connectivity manager 248 may manage wireless connections, for example.
  • the notification manager 249 may provide, for example, an event such as an arrival message, an appointment, and a proximity notification to the user.
  • the location manager 250 may manage location information of the electronic device, for example.
  • the graphic manager 251 may manage a graphic effect to be provided to a user or a user interface related thereto, for example.
  • Security manager 252 may provide, for example, system security or user authentication.
  • the middleware 230 may include a telephony manager for managing the voice or video call function of the electronic device or a middleware module capable of forming a combination of functions of the above-described components. .
  • the middleware 230 may provide a module specialized for each type of operating system.
  • the middleware 230 may dynamically delete some existing components or add new components.
  • the API 260 is, for example, a set of API programming functions, and may be provided in different configurations depending on the operating system. For example, in the case of Android or iOS, one API set may be provided for each platform, and in the case of Tizen, two or more API sets may be provided for each platform.
  • the application 270 may include, for example, a home 271 , a dialer 272 , an SMS/MMS 273 , an instant message (IM) 274 , a browser 275 , a camera 276 , and an alarm 277 . , contact (278), voice dial (279), email (280), calendar (281), media player (282), album (283), watch (284), health care (e.g. measuring exercise volume or blood sugar, etc.) , and/or environment information (eg, barometric pressure, humidity, or temperature information) providing application.
  • the application 270 may include an information exchange application capable of supporting information exchange between the electronic device 101 and the external electronic devices 102 and 104 .
  • the notification delivery application transmits notification information generated by another application of the electronic device 101 to the external electronic devices 102 and 104 or receives notification information from the external electronic devices 102 and 104 to allow the user can be provided to
  • At least a portion of the program module 210 may be implemented (eg, executed) in software, firmware, hardware, or a combination of at least two or more thereof, and a module, program, It may include a routine, instruction set, or process.
  • FIG. 3 is a block diagram illustrating a process of detecting a memory shortage situation in the kernel area 310 and the user area 320 according to various embodiments of the present disclosure.
  • a kernel area 310 and a user area 320 may be divided on a memory address space in which the program module 210 is stored, and a memory (eg, FIG. 1 ) in each area A process for detecting a situation in which the memory 130 is insufficient is shown.
  • the kernel region 310 may be defined as the kernel 220 included in the program module 210 of FIG. 2 .
  • the memory management module 330 eg, LMKD, low memory killer daemon
  • the memory management module 330 of FIG. 2 included in the kernel area 310 is the system resource manager of FIG. 2 . (221) may be included.
  • the user area 320 may include an area that is at least partially controlled by the user.
  • the user area 320 may include a graphic user interface (GUI) and a framework 340 , and may provide a specific function to the user.
  • GUI graphic user interface
  • the user area 320 illustrates a process of performing an algorithm set to secure the memory 130 in the electronic device 101 when the user executes an application program through the framework 340 .
  • the memory management module 330 may detect a situation in which the memory 130 is insufficient. For example, when at least one application program is executed, at least one process related to the execution may be allocated to the memory 130 , and a situation in which available memory is insufficient may occur.
  • the memory management module 330 may detect a situation in which the memory 130 is insufficient, and may perform an operation to secure available memory.
  • the memory management module 330 can classify the degree of memory shortage into a low level, a medium level, and/or a critical level based on the capacity of the memory 130 , and detects a memory shortage situation. You can set different standards.
  • the memory management module 330 may detect a situation in which memory is insufficient (eg, a situation in which at least one process resident in the memory needs to be terminated) based on the memory capacity and the set level.
  • the memory management module 330 may check the termination condition of the currently executing process. For example, the memory management module 330 may determine whether the process is terminated within about 100 ms, whether the current available memory is in a sufficient state, and may determine whether a process termination condition is satisfied.
  • the memory management module 330 may select a process to be terminated from among at least one process allocated to the memory 130 .
  • a priority eg, a cached adj value
  • a process to be terminated may be determined based on the priority.
  • the memory management module 330 may set a reference value corresponding to a memory level (eg, a low level, a medium level, and/or a critical level), and terminate the process when the priority of the process exceeds the reference value.
  • the priority of a process running in the foreground corresponds to “0”, and the priority of a process with low importance among processes running in the background may be determined from “900-999”.
  • the memory management module 330 selects at least one process corresponding to a priority exceeding “850” when the reference value is “850” when the memory level is the medium level, and selects at least one of the selected at least one process. process can be terminated.
  • the memory management module 330 may select at least one process based on a reference value of the memory level, and in operation 357 may terminate the selected at least one process.
  • the memory management module 330 may secure available memory by terminating the at least one process.
  • the memory management module 330 may terminate at least one of at least one process allocated to the memory 130 based on a priority in order to secure available memory.
  • the memory management module 330 may count at least one terminated process. For example, the memory management module 330 may count the terminated process based on the reference value of the memory level. For example, when the reference value is “850”, processes that are terminated in response to “850” may be counted, and when the reference value is “700”, processes that are terminated in response to “700” may be counted.
  • the memory management module 330 may manage count information based on each reference value.
  • the processor of the electronic device 101 has capacity and/or availability of a memory (eg, the memory 130 of FIG. 1 , the DRAM main memory) at boot time.
  • a capacity may be checked, and a first threshold value (eg, a reference value) may be determined based on the checked capacity and/or available capacity of the memory 130 .
  • the processor 120 may check the memory capacity and/or available capacity in a code generation step (eg, an initialization step) of the framework 340 , and set a first threshold value.
  • the electronic device 101 may count a situation in which at least one process allocated to the memory 130 is terminated based on the first threshold value.
  • the electronic device 101 may execute at least one process related to an application program through the framework 340 .
  • the electronic device 101 may execute an application process corresponding to at least one application program in response to a user input.
  • the electronic device 101 may detect a situation in which the memory is insufficient. For example, when at least one process related to an application program is executed in operation 361 of FIG. 3 , a memory insufficient situation may be detected in operation 351 .
  • the electronic device 101 provides the memory management module 330 through the framework 340 with count information (eg, the number of times the process is terminated according to a memory shortage situation, the number of times the process is terminated according to the adj value of the process, count) may be requested, and count information may be obtained from the memory management module 330 .
  • the memory management module 330 may transmit the count information recorded based on the reference value to the framework 340 in operation 359 .
  • the electronic device 101 cannot directly refer to the count information managed by the memory management module 330, but may obtain it by requesting the count information from the memory management module 330.
  • the electronic device 101 may request count information based on the reference value of the memory level and may obtain the corresponding count information.
  • the memory management module 330 may terminate at least one process exceeding the reference value, and record count information corresponding to an adj value (eg, a cached adj value) corresponding to the at least one process. can do.
  • the memory management module 330 may provide count information recorded for each adj value in response to a request for count information.
  • the electronic device 101 may store the count information obtained from the memory management module 330 in the memory 130 .
  • the electronic device 101 may continuously acquire count information and compare and analyze it with previously acquired count information. For example, if at least one process residing in the memory 130 is terminated as at least one application process is executed, the electronic device 101 may increase the acquired count information by 1. For example, the electronic device 101 may terminate at least one process having an adj value of “700” among at least one process residing in the memory 130 , and receive count information corresponding to the adj value “700” It can be increased by 1. Even if a plurality of processes having an adj value of “700” are terminated, count information corresponding to the adj value “700” may increase by 1.
  • the electronic device 101 calculates a rate at which at least one process is terminated based on one cycle (eg, a first cycle). For example, a cycle in which the application program is executed 50 times may be determined as one cycle. The rate at which the at least one process is terminated may be defined as a rate occupied by the number of times the process is terminated based on one cycle. According to an embodiment, the electronic device 101 may calculate a rate at which a process is terminated during one cycle based on the count information.
  • the electronic device 101 may determine whether the calculated ratio exceeds a threshold value.
  • a situation in which a process termination rate exceeds a threshold value may be defined as a memory critical situation.
  • the threshold value may be determined based on the capacity of the memory. For example, as the capacity of the memory increases, the threshold value may decrease.
  • a memory shortage condition may frequently occur, and as the condition frequently occurs, a memory critical condition may occur.
  • the electronic device 101 may determine whether the memory critical situation in operation 369 has occurred four or more times consecutively. For example, when a memory critical situation occurs, the processor 120 may transmit the occurrence information to a memory management program (eg, a healthcare application program), and through the memory management program, the number of occurrences of the memory critical situation can be counted.
  • a situation in which a memory critical situation occurs four times in a row may be defined as a memory critical low situation.
  • the memory critical low situation may be a situation in which it is difficult to secure available memory, and a situation in which a memory shortage problem is continuously caused.
  • the processor 120 reboots the electronic device 101 or initializes the memory 130 to provide a solution for securing available memory to the user. can guide
  • the processor 120 may perform a restoration operation (eg, rebooting the electronic device 101 and displaying a user interface for the restoration operation) in response to the occurrence of a memory critical low situation.
  • a restoration operation eg, rebooting the electronic device 101 and displaying a user interface for the restoration operation
  • the processor 120 may reboot the electronic device 101 through a restoration program (eg, a restoration application program) or may set a reboot time point by providing a user interface.
  • the restoration program may display a user interface that guides the restoration operation, and may provide various options such as "reboot immediately", "reboot late at night", and "setting of a reboot point".
  • the electronic device 101 may display a guide for performing a set solution (eg, a restoration operation) on the screen, and in response to the user's selection, the solution can decide whether to perform
  • a processor 120 operatively connected to the memory management module 330 , and the memory management module 303 , It may include a memory 130 operatively connected to the processor 120 .
  • the processor 120 executes the at least one process, checks a rate at which the at least one process is terminated based on a preset first cycle, and the checked A situation in which the ratio exceeds the first threshold value is detected, and when the detected situation continuously occurs and exceeds the second threshold value, instructions for rebooting the electronic device 101 may be stored.
  • the processor 120 may check the capacity of the memory 130 , and set the first threshold value based on the checked capacity of the memory 130 .
  • the processor 120 checks the capacity of the memory 130 , groups the at least one process into a package based on the checked capacity of the memory 130 , and the package is re-executed. In this case, the number of executions related to the re-execution may not be reflected in the rate at which the package is terminated. For example, at least one process performed in response to the execution of a specific application program may be grouped into one package. According to an embodiment, a package may be defined as a package managed by the package manager 247 of FIG. 2 .
  • the processor 120 checks the package-based termination rate based on the first cycle, and when the checked package-based termination rate exceeds a third threshold, the electronic device can be rebooted.
  • the third threshold is characterized in that it is about 50%.
  • the processor 120 determines that the memory 130 is insufficient, and the at least one process can be terminated.
  • the processor 120 checks the priority of the at least one process allocated to the memory 130 , selects the at least one process based on the checked priority, and At least one selected process may be terminated.
  • the processor 120 continuously causes a problem in the memory 130 when a situation in which the checked ratio exceeds the first threshold value continuously exceeds the second threshold value.
  • the electronic device may be rebooted to initialize the memory 130 after confirming that the state has occurred.
  • the processor 120 checks the rate at which the at least one process is terminated based on a second cycle when a situation in which the checked rate exceeds the first threshold does not occur continuously.
  • the electronic device 101 further includes a display module 160 for displaying the reboot-related user interface, and the processor 120 determines that the detected situation exceeds the second threshold value.
  • a guide may be displayed through the display module 160 , and the electronic device may be rebooted in response to a user input corresponding to the guide.
  • the processor 120 may check the usage pattern stored in the memory 130 , and reboot the electronic device 101 based on the checked usage pattern.
  • the electronic device 101 further includes a communication module 190 for communicating with the server 108 , and the processor 120 uses the communication module 190 to communicate with the server 108 . ) and may transmit at least one of information related to the memory 130 , log information, and time information to the server 108 .
  • the processor 120 may receive a reboot command from the server using the communication module and reboot the electronic device in response to the reboot command.
  • FIG. 4 is an exemplary diagram illustrating a process of detecting a memory shortage condition based on one cycle according to various embodiments of the present disclosure.
  • the electronic device may set a cycle in which an application program is executed 50 times as one cycle 401 .
  • the electronic device 101 may identify at least one process executed in relation to the application program executed based on the first cycle 411 .
  • the electronic device 101 may check a ratio occupied by the number of times the process is terminated (eg, the number of times the process is terminated due to insufficient memory) based on the first cycle 411 , and the checked ratio When the first threshold value is exceeded, it can be confirmed that the memory critical condition 403 has occurred.
  • the electronic device 101 may continuously perform the second cycle 412 , and when the second cycle 412 is completed, the third cycle 413 . ) can be followed.
  • the electronic device 101 may check whether a memory shortage situation (eg, a memory critical situation 403 ) has occurred based on one cycle 401 . Referring to FIG. 4 , the memory critical condition 403 did not occur in the first cycle 411 and second cycle 412 sections, and in the third cycle 413 to sixth cycle 416 sections, the memory It can be confirmed that the critical situation 403 has occurred.
  • the electronic device 101 may check a ratio occupied by the number of times of termination of at least one process based on one cycle 401 (eg, an application program is executed 50 times), and the ratio When the first threshold value is exceeded, it may be determined that the memory critical condition 403 has occurred. According to an embodiment, the electronic device 101 may determine that the memory critical low condition 405 has occurred when the memory critical condition 403 continuously occurs more than a second threshold value (eg, 4 times) or more. For example, the memory critical low situation 405 may be a situation in which memory is continuously insufficient even when at least one process is terminated. According to an embodiment, the electronic device 101 may reboot the electronic device 101 in response to the memory critical low situation 405 .
  • a second threshold value eg, 4 times
  • the electronic device 101 may display a guide for performing a reboot on the display module (eg, the display module 160 of FIG. 1 ), and the The electronic device 101 may be rebooted in response to the user's selection of the guide.
  • a guide for performing a reboot on the display module eg, the display module 160 of FIG. 1
  • the The electronic device 101 may be rebooted in response to the user's selection of the guide.
  • the first threshold value may be defined as a reference value for determining whether the memory critical condition 403 has occurred.
  • the first threshold value may be determined based on the capacity of the memory.
  • the first threshold may include 50 divided by the amount of memory (eg, 2 GB, 4 GB, and/or 8 GB).
  • the threshold value may be determined to be about 25%, and when the memory capacity is 8 GB, the threshold value may be determined to be about 12.5%.
  • an electronic device having a small memory capacity has a higher probability of terminating a process allocated to the memory 130 than an electronic device having a large memory capacity, and a reference value for determining that the memory critical condition 403 is high.
  • the electronic device 101 in which a low-capacity (eg, about 4 GB or less) memory is mounted additionally sets at least one process as a package unit, and determines the rate of completion of the package unit in the memory 130 .
  • the low-capacity electronic device 101 may determine that the memory critical condition 403 is reached when the percentage of the memory 130 that is completed in units of packages exceeds about 50%.
  • the low-capacity electronic device 101 may check a ratio occupied by a situation where at least one process is terminated based on one cycle, and check whether the ratio exceeds a first threshold value.
  • the low-capacity electronic device 101 When the ratio exceeds the first threshold, the low-capacity electronic device 101 additionally groups the process into a package unit (eg, one application program is divided into one package), and stores the process in the memory 130 . It can be checked whether or not the percentage that is finished by package exceeds about 50%. For example, when the first application program is repeatedly executed based on one cycle in a state in which the first application program is grouped in a package unit, the number of duplicate executions may not be counted. When the first application program is a high-spec program and is repeatedly executed, a plurality of processes may be temporarily terminated, and thus a memory critical situation 403 may be detected.
  • a package unit e.g, one application program is divided into one package
  • the low-capacity electronic device 101 groups at least one process in a package unit, thereby preventing an error in which the memory critical situation 403 occurs.
  • the low-capacity electronic device 101 may determine that the memory critical condition 403 is reached when the ratio of the package-by-package termination exceeds 50%.
  • the low-capacity electronic device 101 may check the memory critical condition 403 by additionally comparing and analyzing the rate of completion of each package in the memory. For example, the low-capacity electronic device 101 may prevent a temporary occurrence of the memory critical condition 403 by rechecking the memory critical condition 403 for each package.
  • FIG. 5 is a flowchart illustrating a memory management method according to a memory shortage situation according to various embodiments of the present disclosure.
  • the electronic device sets a cycle in which at least one application program is executed 50 times as one cycle, and the memory is insufficient based on one cycle ( For example, you can check whether a memory critical situation) has occurred.
  • the electronic device 101 may check a rate at which at least one process allocated to a memory (eg, the memory 130 of FIG. 1 ) is terminated based on one cycle, and the rate is set When the first threshold is exceeded, it may be determined that a memory shortage has occurred.
  • the electronic device 101 may perform a reboot operation when a memory shortage situation continuously occurs during the cycle of the second threshold value (eg, 4 times).
  • the processor of the electronic device 101 may check the rate at which at least one process allocated to the memory 130 is terminated based on the first cycle.
  • the first cycle may be defined as a cycle in which a program (eg, an application program) is executed 50 times in the electronic device 101 .
  • the processor 120 may calculate the ratio as 60% when at least one process is terminated 30 times during the first cycle.
  • the processor 120 may calculate the ratio as 20% when at least one process is terminated 10 times during the first cycle.
  • the processor 120 terminates at least one process allocated to the memory (eg, the memory 130 of FIG. 1 ) during one cycle (eg, the first cycle) in which the program is executed 50 times. can be calculated.
  • the processor 120 may determine whether the checked ratio exceeds a first threshold.
  • the first threshold value may be defined as a reference value for determining that the memory is insufficient, and may be determined based on the capacity of the memory. For example, the larger the memory capacity, the smaller the first threshold value may be set. A large memory capacity is interpreted that a memory shortage situation does not occur often, and the first threshold value may be set low to determine that a memory insufficient condition occurs.
  • the processor 120 may reboot the electronic device 101 when the number of times the checked ratio exceeds the first threshold value exceeds the second threshold value continuously.
  • a situation in which the checked ratio exceeds a first threshold value in a first cycle may be referred to as a memory critical situation.
  • the second threshold value may be a reference value for determining the number of consecutive occurrences of the memory critical condition.
  • the second threshold value may be about 4 times, and a situation in which the memory critical condition continuously occurs for 4 cycles may be referred to as a memory critical low condition.
  • the processor 120 may determine that when the memory critical condition continuously occurs for four cycles (memory critical low condition occurs), the memory shortage condition is not resolved and the memory problem continues to occur.
  • the processor 120 may perform a reboot operation to solve a memory shortage situation.
  • FIG. 6 is a flowchart illustrating a method of managing a memory in consideration of a memory capacity according to various embodiments of the present disclosure.
  • the flowchart of FIG. 6 is a flowchart of additionally determining whether the memory capacity is of a low specification (eg, 4 GB or less) and performing an additional operation in the case of the low specification, compared with FIG. 5 .
  • a low specification eg, 4 GB or less
  • the processor of the electronic device 101 may check a rate at which at least one process is terminated based on the first cycle.
  • the first cycle may be defined as a cycle in which a program (eg, an application program) is executed 50 times in the electronic device 101 .
  • the processor 120 may determine whether the checked ratio exceeds a first threshold.
  • the first threshold value may be defined as a reference value for determining that the memory is insufficient, and may be determined based on the capacity of the memory. For example, the larger the memory capacity, the smaller the first threshold value may be set.
  • a situation in which the checked ratio exceeds a first threshold value may be referred to as a memory critical situation.
  • the processor 120 may determine whether the capacity of the memory is of a low specification.
  • an electronic device having a low memory capacity may include an electronic device having a memory capacity of about 4 GB or less.
  • a memory shortage situation eg, a memory critical situation
  • the electronic device 101 equipped with a low-spec memory may additionally group at least one process allocated to the memory into a package, and check a termination rate based on the package.
  • the processor 120 continuously generates the number of times the checked ratio exceeds the first threshold value (eg, the number of issuance of a memory critical situation) to generate a second threshold You can check whether a value (eg about 4 times) is exceeded. For example, the processor 120 may determine whether a memory critical condition based on one cycle occurs continuously four or more times. The processor 120 may determine that the memory shortage has not been resolved when the memory critical condition continuously occurs during four cycle periods. According to an embodiment, the second threshold value may be 4 times, and a situation in which a memory critical condition continuously occurs for 4 cycles may be referred to as a memory critical low condition.
  • the processor 120 may transmit log information of the electronic device 101 to a server (eg, the server 108 of FIG. 1 ), and the server ( 108) may store the log information in a memory.
  • the server 108 may collect log information corresponding to a memory critical low situation, and may provide a solution corresponding to the memory critical low situation to the electronic device 101 .
  • the processor 120 may reboot when a memory critical low situation (eg, a situation in which a memory critical situation occurs four times consecutively) occurs.
  • the processor 120 may perform an initialization operation of the system when the memory shortage problem continuously occurs.
  • the processor 120 may store the occurrence information and time information of the memory critical situation based on the first cycle as log information in the memory 130 .
  • the processor 120 may utilize log information stored in the memory 130 to check a problem related to the memory 130 .
  • the processor 120 reduces the rate at which at least one process is terminated based on a package unit (eg, one application program is divided into one package) by half (eg: about 50%) or more.
  • the processor 120 may group the first application program into a first group, and even if the first application program is repeatedly executed based on one cycle, the number of times of overlapping execution may not be counted. For example, if a first application program, which is a high-spec program, is repeatedly executed, the electronic device 101 having a low memory capacity temporarily terminates a plurality of processes allocated to the memory 130, and a memory critical situation occurs.
  • the processor 120 groups and manages at least one process allocated to the memory 130 into a package in order to prevent a problem that a memory critical situation occurs due to the execution of a specific high-spec program. can In operation 611 , the processor 120 may determine whether the termination rate of at least one packaged process is equal to or greater than half. In operation 611 , if the termination rate is more than half, operation 607 may be performed.
  • the processor 120 performs at least one of the at least one allocated to the memory 130 based on the second cycle in operation 613 . process can be checked. According to another embodiment, before starting the second cycle, the processor 120 converts information and time information related to a memory critical situation based on the first cycle as log information of the electronic device 101 to the memory 130 . can be stored in
  • the electronic device 101 may compare and analyze the number of occurrences of the memory critical condition and the memory critical low condition during the last about 25 cycles.
  • the electronic device 101 may transmit the compared and analyzed information and log information stored in the memory 130 to the server 108 .
  • the server 108 may analyze a situation in which a memory problem occurs according to the type of the electronic device 101 .
  • the server 108 may analyze the cause of the memory problem based on the time the memory problem occurred.
  • the server 108 may periodically analyze the memory critical situation and the memory critical low situation generated in the electronic device 101 , and may generate a solution for solving the memory problem.
  • the solution may display a user interface indicating guide information according to a memory shortage situation on the screen and provide a notification to the user, thereby being utilized to minimize the memory shortage situation.
  • the server 108 may provide at least one solution based on a model (eg, type and/or type) of the electronic device 101 .
  • the server 108 may check the usage pattern of the electronic device 101 , and design and generate the solution so that the solution can be applied according to early morning hours when the use of the electronic device 101 is relatively low.
  • the usage pattern may include time information when the user uses the electronic device 101 , program information frequently used by the user, and/or location information for each time period of the electronic device 101 .
  • 7A is an exemplary diagram illustrating a method of detecting a rate at which a process is terminated based on one cycle according to various embodiments of the present disclosure.
  • 7B is a table in which a process termination rate is applied differently based on a memory capacity according to various embodiments of the present disclosure;
  • the processor 120 of FIG. 1 when at least one program is executed based on one cycle, the processor (eg, the processor 120 of FIG. 1 ) of the electronic device (eg, the electronic device 101 of FIG. 1 ) has a memory ( For example, it may be checked whether at least one process allocated to the memory 130 of FIG. 1 is terminated. A situation in which at least one process is terminated may be referred to as a critical kill. For example, when the "Internet program" is executed, the processor 120 may confirm that a critical kill does not occur. When the “game 1 program” is executed, the processor 120 may confirm that a critical kill has occurred.
  • the electronic device 101 may calculate a critical kill rate based on one cycle (eg, a cycle in which at least one application program is executed 50 times).
  • the processor 120 may determine that three critical kills have occurred while a total of nine programs are being executed, and may calculate that the rate at which the process is terminated is about 33%. 7A illustrates a situation in which program number 9 is executed, but is not limited thereto.
  • the electronic device 101 may check a rate at which at least one process is terminated during a cycle (eg, a first cycle) in which an application program is executed 50 times.
  • the electronic device 101 may compare a rate at which at least one process allocated to the memory 130 is terminated based on one cycle with a set threshold value, and the memory 130 may be insufficient in a situation ( For example, it is possible to determine whether a memory critical situation) has occurred.
  • the electronic device 101 may set differently a first threshold value (eg, a reference value, a reference value for determining that the memory is critical) based on the capacity of the memory 130 .
  • the electronic device 101 may check the capacity of the memory 130 through a framework (eg, the framework 330 of FIG. 3 ) at boot time, and set the checked capacity of the memory 130 . Based on the first threshold value may be determined.
  • the electronic device 101 having a low memory 130 may have a relatively high first threshold value, and the electronic device 101 having a high memory 130 may have a relatively high first threshold value. 1
  • the threshold may be set low.
  • the first threshold may be determined as 50 divided by the memory capacity (eg, 2 GB, 4 GB, and/or 8 GB).
  • the memory capacity eg, 2 GB, 4 GB, and/or 8 GB.
  • an electronic device having a small memory capacity may have a higher probability of terminating a process than an electronic device having a relatively large memory capacity, and a reference value for determining that a memory critical condition is high.
  • the probability of terminating a process may be relatively low.
  • the reference value for determining that the memory critical situation is low may be low.
  • 8A is an exemplary diagram illustrating a method of detecting a rate at which a packaged process is terminated based on one cycle according to various embodiments of the present disclosure
  • 8B is a table for confirming whether a corresponding process is terminated based on a packaged process according to various embodiments of the present disclosure
  • the processor 120 of FIG. 1 when at least one program is executed based on one cycle, the processor (eg, the processor 120 of FIG. 1 ) of the electronic device (eg, the electronic device 101 of FIG. 1 ) has a memory ( For example, it may be checked whether at least one process allocated to the memory 130 of FIG. 1 is terminated. A situation in which at least one process is terminated may be referred to as a critical kill. According to an embodiment, the processor 120 may group at least one process into a package, and may reflect the number of times the at least one process is terminated. For example, at least one process performed in response to the execution of a specific application program may be grouped into one package.
  • a package may be defined as a package managed by the package manager 247 of FIG. 2 .
  • the electronic device 101 having a low memory capacity may group at least one process into a package, and determine whether a memory critical situation occurs based on an end ratio of the packaged process.
  • the electronic device 101 equipped with a low-specification memory executes a high-specification process, a plurality of processes allocated to the memory may be terminated, and a memory critical situation may occur.
  • the electronic device 101 may group and manage at least one process allocated to the memory 130 into a package in order to prevent a memory critical situation from occurring due to the execution of the high-spec process.
  • the processor 120 may not count whether a critical kill occurs when a packaged process is repeatedly executed. For example, the processor 120 determines whether a critical kill corresponding to the re-executed "Internet program” occurs when the "Internet program" is initially executed, the "Game 1 program” is executed, and the "Internet program” is executed again. can be ignored. When the "game 1 program” is also executed again, the occurrence of a critical kill corresponding to the re-executed "game 1 program” may be ignored.
  • the processor 120 can confirm that three critical kills have occurred while a total of nine programs are being executed. However, since 4 of the 9 programs were repeatedly executed, the processor 120 may not count the redundantly executed 4 execution processes. According to an embodiment, the processor 120 may confirm that the critical kill has occurred twice among a total of five program executions, based on the packaged process. The processor 120 may calculate the termination rate of the packaged process as 40%. According to an embodiment, the processor 120 may determine that a memory critical condition has occurred when the termination rate of the packaged process is about 50% or more.
  • a rate at which the at least one process is terminated is checked based on an operation of executing at least one process under the control of a memory management module for managing a memory of the electronic device, and a preset first cycle and detecting a situation in which the checked ratio exceeds a first threshold value, and performing a reboot operation when the detected situation continuously occurs and exceeds a second threshold value.
  • the first threshold is set based on the capacity of the memory.
  • the method includes an operation of determining a capacity of a memory, an operation of determining whether to group the at least one process into a package based on the checked capacity of the memory, and packaging the at least one process, , when the package is re-executed, the number of executions related to the re-execution may further include an operation that does not reflect the rate at which the package is terminated.
  • the electronic device may have various types of devices.
  • the electronic device may include, for example, a portable communication device (eg, a smart phone), a computer device, a portable multimedia device, a portable medical device, a camera, a wearable device, or a home appliance device.
  • a portable communication device eg, a smart phone
  • a computer device e.g., a smart phone
  • a portable multimedia device e.g., a portable medical device
  • a camera e.g., a portable medical device
  • a camera e.g., a portable medical device
  • a camera e.g., a portable medical device
  • a wearable device e.g., a smart bracelet
  • a home appliance device e.g., a home appliance
  • first, second, or first or second may be used simply to distinguish the element from other elements in question, and may refer to elements in other aspects (e.g., importance or order) is not limited. It is said that one (eg, first) component is “coupled” or “connected” to another (eg, second) component, with or without the terms “functionally” or “communicatively”. When referenced, it means that one component can be connected to the other component directly (eg by wire), wirelessly, or through a third component.
  • module used in various embodiments of this document may include a unit implemented in hardware, software, or firmware, and is interchangeable with terms such as, for example, logic, logic block, component, or circuit.
  • a module may be an integrally formed part or a minimum unit or a part of the part that performs one or more functions.
  • the module may be implemented in the form of an application-specific integrated circuit (ASIC).
  • ASIC application-specific integrated circuit
  • one or more instructions stored in a storage medium may be implemented as software (eg, the program 140) including
  • a processor eg, processor 120
  • a device eg, electronic device 101
  • the one or more instructions may include code generated by a compiler or code executable by an interpreter.
  • the device-readable storage medium may be provided in the form of a non-transitory storage medium.
  • 'non-transitory' only means that the storage medium is a tangible device and does not include a signal (eg, electromagnetic wave), and this term is used in cases where data is semi-permanently stored in the storage medium and It does not distinguish between temporary storage cases.
  • a signal eg, electromagnetic wave
  • the method according to various embodiments disclosed in this document may be provided as included in a computer program product.
  • Computer program products may be traded between sellers and buyers as commodities.
  • the computer program product is distributed in the form of a machine-readable storage medium (eg compact disc read only memory (CD-ROM)), or via an application store (eg Play Store TM ) or on two user devices ( It can be distributed online (eg download or upload), directly between smartphones (eg smartphones).
  • a part of the computer program product may be temporarily stored or temporarily generated in a machine-readable storage medium such as a memory of a server of a manufacturer, a server of an application store, or a relay server.
  • each component (eg, module or program) of the above-described components may include a singular or a plurality of entities, and some of the plurality of entities may be separately disposed in other components. have.
  • one or more components or operations among the above-described corresponding components may be omitted, or one or more other components or operations may be added.
  • a plurality of components eg, a module or a program
  • the integrated component may perform one or more functions of each component of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to the integration. .
  • operations performed by a module, program, or other component are executed sequentially, in parallel, repeatedly, or heuristically, or one or more of the operations are executed in a different order, or omitted. or one or more other operations may be added.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephone Function (AREA)

Abstract

다양한 실시예에 따르면, 전자 장치는 메모리 관리 모듈, 상기 메모리 관리 모듈에 작동적으로 연결된 프로세서, 및 상기 메모리 관리 모듈에 의해 제어되고, 상기 프로세서와 작동적으로 연결된 메모리를 포함할 수 있다. 상기 메모리는, 실행될 때, 상기 프로세서가, 상기 적어도 하나의 프로세스를 실행하고, 기 설정된 제 1 사이클을 기반으로 상기 적어도 하나의 프로세스가 종료되는 비율을 확인하고, 상기 확인된 비율이 제 1 임계값을 초과하는 상황을 감지하고, 상기 감지된 상황이 연속적으로 발생하여 제 2 임계값을 초과하는 경우, 상기 전자 장치를 리부팅하도록 하는 인스트럭션들을 저장할 수 있다. 그 밖에 다양한 실시예들이 가능할 수 있다.

Description

메모리 관리 방법 및 전자 장치
본 발명의 다양한 실시 예는 메모리 관리 방법 및 전자 장치에 관한 것이다.
무선 통신 기술의 발전에 따라 전자 장치(예: 통신용 전자 장치, 스마트 폰)가 일상 생활에 보편적으로 사용되면서, 사용자의 요구 수준은 계속 높아지고 있다. 사용자의 높은 요구 수준을 충족시키기 위해, 전자 장치는 많은 기능을 수행하게 된다. 전자 장치는 한정된 메모리 용량 내에서 많은 기능을 수행함으로써, 메모리 용량이 부족한 상황이 발생할 수 있고, 전자 장치의 사용성이 저하될 수 있다.
일 예로, 전자 장치는 메모리 용량이 부족할 때, 메모리 용량을 확보하기 위해 백그라운드에서 실행 중인 적어도 하나의 어플리케이션을 종료시킬 수 있다.
다양한 실시예에 따르면, 전자 장치는 한정된 메모리 용량 내에서 메모리가 부족한 상황을 검출하고, 상기 메모리가 부족한 상황에 대응하여 적절한 솔루션이 적용될 필요가 있다.
다양한 실시예에 따르면, 전자 장치는 메모리가 부족한 상황을 검출하는 기준을 설정할 수 있다. 전자 장치는 메모리가 부족한 상황이 발생했을 때, 실행 중인 어플리케이션 프로그램에 관련된 정보, 시간 정보, 및/또는 로그 정보를 수집할 수 있고, 상기 수집된 정보들을 활용하여, 상기 메모리가 부족한 상황에 대한 솔루션을 사용자에게 제공할 수 있다.
본 발명의 다양한 실시예는 전자 장치에서 메모리가 부족한 상황을 검출할 수 있고, 상기 검출된 상황에 대응하여 적절한 솔루션이 제안됨으로써, 메모리를 관리하는 방법 및 이를 구현하는 전자 장치를 제공할 수 있다.
다양한 실시예에 따른 전자 장치에 있어서, 메모리 관리 모듈, 상기 메모리 관리 모듈에 작동적으로 연결된 프로세서 및, 상기 메모리 관리 모듈에 의해 제어되고, 상기 프로세서와 작동적으로 연결된 메모리를 포함할 수 있다. 상기 메모리는, 실행될 때, 상기 프로세서가, 상기 적어도 하나의 프로세스를 실행하고, 기 설정된 제 1 사이클을 기반으로 상기 적어도 하나의 프로세스가 종료되는 비율을 확인하고, 상기 확인된 비율이 제 1 임계값을 초과하는 상황을 감지하고, 상기 감지된 상황이 연속적으로 발생하여 제 2 임계값을 초과하는 경우, 상기 전자 장치를 리부팅하도록 하는 인스트럭션들을 저장할 수 있다.
다양한 실시예에 따른 방법에 있어서, 전자 장치의 메모리를 관리하는 메모리 관리 모듈의 제어 하에 적어도 하나의 프로세스를 실행하는 동작, 기 설정된 제 1 사이클을 기반으로 상기 적어도 하나의 프로세스가 종료되는 비율을 확인하는 동작, 상기 확인된 비율이 제 1 임계값을 초과하는 상황을 감지하는 동작, 및 상기 감지된 상황이 연속적으로 발생하여 제 2 임계값을 초과하는 경우 리부팅 동작을 수행하는 동작을 포함할 수 있다.
본 발명의 다양한 실시예들은 메모리가 부족한 상황을 검출할 수 있고, 상기 검출된 메모리 부족 상황에 대응하여 기 설정된 솔루션을 적용함으로써, 상기 상황을 유동적으로 대처하는 것을 목적으로 한다.
다양한 실시예에 따르면, 전자 장치는 메모리가 부족한 상황에서의 상황 정보, 시간 정보, 및 실행 중인 어플리케이션 프로그램에 관한 정보를 수집할 수 있고, 상기 수집된 정보들을 기반으로 솔루션에 적절하게 적용할 수 있다. 이 외에, 본 문서를 통해 직접적 또는 간접적으로 파악되는 다양한 효과들이 제공될 수 있다.
도면의 설명과 관련하여, 동일 또는 유사한 구성 요소에 대해서는 동일 또는 유사한 참조 부호가 사용될 수 있다.
도 1은 본 발명의 다양한 실시예들에 따른 네트워크 환경 내의 전자 장치의 블록도이다.
도 2는 본 발명의 다양한 실시예에 따른 프로그램 모듈의 블록도이다.
도 3은 본 발명의 다양한 실시예에 따른 커널 공간과 사용자 공간에서의 메모리 부족 상황을 검출하는 과정이 도시된 블록도이다.
도 4는 본 발명의 다양한 실시예에 따른 하나의 사이클을 기준으로 메모리 부족 상황을 검출하는 과정이 도시된 예시도이다.
도 5는 본 발명의 다양한 실시예에 따른 메모리 부족 상황에 따른 메모리 관리 방법을 도시한 흐름도이다.
도 6은 본 발명의 다양한 실시예에 따른 메모리 용량을 고려하여 메모리를 관리하는 방법을 도시한 흐름도이다.
도 7a는 본 발명의 다양한 실시예에 따른 하나의 사이클을 기준으로 프로세스가 종료되는 비율을 검출하는 방법을 도시한 예시도이다.
도 7b는 본 발명의 다양한 실시예에 따른 메모리 용량을 기반으로, 프로세스의 종료 비율이 다르게 적용되는 테이블이다.
도 8a는 본 발명의 다양한 실시예에 따른 하나의 사이클을 기준으로 패키지화된 프로세스가 종료되는 비율을 검출하는 방법을 도시한 예시도이다.
도 8b는 본 발명의 다양한 실시예에 따른 패키지화된 프로세스를 기반으로 해당 프로그램이 종료되었는지 여부를 확인하는 테이블이다.
도 1은, 다양한 실시예들에 따른, 네트워크 환경(100) 내의 전자 장치(101)의 블록도이다. 도 1을 참조하면, 네트워크 환경(100)에서 전자 장치(101)는 제 1 네트워크(198)(예: 근거리 무선 통신 네트워크)를 통하여 전자 장치(102)와 통신하거나, 또는 제 2 네트워크(199)(예: 원거리 무선 통신 네트워크)를 통하여 전자 장치(104) 또는 서버(108)와 통신할 수 있다. 일실시예에 따르면, 전자 장치(101)는 서버(108)를 통하여 전자 장치(104)와 통신할 수 있다. 일실시예에 따르면, 전자 장치(101)는 프로세서(120), 메모리(130), 입력 모듈(150), 음향 출력 모듈(155), 디스플레이 모듈(160), 오디오 모듈(170), 센서 모듈(176), 인터페이스(177), 연결 단자(178), 햅틱 모듈(179), 카메라 모듈(180), 전력 관리 모듈(188), 배터리(189), 통신 모듈(190), 가입자 식별 모듈(196), 또는 안테나 모듈(197)을 포함할 수 있다. 어떤 실시예에서는, 전자 장치(101)에는, 이 구성요소들 중 적어도 하나(예: 연결 단자(178))가 생략되거나, 하나 이상의 다른 구성요소가 추가될 수 있다. 어떤 실시예에서는, 이 구성요소들 중 일부들(예: 센서 모듈(176), 카메라 모듈(180), 또는 안테나 모듈(197))은 하나의 구성요소(예: 디스플레이 모듈(160))로 통합될 수 있다.
프로세서(120)는, 예를 들면, 소프트웨어(예: 프로그램(140))를 실행하여 프로세서(120)에 연결된 전자 장치(101)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다. 일실시예에 따르면, 데이터 처리 또는 연산의 적어도 일부로서, 프로세서(120)는 다른 구성요소(예: 센서 모듈(176) 또는 통신 모듈(190))로부터 수신된 명령 또는 데이터를 휘발성 메모리(132)에 저장하고, 휘발성 메모리(132)에 저장된 명령 또는 데이터를 처리하고, 결과 데이터를 비휘발성 메모리(134)에 저장할 수 있다. 일실시예에 따르면, 프로세서(120)는 메인 프로세서(121)(예: 중앙 처리 장치 또는 어플리케이션 프로세서) 또는 이와는 독립적으로 또는 함께 운영 가능한 보조 프로세서(123)(예: 그래픽 처리 장치, 신경망 처리 장치(NPU: neural processing unit), 이미지 시그널 프로세서, 센서 허브 프로세서, 또는 커뮤니케이션 프로세서)를 포함할 수 있다. 예를 들어, 전자 장치(101)가 메인 프로세서(121) 및 보조 프로세서(123)를 포함하는 경우, 보조 프로세서(123)는 메인 프로세서(121)보다 저전력을 사용하거나, 지정된 기능에 특화되도록 설정될 수 있다. 보조 프로세서(123)는 메인 프로세서(121)와 별개로, 또는 그 일부로서 구현될 수 있다.
보조 프로세서(123)는, 예를 들면, 메인 프로세서(121)가 인액티브(예: 슬립) 상태에 있는 동안 메인 프로세서(121)를 대신하여, 또는 메인 프로세서(121)가 액티브(예: 어플리케이션 실행) 상태에 있는 동안 메인 프로세서(121)와 함께, 전자 장치(101)의 구성요소들 중 적어도 하나의 구성요소(예: 디스플레이 모듈(160), 센서 모듈(176), 또는 통신 모듈(190))과 관련된 기능 또는 상태들의 적어도 일부를 제어할 수 있다. 일실시예에 따르면, 보조 프로세서(123)(예: 이미지 시그널 프로세서 또는 커뮤니케이션 프로세서)는 기능적으로 관련 있는 다른 구성요소(예: 카메라 모듈(180) 또는 통신 모듈(190))의 일부로서 구현될 수 있다. 일실시예에 따르면, 보조 프로세서(123)(예: 신경망 처리 장치)는 인공지능 모델의 처리에 특화된 하드웨어 구조를 포함할 수 있다. 인공지능 모델은 기계 학습을 통해 생성될 수 있다. 이러한 학습은, 예를 들어, 인공지능이 수행되는 전자 장치(101) 자체에서 수행될 수 있고, 별도의 서버(예: 서버(108))를 통해 수행될 수도 있다. 학습 알고리즘은, 예를 들어, 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning) 또는 강화 학습(reinforcement learning)을 포함할 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은, 복수의 인공 신경망 레이어들을 포함할 수 있다. 인공 신경망은 심층 신경망(DNN: deep neural network), CNN(convolutional neural network), RNN(recurrent neural network), RBM(restricted boltzmann machine), DBN(deep belief network), BRDNN(bidirectional recurrent deep neural network), 심층 Q-네트워크(deep Q-networks) 또는 상기 중 둘 이상의 조합 중 하나일 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은 하드웨어 구조 이외에, 추가적으로 또는 대체적으로, 소프트웨어 구조를 포함할 수 있다.
메모리(130)는, 전자 장치(101)의 적어도 하나의 구성요소(예: 프로세서(120) 또는 센서 모듈(176))에 의해 사용되는 다양한 데이터를 저장할 수 있다. 데이터는, 예를 들어, 소프트웨어(예: 프로그램(140)) 및, 이와 관련된 명령에 대한 입력 데이터 또는 출력 데이터를 포함할 수 있다. 메모리(130)는, 휘발성 메모리(132) 또는 비휘발성 메모리(134)를 포함할 수 있다.
프로그램(140)은 메모리(130)에 소프트웨어로서 저장될 수 있으며, 예를 들면, 운영 체제(142), 미들 웨어(144) 또는 어플리케이션(146)을 포함할 수 있다.
입력 모듈(150)은, 전자 장치(101)의 구성요소(예: 프로세서(120))에 사용될 명령 또는 데이터를 전자 장치(101)의 외부(예: 사용자)로부터 수신할 수 있다. 입력 모듈(150)은, 예를 들면, 마이크, 마우스, 키보드, 키(예: 버튼), 또는 디지털 펜(예: 스타일러스 펜)을 포함할 수 있다.
음향 출력 모듈(155)은 음향 신호를 전자 장치(101)의 외부로 출력할 수 있다. 음향 출력 모듈(155)은, 예를 들면, 스피커 또는 리시버를 포함할 수 있다. 스피커는 멀티미디어 재생 또는 녹음 재생과 같이 일반적인 용도로 사용될 수 있다. 리시버는 착신 전화를 수신하기 위해 사용될 수 있다. 일실시예에 따르면, 리시버는 스피커와 별개로, 또는 그 일부로서 구현될 수 있다.
디스플레이 모듈(160)은 전자 장치(101)의 외부(예: 사용자)로 정보를 시각적으로 제공할 수 있다. 디스플레이 모듈(160)은, 예를 들면, 디스플레이, 홀로그램 장치, 또는 프로젝터 및 해당 장치를 제어하기 위한 제어 회로를 포함할 수 있다. 일실시예에 따르면, 디스플레이 모듈(160)은 터치를 감지하도록 설정된 터치 센서, 또는 상기 터치에 의해 발생되는 힘의 세기를 측정하도록 설정된 압력 센서를 포함할 수 있다.
오디오 모듈(170)은 소리를 전기 신호로 변환시키거나, 반대로 전기 신호를 소리로 변환시킬 수 있다. 일실시예에 따르면, 오디오 모듈(170)은, 입력 모듈(150)을 통해 소리를 획득하거나, 음향 출력 모듈(155), 또는 전자 장치(101)와 직접 또는 무선으로 연결된 외부 전자 장치(예: 전자 장치(102))(예: 스피커 또는 헤드폰)를 통해 소리를 출력할 수 있다.
센서 모듈(176)은 전자 장치(101)의 작동 상태(예: 전력 또는 온도), 또는 외부의 환경 상태(예: 사용자 상태)를 감지하고, 감지된 상태에 대응하는 전기 신호 또는 데이터 값을 생성할 수 있다. 일실시예에 따르면, 센서 모듈(176)은, 예를 들면, 제스처 센서, 자이로 센서, 기압 센서, 마그네틱 센서, 가속도 센서, 그립 센서, 근접 센서, 컬러 센서, IR(infrared) 센서, 생체 센서, 온도 센서, 습도 센서, 또는 조도 센서를 포함할 수 있다.
인터페이스(177)는 전자 장치(101)가 외부 전자 장치(예: 전자 장치(102))와 직접 또는 무선으로 연결되기 위해 사용될 수 있는 하나 이상의 지정된 프로토콜들을 지원할 수 있다. 일실시예에 따르면, 인터페이스(177)는, 예를 들면, HDMI(high definition multimedia interface), USB(universal serial bus) 인터페이스, SD카드 인터페이스, 또는 오디오 인터페이스를 포함할 수 있다.
연결 단자(178)는, 그를 통해서 전자 장치(101)가 외부 전자 장치(예: 전자 장치(102))와 물리적으로 연결될 수 있는 커넥터를 포함할 수 있다. 일실시예에 따르면, 연결 단자(178)는, 예를 들면, HDMI 커넥터, USB 커넥터, SD 카드 커넥터, 또는 오디오 커넥터(예: 헤드폰 커넥터)를 포함할 수 있다.
햅틱 모듈(179)은 전기적 신호를 사용자가 촉각 또는 운동 감각을 통해서 인지할 수 있는 기계적인 자극(예: 진동 또는 움직임) 또는 전기적인 자극으로 변환할 수 있다. 일실시예에 따르면, 햅틱 모듈(179)은, 예를 들면, 모터, 압전 소자, 또는 전기 자극 장치를 포함할 수 있다.
카메라 모듈(180)은 정지 영상 및 동영상을 촬영할 수 있다. 일실시예에 따르면, 카메라 모듈(180)은 하나 이상의 렌즈들, 이미지 센서들, 이미지 시그널 프로세서들, 또는 플래시들을 포함할 수 있다.
전력 관리 모듈(188)은 전자 장치(101)에 공급되는 전력을 관리할 수 있다. 일실시예에 따르면, 전력 관리 모듈(188)은, 예를 들면, PMIC(power management integrated circuit)의 적어도 일부로서 구현될 수 있다.
배터리(189)는 전자 장치(101)의 적어도 하나의 구성요소에 전력을 공급할 수 있다. 일실시예에 따르면, 배터리(189)는, 예를 들면, 재충전 불가능한 1차 전지, 재충전 가능한 2차 전지 또는 연료 전지를 포함할 수 있다.
통신 모듈(190)은 전자 장치(101)와 외부 전자 장치(예: 전자 장치(102), 전자 장치(104), 또는 서버(108)) 간의 직접(예: 유선) 통신 채널 또는 무선 통신 채널의 수립, 및 수립된 통신 채널을 통한 통신 수행을 지원할 수 있다. 통신 모듈(190)은 프로세서(120)(예: 어플리케이션 프로세서)와 독립적으로 운영되고, 직접(예: 유선) 통신 또는 무선 통신을 지원하는 하나 이상의 커뮤니케이션 프로세서를 포함할 수 있다. 일실시예에 따르면, 통신 모듈(190)은 무선 통신 모듈(192)(예: 셀룰러 통신 모듈, 근거리 무선 통신 모듈, 또는 GNSS(global navigation satellite system) 통신 모듈) 또는 유선 통신 모듈(194)(예: LAN(local area network) 통신 모듈, 또는 전력선 통신 모듈)을 포함할 수 있다. 이들 통신 모듈 중 해당하는 통신 모듈은 제 1 네트워크(198)(예: 블루투스, WiFi(wireless fidelity) direct 또는 IrDA(infrared data association)와 같은 근거리 통신 네트워크) 또는 제 2 네트워크(199)(예: 레거시 셀룰러 네트워크, 5G 네트워크, 차세대 통신 네트워크, 인터넷, 또는 컴퓨터 네트워크(예: LAN 또는 WAN)와 같은 원거리 통신 네트워크)를 통하여 외부의 전자 장치(104)와 통신할 수 있다. 이런 여러 종류의 통신 모듈들은 하나의 구성요소(예: 단일 칩)로 통합되거나, 또는 서로 별도의 복수의 구성요소들(예: 복수 칩들)로 구현될 수 있다. 무선 통신 모듈(192)은 가입자 식별 모듈(196)에 저장된 가입자 정보(예: 국제 모바일 가입자 식별자(IMSI))를 이용하여 제 1 네트워크(198) 또는 제 2 네트워크(199)와 같은 통신 네트워크 내에서 전자 장치(101)를 확인 또는 인증할 수 있다.
무선 통신 모듈(192)은 4G 네트워크 이후의 5G 네트워크 및 차세대 통신 기술, 예를 들어, NR 접속 기술(new radio access technology)을 지원할 수 있다. NR 접속 기술은 고용량 데이터의 고속 전송(eMBB(enhanced mobile broadband)), 단말 전력 최소화와 다수 단말의 접속(mMTC(massive machine type communications)), 또는 고신뢰도와 저지연(URLLC(ultra-reliable and low-latency communications))을 지원할 수 있다. 무선 통신 모듈(192)은, 예를 들어, 높은 데이터 전송률 달성을 위해, 고주파 대역(예: mmWave 대역)을 지원할 수 있다. 무선 통신 모듈(192)은 고주파 대역에서의 성능 확보를 위한 다양한 기술들, 예를 들어, 빔포밍(beamforming), 거대 배열 다중 입출력(massive MIMO(multiple-input and multiple-output)), 전차원 다중입출력(FD-MIMO: full dimensional MIMO), 어레이 안테나(array antenna), 아날로그 빔형성(analog beam-forming), 또는 대규모 안테나(large scale antenna)와 같은 기술들을 지원할 수 있다. 무선 통신 모듈(192)은 전자 장치(101), 외부 전자 장치(예: 전자 장치(104)) 또는 네트워크 시스템(예: 제 2 네트워크(199))에 규정되는 다양한 요구사항을 지원할 수 있다. 일실시예에 따르면, 무선 통신 모듈(192)은 eMBB 실현을 위한 Peak data rate(예: 20Gbps 이상), mMTC 실현을 위한 손실 Coverage(예: 164dB 이하), 또는 URLLC 실현을 위한 U-plane latency(예: 다운링크(DL) 및 업링크(UL) 각각 0.5ms 이하, 또는 라운드 트립 1ms 이하)를 지원할 수 있다.
안테나 모듈(197)은 신호 또는 전력을 외부(예: 외부의 전자 장치)로 송신하거나 외부로부터 수신할 수 있다. 일실시예에 따르면, 안테나 모듈(197)은 서브스트레이트(예: PCB) 위에 형성된 도전체 또는 도전성 패턴으로 이루어진 방사체를 포함하는 안테나를 포함할 수 있다. 일실시예에 따르면, 안테나 모듈(197)은 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다. 이런 경우, 제 1 네트워크(198) 또는 제 2 네트워크(199)와 같은 통신 네트워크에서 사용되는 통신 방식에 적합한 적어도 하나의 안테나가, 예를 들면, 통신 모듈(190)에 의하여 상기 복수의 안테나들로부터 선택될 수 있다. 신호 또는 전력은 상기 선택된 적어도 하나의 안테나를 통하여 통신 모듈(190)과 외부의 전자 장치 간에 송신되거나 수신될 수 있다. 어떤 실시예에 따르면, 방사체 이외에 다른 부품(예: RFIC(radio frequency integrated circuit))이 추가로 안테나 모듈(197)의 일부로 형성될 수 있다.
다양한 실시예에 따르면, 안테나 모듈(197)은 mmWave 안테나 모듈을 형성할 수 있다. 일실시예에 따르면, mmWave 안테나 모듈은 인쇄 회로 기판, 상기 인쇄 회로 기판의 제 1 면(예: 아래 면)에 또는 그에 인접하여 배치되고 지정된 고주파 대역(예: mmWave 대역)을 지원할 수 있는 RFIC, 및 상기 인쇄 회로 기판의 제 2 면(예: 윗 면 또는 측 면)에 또는 그에 인접하여 배치되고 상기 지정된 고주파 대역의 신호를 송신 또는 수신할 수 있는 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다.
상기 구성요소들 중 적어도 일부는 주변 기기들간 통신 방식(예: 버스, GPIO(general purpose input and output), SPI(serial peripheral interface), 또는 MIPI(mobile industry processor interface))을 통해 서로 연결되고 신호(예: 명령 또는 데이터)를 상호간에 교환할 수 있다.
일 실시예에 따르면, 명령 또는 데이터는 제 2 네트워크(199)에 연결된 서버(108)를 통해서 전자 장치(101)와 외부의 전자 장치(104)간에 송신 또는 수신될 수 있다. 외부의 전자 장치(102, 또는 104) 각각은 전자 장치(101)와 동일한 또는 다른 종류의 장치일 수 있다. 일 실시예에 따르면, 전자 장치(101)에서 실행되는 동작들의 전부 또는 일부는 외부의 전자 장치들(102, 104, 또는 108) 중 하나 이상의 외부의 전자 장치들에서 실행될 수 있다. 예를 들면, 전자 장치(101)가 어떤 기능이나 서비스를 자동으로, 또는 사용자 또는 다른 장치로부터의 요청에 반응하여 수행해야 할 경우에, 전자 장치(101)는 기능 또는 서비스를 자체적으로 실행시키는 대신에 또는 추가적으로, 하나 이상의 외부의 전자 장치들에게 그 기능 또는 그 서비스의 적어도 일부를 수행하라고 요청할 수 있다. 상기 요청을 수신한 하나 이상의 외부의 전자 장치들은 요청된 기능 또는 서비스의 적어도 일부, 또는 상기 요청과 관련된 추가 기능 또는 서비스를 실행하고, 그 실행의 결과를 전자 장치(101)로 전달할 수 있다. 전자 장치(101)는 상기 결과를, 그대로 또는 추가적으로 처리하여, 상기 요청에 대한 응답의 적어도 일부로서 제공할 수 있다. 이를 위하여, 예를 들면, 클라우드 컴퓨팅, 분산 컴퓨팅, 모바일 에지 컴퓨팅(MEC: mobile edge computing), 또는 클라이언트-서버 컴퓨팅 기술이 이용될 수 있다. 전자 장치(101)는, 예를 들어, 분산 컴퓨팅 또는 모바일 에지 컴퓨팅을 이용하여 초저지연 서비스를 제공할 수 있다. 다른 실시예에 있어서, 외부의 전자 장치(104)는 IoT(internet of things) 기기를 포함할 수 있다. 서버(108)는 기계 학습 및/또는 신경망을 이용한 지능형 서버일 수 있다. 일 실시예에 따르면, 외부의 전자 장치(104) 또는 서버(108)는 제 2 네트워크(199) 내에 포함될 수 있다. 전자 장치(101)는 5G 통신 기술 및 IoT 관련 기술을 기반으로 지능형 서비스(예: 스마트 홈, 스마트 시티, 스마트 카, 또는 헬스 케어)에 적용될 수 있다.
도 2는 본 발명의 다양한 실시예에 따른 프로그램 모듈의 블록도이다.
일 실시예에 따르면, 프로그램 모듈(210)(예: 도 1의 프로그램(140))은 전자 장치(예: 도 1의 전자 장치(101))에 관련된 자원을 제어하는 운영 체제 및/또는 운영 체제 상에서 구동되는 다양한 어플리케이션(270)(예: 도 1의 어플리케이션(146))을 포함할 수 있다. 운영 체제는, 예를 들면, AndroidTM, iOSTM, WindowsTM, SymbianTM, TizenTM, 또는 BadaTM를 포함할 수 있다. 도 2를 참조하면, 프로그램 모듈(210)은 커널(220), 미들웨어(230)(예: 도 1의 미들 웨어(144)), API(260), 및/또는 어플리케이션(270)(예: 도 1의 어플리케이션(146))을 포함할 수 있다. 프로그램 모듈(210)의 적어도 일부는 전자 장치(101) 상에 프리로드 되거나, 외부 전자 장치(예: 전자 장치(102, 104) 및/또는 서버(106))로부터 다운로드 가능하다.
일 실시예에 따르면, 커널(220)은 시스템 리소스 매니저(221) 및/또는 디바이스 드라이버(223)를 포함할 수 있다. 시스템 리소스 매니저(221)는 시스템 리소스의 제어, 할당, 또는 회수를 수행할 수 있다. 예를 들어, 시스템 리소스 매니저(221)는 프로세스 관리부, 메모리 관리부, 또는 파일 시스템 관리부를 포함할 수 있다. 일 실시예에 따르면, 커널 공간에 위치한 시스템 리소스 매니저(221)는 메모리(예: 도 1의 메모리(130))를 관리하기 위한 메모리 관리 모듈(예: LMKD, low memory killer demon)(330)을 포함할 수 있다. 예를 들어, 메모리 관리 모듈(330)은 메모리 관리부로 정의될 수 있다.
일 실시예에 따르면, 메모리 관리 모듈(330)은 메모리(130)의 용량을 기반으로 메모리가 부족한 상황인지 여부를 검출할 수 있다. 메모리 관리 모듈(330)은 메모리(130)를 사용 중인 적어도 하나의 어플리케이션 프로그램의 종료 여부를 결정할 수 있다. 예를 들어, 메모리 관리 모듈(330)은 메모리(130)에 상주하고 있는, 상기 어플리케이션 프로그램과 관련된 적어도 하나의 프로세스의 종료 여부를 결정할 수 있다. 메모리 관리 모듈(330)은 메모리가 부족한 상황에서 메모리(130)에 할당된 적어도 하나의 프로세스를 종료시킬 수 있고, 메모리(130)를 확보하기 위한 동작을 수행할 수 있다. 예를 들어, 메모리 관리 모듈(330)은 특정 프로세스의 실행을 위해 가용 메모리를 확보해야 하는 상황이 발생하면, 현재 메모리(130)에 상주하고 있는 적어도 하나의 프로세스를 종료시킬 수 있다. 메모리 관리 모듈(330)은 기 설정된 조건을 기반으로 해당 조건이 충족되는 경우 가용 메모리를 확보하기 위해, 적어도 하나의 프로세스를 종료시킬 수 있다.
일 실시예에 따르면, 커널(220)에 포함된 디바이스 드라이버(223)는, 예를 들면, 디스플레이 드라이버, 카메라 드라이버, 블루투스 드라이버, 공유 메모리 드라이버, USB 드라이버, 키패드 드라이버, WiFi 드라이버, 오디오 드라이버, 또는 IPC(inter-process communication) 드라이버를 포함할 수 있다.
일 실시예에 따르면, 미들웨어(230)는, 예를 들면, 어플리케이션(270)이 공통적으로 필요로 하는 기능을 제공하거나, 어플리케이션(270)이 전자 장치 내부의 제한된 시스템 자원을 사용할 수 있도록 API(260)를 통해 다양한 기능들을 어플리케이션(270)으로 제공할 수 있다. 일 실시예에 따르면, 미들웨어(230) 는 런타임 라이브러리(235), 어플리케이션 매니저(241), 윈도우 매니저(242), 멀티미디어 매니저(243), 리소스 매니저(244), 파워 매니저(245), 데이터베이스 매니저(246), 패키지 매니저(247), 커넥티비티 매니저(248), 노티피케이션 매니저(249), 로케이션 매니저(250), 그래픽 매니저(251), 및/또는 시큐리티 매니저(252) 중 적어도 하나를 포함할 수 있다.
일 실시예에 따르면, 미들웨어(230)는 런타임 라이브러리(235)를 포함할 수 있다. 런타임 라이브러리(235)는, 예를 들면, 어플리케이션(270)이 실행되는 동안에 프로그래밍 언어를 통해 새로운 기능을 추가하기 위해 컴파일러가 사용하는 라이브러리 모듈을 포함할 수 있다. 런타임 라이브러리(235)는 입출력 관리, 메모리 관리, 또는 산술 함수 처리를 수행할 수 있다.
도 2를 참조하면, 어플리케이션 매니저(241)는, 예를 들면, 어플리케이션(270)의 생명 주기를 관리할 수 있다. 윈도우 매니저(242)는 화면에서 사용되는 GUI(graphic user interface) 자원을 관리할 수 있다. 멀티미디어 매니저(243)는 미디어 파일들의 재생에 필요한 포맷을 파악하고, 해당 포맷에 맞는 코덱을 이용하여 미디어 파일의 인코딩 또는 디코딩을 수행할 수 있다. 리소스 매니저(244)는 어플리케이션(270)의 소스 코드 또는 메모리의 공간을 관리할 수 있다. 파워 매니저(245)는, 예를 들면, 배터리의 용량 또는 전원을 관리하고, 전자 장치의 동작에 필요한 전력 정보를 제공할 수 있다. 일 실시예에 따르면, 파워 매니저(245)는 바이오스(BIOS: basic input/output system)와 연동할 수 있다. 데이터베이스 매니저(246)는, 예를 들면, 어플리케이션(270)에서 사용될 데이터베이스를 생성, 검색, 또는 변경할 수 있다. 패키지 매니저(247)는 패키지 파일의 형태로 배포되는 어플리케이션의 설치 또는 갱신을 관리할 수 있다. 커넥티비티 매니저(248)는, 예를 들면, 무선 연결을 관리할 수 있다. 노티피케이션 매니저(249)는, 예를 들면, 도착 메시지, 약속, 근접성 알림 등의 이벤트를 사용자에게 제공할 수 있다. 로케이션 매니저(250)는, 예를 들면, 전자 장치의 위치 정보를 관리할 수 있다. 그래픽 매니저(251)는, 예를 들면, 사용자에게 제공될 그래픽 효과 또는 이와 관련된 사용자 인터페이스를 관리할 수 있다. 보안 매니저(252)는, 예를 들면, 시스템 보안 또는 사용자 인증을 제공할 수 있다. 일 실시예에 따르면, 미들웨어(230)는 전자 장치의 음성 또는 영상 통화 기능을 관리하기 위한 통화(telephony) 매니저 또는 전술된 구성요소들의 기능들의 조합을 형성할 수 있는 하는 미들웨어 모듈을 포함할 수 있다.
일 실시예에 따르면, 미들웨어(230)는 운영 체제의 종류 별로 특화된 모듈을 제공할 수 있다. 미들웨어(230)는 동적으로 기존의 구성요소를 일부 삭제하거나 새로운 구성요소들을 추가할 수 있다. API(260)는, 예를 들면, API 프로그래밍 함수들의 집합으로, 운영 체제에 따라 다른 구성으로 제공될 수 있다. 예를 들면, 안드로이드 또는 iOS의 경우, 플랫폼 별로 하나의 API 셋을 제공할 수 있으며, 타이젠의 경우, 플랫폼 별로 두 개 이상의 API 셋을 제공할 수 있다.
어플리케이션(270)은, 예를 들면, 홈(271), 다이얼러(272), SMS/MMS(273), IM(instant message)(274), 브라우저(275), 카메라(276), 알람(277), 컨택트(278), 음성 다이얼(279), 이메일(280), 달력(281), 미디어 플레이어(282), 앨범(283), 와치(284), 헬스 케어(예: 운동량 또는 혈당 등을 측정), 및/또는 환경 정보(예: 기압, 습도, 또는 온도 정보) 제공 어플리케이션을 포함할 수 있다. 일 실시예에 따르면, 어플리케이션(270)은 전자 장치(101)와 외부 전자 장치(102, 104) 사이의 정보 교환을 지원할 수 있는 정보 교환 어플리케이션을 포함할 수 있다.
예를 들어, 알림 전달 어플리케이션은 전자 장치(101)의 다른 어플리케이션에서 발생된 알림 정보를 외부 전자 장치(102, 104)로 전달하거나, 또는 외부 전자 장치(102, 104)로부터 알림 정보를 수신하여 사용자에게 제공할 수 있다.
일 실시예에 따르면, 프로그램 모듈(210)의 적어도 일부는 소프트웨어, 펌웨어, 하드웨어, 또는 이들 중 적어도 둘 이상의 조합으로 구현(예: 실행)될 수 있으며, 하나 이상의 기능을 수행하기 위한 모듈, 프로그램, 루틴, 명령어 세트 또는 프로세스를 포함할 수 있다.
도 3은 본 발명의 다양한 실시예에 따른 커널 영역(310)과 사용자 영역(320)에서의 메모리 부족 상황을 검출하는 과정이 도시된 블록도이다.
도 3을 참조하면, 프로그램 모듈(210)이 저장되는 메모리 주소 공간(memory address space) 상 커널 영역(310)과 사용자 영역(320)이 구분될 수 있고, 각각의 영역에서 메모리(예: 도 1의 메모리(130))가 부족한 상황을 검출하는 과정을 도시한다. 일 실시예에 따르면, 커널 영역(310)은 도 2의 프로그램 모듈(210)에 포함된 커널(220)로 정의될 수 있다. 일 실시예에 따르면, 커널 영역(310)에 포함된 메모리 관리 모듈(330)(예: LMKD, low memory killer demon)(예: 도 2의 메모리 관리 모듈(330))은 도 2의 시스템 리소스 매니저(221)에 포함될 수 있다. 일 실시예에 따르면, 사용자 영역(320)은 사용자에 의해 적어도 부분적으로 제어되는 영역을 포함할 수 있다. 예를 들어, 사용자 영역(320)은 GUI(graphic user interface) 및 프레임워크(340)(framework)를 포함할 수 있고, 사용자에게 특정 기능을 제공할 수 있다. 사용자 영역(320)은 사용자가 프레임워크(340)를 통해 어플리케이션 프로그램을 실행할 때, 전자 장치(101)에서 메모리(130)를 확보하기 위해 설정된 알고리즘을 수행하는 과정을 도시한다.
도 3을 참조하면, 동작 351에서 메모리 관리 모듈(330)은 메모리(130)가 부족한 상황을 감지할 수 있다. 예를 들어, 적어도 하나의 어플리케이션 프로그램이 실행되면, 상기 실행과 관련된 적어도 하나의 프로세스가 메모리(130)에 할당될 수 있고, 가용 메모리가 부족한 상황이 발생할 수 있다. 메모리 관리 모듈(330)은 메모리(130)가 부족한 상황을 감지할 수 있고, 가용 메모리를 확보하기 위한 동작을 수행할 수 있다. 일 실시예에 따르면, 메모리 관리 모듈(330)은 메모리(130)의 용량을 기준으로 메모리가 부족한 정도를 low 레벨, medium 레벨, 및/또는 critical 레벨로 구분할 수 있고, 메모리가 부족한 상황을 감지하는 기준을 다르게 설정할 수 있다. 예를 들어, 메모리 용량 대비 가용 메모리의 비율이 약 50%이면 low 레벨이고, 상기 비율이 약 70%이면 medium 레벨이고, 상기 비율이 약 90%이면 critical 레벨로 설정될 수 있다. 메모리 관리 모듈(330)은 메모리 용량 및 설정된 레벨을 기반으로 메모리가 부족한 상황(예: 메모리에 상주하고 있는 적어도 하나의 프로세스를 종료시켜야 하는 상황)을 감지할 수 있다.
동작 353에서 메모리 관리 모듈(330)은 현재 실행 중인 프로세스의 종료 조건을 확인할 수 있다. 예를 들어, 메모리 관리 모듈(330)은 약 100ms 이내에 프로세스가 종료되었는지, 현재의 가용 메모리가 충분한 상태인지 여부를 확인할 수 있고, 프로세스의 종료 조건을 충족하는지 여부를 결정할 수 있다.
동작 355에서 메모리 관리 모듈(330)은 메모리(130)에 할당된 적어도 하나의 프로세스 중 종료할 프로세스를 선택할 수 있다. 예를 들어, 메모리(130)에 할당된 적어도 하나의 프로세스는 우선 순위(예: cached adj 값)가 설정될 수 있고, 상기 우선 순위를 기반으로 종료될 프로세스가 결정될 수 있다. 메모리 관리 모듈(330)은 메모리 레벨(예: low 레벨, medium 레벨, 및/또는 critical 레벨)에 대응하는 기준값을 설정할 수 있고, 상기 프로세스의 우선 순위가 상기 기준값을 초과하는 경우 상기 프로세스를 종료시킬 수 있다. 예를 들어, foreground에서 실행 중인 프로세스의 우선순위(예: cached adj 값)는 "0"에 해당되고, background에서 동작 중인 프로세스 중에서 중요도가 낮은 프로세스의 우선순위는 "900-999"에서 결정될 수 있다. 예를 들어, 메모리 관리 모듈(330)은 메모리 레벨이 medium 레벨일 때, 기준값이 "850"인 경우 "850"을 초과하는 우선 순위에 해당하는 적어도 하나의 프로세스를 선택하고, 상기 선택된 적어도 하나의 프로세스를 종료시킬 수 있다.
동작 355에서 메모리 관리 모듈(330)은 메모리 레벨의 기준값을 기반으로 적어도 하나의 프로세스를 선택할 수 있고, 동작 357에서 상기 선택된 적어도 하나의 프로세스를 종료시킬 수 있다. 메모리 관리 모듈(330)은 상기 적어도 하나의 프로세스를 종료시킴으로써, 가용 메모리를 확보할 수 있다. 일 실시예에 따르면, 메모리 관리 모듈(330)은 가용 메모리를 확보하기 위하여, 우선 순위를 기반으로, 메모리(130)에 할당된 적어도 하나의 프로세스 중 적어도 하나를 종료시킬 수 있다.
동작 359에서 메모리 관리 모듈(330)은 종료시킨 적어도 하나의 프로세스를 카운팅할 수 있다. 예를 들어, 메모리 관리 모듈(330)은 메모리 레벨의 기준값을 기반으로, 종료시킨 프로세스를 카운팅할 수 있다. 예를 들어, 기준값이 "850"인 경우 "850"에 대응하여 종료된 프로세스를 카운팅할 수 있고, 기준값이 "700"인 경우 "700"에 대응하여 종료된 프로세스를 카운팅할 수 있다. 메모리 관리 모듈(330)은 각각의 기준값을 기반으로 카운트 정보를 관리할 수 있다.
일 실시예에 따르면, 전자 장치(101)의 프로세서(예: 도 1의 프로세서(120))는 부팅 시점에 메모리(예: 도 1의 메모리(130), DRAM 메인 메모리)의 용량 및/또는 가용량(capacity)을 확인할 수 있고, 상기 확인된 메모리(130)의 용량 및/또는 가용량을 기반으로 제 1 임계값(예: 기준값)을 결정할 수 있다. 예를 들어, 프로세서(120)는 프레임워크(340)의 코드 생성 단계(예: 초기화 단계)에서 메모리의 용량 및/또는 가용량을 확인할 수 있고, 제 1 임계값을 설정할 수 있다. 전자 장치(101)는 제 1 임계값을 기반으로 메모리(130)에 할당된 적어도 하나의 프로세스가 종료되는 상황을 카운팅할 수 있다.
도 3을 참조하면, 동작 361에서 전자 장치(101)는 프레임워크(340)를 통해 어플리케이션 프로그램과 관련된 적어도 하나의 프로세스를 실행할 수 있다. 예를 들어, 전자 장치(101)는 사용자 입력에 응답하여, 적어도 하나의 어플리케이션 프로그램에 대응하는 어플리케이션 프로세스를 실행할 수 있다. 일 실시예에 따르면, 전자 장치(101)는 적어도 하나의 어플리케이션 프로세스가 실행될 때, 메모리가 부족한 상황을 감지할 수 있다. 예를 들어, 도 3의 동작 361에서 어플리케이션 프로그램과 관련된 적어도 하나의 프로세스가 실행되면, 동작 351에서 메모리가 부족한 상황을 감지할 수 있다.
동작 363에서 전자 장치(101)는 프레임워크(340)를 통해 메모리 관리 모듈(330)에 카운트 정보(예: 메모리 부족 상황에 따라 프로세스가 종료된 회수, 프로세스의 adj 값에 따라, 프로세스가 종료된 횟수)를 요청할 수 있고, 상기 메모리 관리 모듈(330)로부터 카운트 정보를 획득할 수 있다. 메모리 관리 모듈(330)은 동작 359에서 기준값을 기반으로 기록된 카운트 정보를 프레임워크(340)로 전달할 수 있다. 일 실시예에 따르면, 전자 장치(101)는 메모리 관리 모듈(330)에 의해 관리되는 카운트 정보를 직접 참조할 수 없고, 메모리 관리 모듈(330)에 카운트 정보를 요청함으로써, 획득할 수 있다. 일 실시예에 따르면, 전자 장치(101)는 메모리 레벨의 기준값을 기반으로 카운트 정보를 요청할 수도 있고, 해당되는 카운트 정보를 획득할 수 있다. 예를 들어, 메모리 관리 모듈(330)은 상기 기준값을 초과하는 적어도 하나의 프로세스를 종료시킬 수 있고, 상기 적어도 하나의 프로세스에 대응하는 adj 값(예: cached adj 값)에 대응하는 카운트 정보를 기록할 수 있다. 메모리 관리 모듈(330)은 카운트 정보의 요청에 응답하여, adj 값 별로 기록된 카운트 정보를 제공할 수 있다.
동작 365에서 전자 장치(101)는 메모리 관리 모듈(330)로부터 획득된 카운트 정보를 메모리(130)에 저장할 수 있다. 일 실시예에 따르면, 전자 장치(101)는 적어도 하나의 어플리케이션 프로세스가 실행될 때, 지속적으로 카운트 정보를 획득할 수 있고, 이전에 획득한 카운트 정보와 비교 및 분석할 수 있다. 예를 들어, 전자 장치(101)는 적어도 하나의 어플리케이션 프로세스가 실행됨에 따라, 메모리(130)에 상주된 적어도 하나의 프로세스가 종료되었다면, 상기 획득된 카운트 정보를 1만큼 증가시킬 수 있다. 예를 들어, 전자 장치(101)는 메모리(130)에 상주된 적어도 하나의 프로세스 중 adj 값이 "700"인 적어도 하나의 프로세스를 종료시킬 수 있고, adj 값 "700"에 대응되는 카운트 정보를 1만큼 증가시킬 수 있다. adj 값이 "700"인 복수의 프로세스가 종료되더라도 adj 값 "700"에 대응되는 카운트 정보는 1만큼 증가할 수 있다.
동작 367에서 전자 장치(101)는 하나의 사이클(예: 제 1 사이클)을 기반으로 적어도 하나의 프로세스가 종료된 비율을 계산할 수 있다. 예를 들어, 어플리케이션 프로그램이 50회 실행되는 주기를 하나의 사이클로 결정할 수 있다. 상기 적어도 하나의 프로세스가 종료된 비율은 하나의 사이클을 기준으로 프로세스가 종료된 횟수가 차지하는 비율로 정의될 수 있다. 일 실시예에 따르면, 전자 장치(101)는 카운트 정보를 기반으로 하나의 사이클 동안 프로세스가 종료된 비율을 계산할 수 있다.
동작 369에서 전자 장치(101)는 상기 계산된 비율이 임계값을 초과하는지 여부를 확인할 수 있다. 일 실시예에 따르면, 프로세스가 종료된 비율이 임계값을 초과하는 상황이 메모리 크리티컬 상황으로 정의될 수 있다. 일 실시예에 따르면, 임계값은 메모리의 용량을 기반으로 결정될 수 있다. 예를 들어, 메모리의 용량이 증가할수록 상기 임계값은 작아질 수 있다. 일 실시예에 따르면, 작은 용량의 메모리가 실장된 전자 장치(101)는 메모리가 부족한 상황이 자주 발생할 수 있고, 상기 상황이 자주 발생함에 따라, 메모리 크리티컬 상황이 발생할 수 있다.
동작 371에서 전자 장치(101)(예: 도 1의 프로세서(120))는 동작 369에서의 메모리 크리티컬 상황이 연속적으로 4회 이상 발생하였는지 여부를 확인할 수 있다. 예를 들어, 프로세서(120)는 메모리 크리티컬 상황이 발생하면, 상기 발생 정보를 메모리 관리 프로그램(예: 헬스케어 어플리케이션 프로그램)에 전달할 수 있고, 상기 메모리 관리 프로그램을 통해, 상기 메모리 크리티컬 상황의 발생 횟수를 카운팅할 수 있다. 일 실시예에 따르면, 메모리 크리티컬 상황이 연속적으로 4회 발생하는 상황은 메모리 크리티컬 로우 상황으로 정의될 수 있다. 일 실시예에 따르면, 메모리 크리티컬 로우 상황은 가용 메모리를 확보하기 어려운 상황일 수 있고, 메모리의 부족 문제가 지속적으로 야기되는 상황일 수 있다. 일 실시예에 따르면, 프로세서(120)는 메모리 크리티컬 로우 상황이 발생하면, 전자 장치(101)를 리부팅하거나, 메모리(130)를 초기화하는 동작을 수행하여, 가용 메모리를 확보하기 위한 솔루션을 사용자에게 가이드할 수 있다.
동작 373에서 프로세서(120)는 메모리 크리티컬 로우 상황의 발생에 응답하여, 복원 동작(예: 전자 장치(101)의 리부팅, 복원 동작을 위한 사용자 인터페이스를 표시)을 수행할 수 있다. 예를 들어, 프로세서(120)는 복원 프로그램(예: 복원 어플리케이션 프로그램)을 통해 전자 장치(101)를 리부팅하거나, 사용자 인터페이스를 제공하여, 리부팅 시점을 설정할 수 있다. 예를 들어, 복원 프로그램은 복원 동작을 가이드하는 사용자 인터페이스를 표시할 수 있고, "바로 재부팅", "심야 시간 재부팅", "재부팅 시점의 설정" 등 다양한 옵션을 제공할 수 있다. 일 실시예에 따르면, 전자 장치(101)는 메모리 크리티컬 로우 상황이 발생하면, 설정된 솔루션(예: 복원 동작)을 수행하기 위한 가이드를 화면에 표시할 수 있고, 사용자의 선택에 응답하여, 상기 솔루션의 수행 여부를 결정할 수 있다.
다양한 실시예에 따른 전자 장치(101)에 있어서, 메모리 관리 모듈(330), 상기 메모리 관리 모듈(330)에 작동적으로 연결된 프로세서(120) 및, 상기 메모리 관리 모듈(303)에 의해 제어되고, 상기 프로세서(120)와 작동적으로 연결된 메모리(130)를 포함할 수 있다. 상기 메모리(130)는, 실행될 때, 상기 프로세서(120)가, 상기 적어도 하나의 프로세스를 실행하고, 기 설정된 제 1 사이클을 기반으로 상기 적어도 하나의 프로세스가 종료되는 비율을 확인하고, 상기 확인된 비율이 제 1 임계값을 초과하는 상황을 감지하고, 상기 감지된 상황이 연속적으로 발생하여 제 2 임계값을 초과하는 경우, 상기 전자 장치(101)를 리부팅하도록 하는 인스트럭션들을 저장할 수 있다.
일 실시예에 따르면, 프로세서(120)는, 상기 메모리(130)의 용량을 확인하고, 상기 확인된 메모리(130)의 용량을 기반으로 상기 제 1 임계값을 설정할 수 있다.
일 실시예에 따르면, 프로세서(120)는, 상기 메모리(130)의 용량을 확인하고, 상기 확인된 메모리(130)의 용량을 기반으로 상기 적어도 하나의 프로세스를 패키지로 그룹화하고, 상기 패키지가 재실행되는 경우 상기 재실행과 관련된 실행 횟수는 상기 패키지가 종료되는 비율에 반영하지 않을 수 있다. 예를 들어, 특정 어플리케이션 프로그램의 실행에 응답하여, 수행되는 적어도 하나의 프로세스는 하나의 패키지로 그룹화될 수 있다. 일 실시예에 따르면, 패키지는 도 2의 패키지 매니저(247)가 관리하는 패키지로 정의될 수 있다.
일 실시예에 따르면, 프로세서(120)는, 상기 제 1 사이클을 기반으로 상기 패키지에 기반한 종료 비율을 확인하고, 상기 확인된 패키지에 기반한 종료 비율이 제 3 임계값을 초과하는 경우, 상기 전자 장치를 리부팅할 수 있다.
일 실시예에 따르면, 상기 제 3 임계값은 약 50% 인 것을 특징으로 한다.
일 실시예에 따르면, 프로세서(120)는, 상기 확인된 비율이 상기 제 1 임계값을 초과하는 경우 상기 메모리(130)가 부족한 상황임을 확인하고, 상기 메모리(130)에 할당된 상기 적어도 하나의 프로세스를 종료시킬 수 있다.
일 실시예에 따르면, 프로세서(120)는, 상기 메모리(130)에 할당된 상기 적어도 하나의 프로세스의 우선 순위를 확인하고, 상기 확인된 우선 순위를 기반으로 상기 적어도 하나의 프로세스를 선택하고, 상기 선택된 적어도 하나의 프로세스를 종료시킬 수 있다.
일 실시예에 따르면, 프로세서(120)는, 상기 확인된 비율이 제 1 임계값을 초과하는 상황이 연속적으로 발생하여 상기 제 2 임계값을 초과하는 경우, 지속적으로 상기 메모리(130)에 문제가 발생하는 상태임을 확인하고, 상기 메모리(130)를 초기화하도록 상기 전자 장치를 리부팅할 수 있다.
일 실시예에 따르면, 프로세서(120)는, 상기 확인된 비율이 제 1 임계값을 초과하는 상황이 연속적으로 발생하지 않는 경우, 제 2 사이클을 기반으로 상기 적어도 하나의 프로세스가 종료되는 비율을 확인할 수 있다.
일 실시예에 따르면, 전자 장치(101)는, 상기 리부팅 관련 사용자 인터페이스를 표시하기 위한 디스플레이 모듈(160)을 더 포함하고, 프로세서(120)는, 상기 감지된 상황이 상기 제 2 임계값을 초과하여 발생할 때, 상기 디스플레이 모듈(160)을 통해 가이드를 표시하고, 상기 가이드에 대응하는 사용자 입력에 응답하여, 상기 전자 장치를 리부팅할 수 있다.
일 실시예에 따르면, 프로세서(120)는, 상기 메모리(130)에 저장된 사용 패턴을 확인하고, 상기 확인된 사용 패턴을 기반으로 상기 전자 장치(101)를 리부팅할 수 있다.
일 실시예에 따르면, 전자 장치(101)는, 서버(108)와 통신하기 위한 통신 모듈(190)을 더 포함하고, 프로세서(120)는, 상기 통신 모듈(190)을 사용하여 상기 서버(108)와 무선 통신을 수행하고, 상기 메모리(130)와 관련된 정보, 로그 정보, 및 시간 정보 중 적어도 하나를 상기 서버(108)로 전송할 수 있다.
일 실시예에 따르면, 프로세서(120)는, 상기 통신 모듈을 사용하여, 상기 서버로부터 리부팅 명령을 수신하고, 상기 리부팅 명령에 응답하여, 상기 전자 장치를 리부팅할 수 있다.
도 4는 본 발명의 다양한 실시예에 따른 하나의 사이클을 기준으로 메모리 부족 상황을 검출하는 과정이 도시된 예시도이다.
도 4를 참조하면, 전자 장치(예: 도 1의 전자 장치(101))는 어플리케이션 프로그램이 50회 실행되는 주기를 하나의 사이클(401)로 설정할 수 있다. 전자 장치(101)는 제 1 사이클(411)을 기반으로 실행되는 어플리케이션 프로그램과 관련하여 실행되는 적어도 하나의 프로세스를 확인할 수 있다. 일 실시예에 따르면, 전자 장치(101)는 제 1 사이클(411)을 기준으로 프로세스의 종료 횟수(예: 메모리 부족으로 프로세스가 종료된 회수)가 차지하는 비율을 확인할 수 있고, 상기 확인된 비율이 제 1 임계값을 초과하는 경우 메모리 크리티컬 상황(403)이 발생하였음을 확인할 수 있다. 일 실시예에 따르면, 전자 장치(101)는 제 1 사이클(411)이 완료되면, 제 2 사이클(412)을 이어서 수행할 수 있고, 제 2 사이클(412)이 완료되면, 제 3 사이클(413)을 이어서 수행할 수 있다. 전자 장치(101)는 하나의 사이클(401)을 기반으로 메모리가 부족한 상황(예: 메모리 크리티컬 상황(403))이 발생하였는지 여부를 확인할 수 있다. 도 4를 참조하면, 제 1 사이클(411) 구간 및 제 2 사이클(412) 구간에서는 메모리 크리티컬 상황(403)이 발생하지 않았고, 제 3 사이클(413) 구간 내지 제 6 사이클(416) 구간에서는 메모리 크리티컬 상황(403)이 발생했음을 확인할 수 있다.
일 실시예에 따르면, 전자 장치(101)는 하나의 사이클(401)(예: 어플리케이션 프로그램이 50회 실행)을 기준으로, 적어도 하나의 프로세스의 종료 횟수가 차지하는 비율을 확인할 수 있고, 상기 비율이 제 1 임계값을 초과하는 경우 메모리 크리티컬 상황(403)이 발생하였다고 판단할 수 있다. 일 실시예에 따르면, 전자 장치(101)는 메모리 크리티컬 상황(403)이 연속적으로 제 2 임계값(예: 4회) 이상 발생하는 경우 메모리 크리티컬 로우 상황(405)이 발생하였다고 판단할 수 있다. 예를 들어, 메모리 크리티컬 로우 상황(405)은 적어도 하나의 프로세스를 종료시키더라도 지속적으로 메모리가 부족한 상황이 발생하는 상황일 수 있다. 일 실시예에 따르면, 전자 장치(101)는 메모리 크리티컬 로우 상황(405)에 응답하여, 전자 장치(101)의 리부팅을 수행할 수 있다. 다른 실시예에 따르면, 전자 장치(101)는 메모리 크리티컬 로우 상황(405)에 응답하여, 리부팅 수행을 위한 가이드를 디스플레이 모듈(예: 도 1의 디스플레이 모듈(160))에 표시할 수 있고, 상기 가이드에 대한 사용자의 선택에 대응하여 상기 전자 장치(101)를 리부팅할 수 있다.
일 실시예에 따르면, 제 1 임계값은 메모리 크리티컬 상황(403)의 발생 여부를 판단하기 위한 기준값으로 정의될 수 있다. 일 실시예에 따르면, 제 1 임계값은 메모리의 용량을 기반으로 결정될 수 있다. 예를 들어, 제 1 임계값은 50을 메모리 용량(예: 2GB, 4GB, 및/또는 8GB)으로 나눈 값을 포함할 수 있다. 전자 장치(101)의 메모리 용량이 2GB인 경우 임계값은 약 25%로 결정될 수 있고, 메모리 용량이 8GB인 경우 임계값은 약 12.5%로 결정될 수 있다. 일 실시예에 따르면, 메모리 용량이 적은 전자 장치는 메모리(130)에 할당된 프로세스가 종료될 확률이 상대적으로 메모리 용량이 큰 전자 장치보다 높고, 메모리 크리티컬 상황(403)임을 판단하기 위한 기준값이 높을 수 있다. 반대로, 메모리 용량이 높은 전자 장치는 메모리 누수 문제가 발생하더라도 활용 가능한 공간이 많기 때문에, 상대적으로 메모리(130)에 할당된 프로세스가 종료될 확률이 낮을 수 있다. 메모리 용량이 높은 전자 장치는 일시적으로 프로세스가 종료되는 경우에도 사용자가 불편함을 체감할 수 있으므로, 메모리 크리티컬 상황(403)임을 판단하기 위한 기준값이 낮을 수 있다.
일 실시예에 따르면, 저용량(예: 약 4GB 이하)의 메모리가 탑재된 전자 장치(101)는 추가적으로 적어도 하나의 프로세스를 패키지 단위로 설정하고, 메모리(130) 내에서 패키지 단위로 종료된 비율을 확인할 수 있다. 일 실시예에 따르면, 저용량의 전자 장치(101)는 메모리(130) 내에서 패키지 단위로 종료된 비율이 약 50%를 초과하는 경우 메모리 크리티컬 상황(403)임을 판단할 수 있다. 예를 들어, 저용량의 전자 장치(101)는 하나의 사이클을 기준으로 적어도 하나의 프로세스가 종료되는 상황이 차지하는 비율을 확인하고, 상기 비율이 제 1 임계값을 초과하는지 여부를 확인할 수 있다. 저용량의 전자 장치(101)는 상기 비율이 제 1 임계값을 초과할 때, 추가적으로 상기 프로세스를 패키지 단위(예: 하나의 어플리케이션 프로그램을 하나의 패키지로 구분)로 그룹화하고, 메모리(130) 내에서 패키지 단위로 종료된 비율이 약 50%를 초과하는지 여부를 확인할 수 있다. 예를 들어, 제 1 어플리케이션 프로그램이 패키지 단위로 그룹화된 상태에서, 하나의 사이클을 기반으로 제 1 어플리케이션 프로그램이 중복적으로 실행되는 경우 중복 실행된 횟수는 카운팅하지 않을 수 있다. 제 1 어플리케이션 프로그램이 고사양의 프로그램인 경우 중복 실행될 때, 일시적으로 다수의 프로세스가 종료될 수 있고, 이로 인해 메모리 크리티컬 상황(403)이 감지될 수 있다. 일 실시예에 따르면, 저용량의 전자 장치(101)는 적어도 하나의 프로세스를 패키지 단위로 그룹화함으로써, 메모리 크리티컬 상황(403)이 발생되는 오류를 방지할 수 있다. 저용량의 전자 장치(101)는 상기 패키지 단위로 종료된 비율이 50%를 초과하는 경우 메모리 크리티컬 상황(403)임을 판단할 수 있다.
일 실시예에 따르면, 저용량의 전자 장치(101)에서 추가적으로 패키지 단위의 종료 비율을 확인하는 것은 고사양의 게임과 같은 특정 어플리케이션 프로그램이 실행되는 경우 일시적으로 다수의 프로세스가 종료되는 상황이 발생할 수 있고, 프로세스의 종료 비율만으로 메모리 크리티컬 상황(403) 감지에 오류가 발생할 수 있기 때문이다. 일 실시예에 따르면, 저용량의 전자 장치(101)는 추가적으로 메모리 내에서 패키지 단위로 종료된 비율을 비교 및 분석하여, 메모리 크리티컬 상황(403)을 확인할 수 있다. 예를 들어, 저용량의 전자 장치(101)는 패키지 단위로 메모리 크리티컬 상황(403)을 재차 확인함으로써, 일시적으로 발생하게 된 메모리 크리티컬 상황(403)의 발생 오류를 방지할 수 있다.
도 5는 본 발명의 다양한 실시예에 따른 메모리 부족 상황에 따른 메모리 관리 방법을 도시한 흐름도이다.
일 실시예에 따르면, 전자 장치(예: 도 1의 전자 장치(101))는 적어도 하나의 어플리케이션 프로그램이 50회 실행되는 주기를 하나의 사이클로 설정하고, 하나의 사이클을 기반으로 메모리가 부족한 상황(예: 메모리 크리티컬 상황)이 발생했는지 여부를 확인할 수 있다. 일 실시예에 따르면, 전자 장치(101)는 하나의 사이클을 기반으로 메모리(예: 도 1의 메모리(130))에 할당된 적어도 하나의 프로세스가 종료되는 비율을 확인할 수 있고, 상기 비율이 설정된 제 1 임계값을 초과하는 경우 메모리가 부족한 상황이 발생하였음을 판단할 수 있다. 전자 장치(101)는 제 2 임계값(예: 4번)의 사이클 동안 연속적으로 메모리가 부족한 상황이 발생하게 되면, 리부팅 동작을 수행할 수 있다.
동작 501에서 전자 장치(101)의 프로세서(예: 도 1의 프로세서(120))는 제 1 사이클을 기반으로 메모리(130)에 할당된 적어도 하나의 프로세스가 종료되는 비율을 확인할 수 있다. 예를 들어, 제 1 사이클은 전자 장치(101)에서 프로그램(예: 어플리케이션 프로그램)이 50회 실행되는 주기로 정의될 수 있다. 프로세서(120)는 제 1 사이클 동안 적어도 하나의 프로세스가 30번 종료되는 경우 상기 비율은 60%로 계산될 수 있다. 프로세서(120)는 제 1 사이클 동안 적어도 하나의 프로세스가 10번 종료되는 경우 상기 비율은 20%로 계산될 수 있다. 일 실시예에 따르면, 프로세서(120)는 프로그램이 50회 실행되는 1 주기(예: 제 1 사이클) 동안 메모리(예: 도 1의 메모리(130))에 할당된 적어도 하나의 프로세스가 종료되는 비율을 계산할 수 있다.
동작 503에서 프로세서(120)는 상기 확인된 비율이 제 1 임계값을 초과하는지 여부를 판단할 수 있다. 일 실시예에 따르면, 제 1 임계값은 메모리가 부족한 상황임을 판단하기 위한 기준값으로 정의될 수 있고, 메모리의 용량을 기반으로 결정될 수 있다. 예를 들어, 메모리의 용량이 클수록 제 1 임계값은 작게 설정될 수 있다. 메모리의 용량이 크다는 것은 메모리가 부족한 상황이 많이 발생하지 않는다고 해석되며, 메모리가 부족한 상황임을 판단하기 위해 제 1 임계값이 낮게 설정될 수 있다.
동작 505에서 프로세서(120)는 상기 확인된 비율이 상기 제 1 임계값을 초과하는 횟수가 연속적으로 발생하여 제 2 임계값을 초과하는 경우 전자 장치(101)를 리부팅할 수 있다. 예를 들어, 제 1 사이클을 주기로 상기 확인된 비율이 제 1 임계값을 초과하는 상황을 메모리 크리티컬 상황이라고 지칭할 수 있다. 제 2 임계값은 상기 메모리 크리티컬 상황이 연속적으로 발생된 횟수를 판단하기 위한 기준값일 수 있다. 일 실시예에 따르면, 제 2 임계값은 약 4회일 수 있고, 메모리 크리티컬 상황이 4번의 사이클동안 연속적으로 발생하는 상황은 메모리 크리티컬 로우 상황이라고 지칭할 수 있다. 프로세서(120)는 메모리 크리티컬 상황이 4번의 사이클 동안 연속적으로 발생하는 경우(메모리 크리티컬 로우 상황이 발생한 경우) 메모리의 부족한 상황이 해결되지 않고, 지속적으로 메모리 문제가 발생하는 상황이라고 판단할 수 있다. 프로세서(120)는 메모리 부족 상황을 해결하기 위해 리부팅 동작을 수행할 수 있다.
도 6은 본 발명의 다양한 실시예에 따른 메모리 용량을 고려하여 메모리를 관리하는 방법을 도시한 흐름도이다.
도 6의 동작 601 내지 동작 603은 도 5의 동작 501 내지 동작 503과 동일한 동작이 수행될 수 있다. 도 6의 흐름도는 도 5와 비교하여, 추가적으로 메모리 용량이 저사양(예: 4GB 이하)인지 여부를 판단하고, 저사양인 경우의 추가 동작을 수행하는 흐름도이다.
동작 601에서 전자 장치(101)의 프로세서(예: 도 1의 프로세서(120))는 제 1 사이클을 기반으로 적어도 하나의 프로세스가 종료되는 비율을 확인할 수 있다. 예를 들어, 제 1 사이클은 전자 장치(101)에서 프로그램(예: 어플리케이션 프로그램)이 50회 실행되는 주기로 정의될 수 있다.
동작 603에서 프로세서(120)는 상기 확인된 비율이 제 1 임계값을 초과하는지 여부를 판단할 수 있다. 일 실시예에 따르면, 제 1 임계값은 메모리가 부족한 상황임을 판단하기 위한 기준값으로 정의될 수 있고, 메모리의 용량을 기반으로 결정될 수 있다. 예를 들어, 메모리의 용량이 클수록 제 1 임계값은 작게 설정될 수 있다. 일 실시예에 따르면, 상기 확인된 비율이 제 1 임계값을 초과하는 상황을 메모리 크리티컬 상황이라고 지칭할 수 있다.
동작 603에서 상기 확인된 비율이 제 1 임계값을 초과하면, 동작 605에서 프로세서(120)는 메모리의 용량이 저사양인지 여부를 확인할 수 있다. 예를 들어, 메모리의 용량이 저사양인 전자 장치는 메모리의 용량이 약 4GB 이하인 전자 장치를 포함할 수 있다. 메모리의 용량이 저사양인 전자 장치(101)는 특정 어플리케이션 프로그램이 실행될 때, 메모리의 용량이 고사양인 전자 장치보다 메모리가 부족한 상황(예: 메모리 크리티컬 상황)이 상대적으로 자주 발생할 수 있다. 일 실시예에 따르면, 저사양의 메모리가 장착된 전자 장치(101)는 추가적으로 메모리에 할당된 적어도 하나의 프로세스를 패키지로 그룹화하여, 상기 패키지를 기반으로 종료되는 비율을 확인할 수 있다.
동작 605에서 메모리의 용량이 저사양이 아닌 경우 동작 607에서 프로세서(120)는 상기 확인된 비율이 제 1 임계값을 초과하는 횟수(예: 메모리 크리티컬 상황의 발행 횟수)가 연속적으로 발생하여 제 2 임계값(예: 약 4회)을 초과하는지 여부를 확인할 수 있다. 예를 들어, 프로세서(120)는 하나의 사이클에 기반한 메모리 크리티컬 상황이 연속적으로 4회 이상 발생하는지 여부를 확인할 수 있다. 프로세서(120)는 4번의 사이클 주기 동안 메모리 크리티컬 상황이 계속적으로 발생하게 되면, 메모리의 부족한 상황이 해결되지 않고 있음을 판단할 수 있다. 일 실시예에 따르면, 제 2 임계값은 4회일 수 있고, 메모리 크리티컬 상황이 4번의 사이클동안 연속적으로 발생하는 상황은 메모리 크리티컬 로우 상황이라고 지칭할 수 있다.
다른 실시예에 따르면, 프로세서(120)는 메모리 크리티컬 로우 상황이 발생할 때, 서버(예: 도 1의 서버(108))에 전자 장치(101)의 로그(log) 정보를 전송할 수 있고, 서버(108)는 상기 로그 정보를 메모리에 저장할 수 있다. 예를 들어, 서버(108)는 메모리 크리티컬 로우 상황에 대응하는 로그 정보를 수집할 수 있고, 상기 메모리 크리티컬 로우 상황에 대응하는 솔루션을 전자 장치(101)에 제공할 수 있다.
동작 609에서 프로세서(120)는 메모리 크리티컬 로우 상황(예: 메모리 크리티컬 상황이 연속적으로 4회 발생하는 상황)이 발생하는 경우 리부팅을 수행할 수 있다. 일 실시예에 따르면, 프로세서(120)는 메모리의 부족 문제가 지속적으로 발생하는 경우 시스템의 초기화 동작을 수행할 수 있다. 다른 실시예에 따르면, 프로세서(120)는 리부팅을 수행하기 전에, 제 1 사이클에 기반한 메모리 크리티컬 상황의 발생 정보 및 시간 정보를 메모리(130)에 로그(log) 정보로 저장할 수 있다. 다른 실시예에 따르면, 프로세서(120)는 메모리(130)와 관련된 문제를 확인하기 위해, 메모리(130)에 저장된 로그 정보를 활용할 수 있다.
동작 605에서 메모리의 용량이 저사양인 경우 동작 611에서 프로세서(120)는 패키지 단위(예: 하나의 어플리케이션 프로그램을 하나의 패키지로 구분)를 기반으로 적어도 하나의 프로세스가 종료되는 비율이 절반(예: 약 50%) 이상인지 여부를 확인할 수 있다. 예를 들어, 프로세서(120)는 제 1 어플리케이션 프로그램을 제 1 그룹으로 그룹화할 수 있고, 하나의 사이클을 기반으로 제 1 어플리케이션 프로그램이 중복 실행되더라도 중복 실행된 횟수는 카운팅하지 않을 수 있다. 예를 들어, 고사양 프로그램인 제 1 어플리케이션 프로그램이 중복적으로 실행된다면, 메모리 용량이 저사양인 전자 장치(101)는 일시적으로 메모리(130)에 할당된 다수의 프로세스를 종료하게 되고, 메모리 크리티컬 상황이 발생할 수 있다. 일 실시예에 따르면, 프로세서(120)는 고사양의 특정 프로그램의 실행으로 인해, 메모리 크리티컬 상황이 발생하는 문제를 방지하기 위해, 메모리(130)에 할당된 적어도 하나의 프로세스를 패키지로 그룹화하여 관리할 수 있다. 동작 611에서 프로세서(120)는 패키지화된 적어도 하나의 프로세스의 종료 비율이 절반 이상인지 여부를 확인할 수 있다. 동작 611에서 상기 종료 비율이 절반 이상인 경우 동작 607로 이동할 수 있다.
동작 607에서 메모리 크리티컬 로우 상황(예: 메모리 크리티컬 상황이 연속적으로 4회 발생하는 상황)이 발생하지 않은 경우 프로세서(120)는 동작 613에서 제 2 사이클에 기반하여 메모리(130)에 할당된 적어도 하나의 프로세스를 확인할 수 있다. 다른 실시예에 따르면, 프로세서(120)는 제 2 사이클을 시작하기 전에, 제 1 사이클에 기반한 메모리 크리티컬 상황과 관련된 정보 및 시간 정보를 전자 장치(101)의 로그(log) 정보로 메모리(130)에 저장할 수 있다.
다른 실시예에 따르면, 전자 장치(101)는 최근 약 25개의 사이클 동안의 메모리 크리티컬 상황 및 메모리 크리티컬 로우 상황의 발생 횟수를 비교 및 분석할 수 있다. 전자 장치(101)는 상기 비교 및 분석된 정보 및 메모리(130)에 저장된 로그 정보를 서버(108)에 전송할 수 있다. 다른 실시예에 따르면, 서버(108)는 전자 장치(101)의 종류에 따라 메모리 문제가 발생되는 상황을 분석할 수 있다. 서버(108)는 메모리 문제가 발생한 시간을 기반으로 메모리 문제의 발생 원인을 분석할 수 있다. 서버(108)는 주기적으로 전자 장치(101)에서 발생된 메모리 크리티컬 상황 및 메모리 크리티컬 로우 상황을 분석할 수 있고, 메모리 문제를 해결하기 위한 솔루션을 생성할 수 있다. 예를 들어, 솔루션은 메모리 부족 상황에 따른 가이드 정보를 나타내는 사용자 인터페이스를 화면에 표시할 수 있고, 사용자에게 알림을 제공함으로써, 상기 메모리 부족 상황을 최소화하는 데 활용될 수 있다. 다른 실시예에 따르면, 서버(108)는 전자 장치(101)의 모델(예: 종류, 및/또는 타입)을 기반으로 적어도 하나의 솔루션을 제공할 수 있다. 서버(108)는 전자 장치(101)의 사용 패턴을 확인하여, 전자 장치(101)의 사용이 상대적으로 적은 새벽 시간에 맞춰서 솔루션이 적용될 수 있도록 상기 솔루션을 설계 및 생성할 수 있다. 예를 들어, 사용 패턴은 사용자가 전자 장치(101)를 사용하는 시간 정보, 사용자가 자주 사용하는 프로그램 정보 및/또는 전자 장치(101)의 시간 대별 위치 정보를 포함할 수 있다.
도 7a는 본 발명의 다양한 실시예에 따른 하나의 사이클을 기준으로 프로세스가 종료되는 비율을 검출하는 방법을 도시한 예시도이다. 도 7b는 본 발명의 다양한 실시예에 따른 메모리 용량을 기반으로, 프로세스의 종료 비율이 다르게 적용되는 테이블이다.
도 7a를 참조하면, 전자 장치(예: 도 1의 전자 장치(101))의 프로세서(예: 도 1의 프로세서(120))는 하나의 사이클을 기준으로 적어도 하나의 프로그램이 실행될 때, 메모리(예: 도 1의 메모리(130))에 할당된 적어도 하나의 프로세스가 종료되는지 여부를 확인할 수 있다. 적어도 하나의 프로세스가 종료되는 상황을 크리티컬 킬이라고 지칭할 수 있다. 예를 들어, 프로세서(120)는 "인터넷 프로그램"이 실행될 때, 크리티컬 킬이 발생하지 않음을 확인할 수 있다. 프로세서(120)는 "게임1 프로그램"이 실행될 때, 크리티컬 킬이 발생하였음을 확인할 수 있다. 일 실시예에 따르면, 전자 장치(101)는 하나의 사이클(예: 적어도 하나의 어플리케이션 프로그램이 50회 실행되는 주기)을 기반으로 크리티컬 킬이 발생하는 비율을 계산할 수 있다. 도 7a를 참조하면, 프로세서(120)는 총 9번의 프로그램이 실행되는 동안 3번의 크리티컬 킬이 발생하였음을 확인할 수 있고, 프로세스가 종료되는 비율이 약 33% 임을 계산할 수 있다. 도 7a는 9번의 프로그램이 실행되는 상황이 도시되었으나, 이에 한정되지는 않는다. 일 실시예에 따르면, 전자 장치(101)는 50번의 어플리케이션 프로그램이 실행되는 주기(예: 제 1 사이클) 동안 적어도 하나의 프로세스가 종료되는 비율을 확인할 수 있다. 일 실시예에 따르면, 전자 장치(101)는 하나의 사이클을 기반으로 메모리(130)에 할당된 적어도 하나의 프로세스가 종료되는 비율을 설정된 임계값과 비교할 수 있고, 메모리(130)가 부족한 상황(예: 메모리 크리티컬 상황)이 발생하였는지 여부를 판단할 수 있다.
도 7b를 참조하면, 전자 장치(101)는 메모리(130)의 용량을 기반으로 제 1 임계값(예: 기준치, 메모리 크리티컬 상황임을 판단하기 위한 기준값)이 다르게 설정될 수 있다. 예를 들어, 전자 장치(101)는 부팅 시점에서 프레임워크(예: 도 3의 프레임워크(330))를 통해 메모리(130)의 용량을 확인할 수 있고, 상기 확인된 메모리(130)의 용량을 기반으로 제 1 임계값을 결정할 수 있다. 일 실시예에 따르면, 메모리(130)의 용량이 낮은 전자 장치(101)는 상대적으로 제 1 임계값이 높게 설정될 수 있고, 메모리(130)의 용량이 높은 전자 장치(101)는 상대적으로 제 1 임계값이 낮게 설정될 수 있다. 예를 들어, 제 1 임계값은 50을 메모리 용량(예: 2GB, 4GB, 및/또는 8GB)으로 나눈 값으로 결정될 수 있다. 일 실시예에 따르면, 메모리 용량이 적은 전자 장치는 프로세스가 종료될 확률이 상대적으로 메모리 용량이 큰 전자 장치보다 높고, 메모리 크리티컬 상황임을 판단하기 위한 기준치가 높을 수 있다. 반대로, 메모리 용량이 높은 전자 장치는 메모리 누수 문제가 발생하더라도 활용 가능한 공간이 많기 때문에, 상대적으로 프로세스가 종료될 확률이 낮을 수 있다. 메모리 용량이 높은 전자 장치는 일시적으로 프로세스가 종료되는 경우에도 사용자가 불편함을 체감할 수 있으므로, 메모리 크리티컬 상황임을 판단하기 위한 기준치가 낮을 수 있다.
도 8a는 본 발명의 다양한 실시예에 따른 하나의 사이클을 기준으로 패키지화된 프로세스가 종료되는 비율을 검출하는 방법을 도시한 예시도이다. 도 8b는 본 발명의 다양한 실시예에 따른 패키지화된 프로세스를 기반으로 해당 프로세스가 종료되었는지 여부를 확인하는 테이블이다.
도 8a를 참조하면, 전자 장치(예: 도 1의 전자 장치(101))의 프로세서(예: 도 1의 프로세서(120))는 하나의 사이클을 기준으로 적어도 하나의 프로그램이 실행될 때, 메모리(예: 도 1의 메모리(130))에 할당된 적어도 하나의 프로세스가 종료되는지 여부를 확인할 수 있다. 적어도 하나의 프로세스가 종료되는 상황을 크리티컬 킬이라고 지칭할 수 있다. 일 실시예에 따르면, 프로세서(120)는 적어도 하나의 프로세스를 패키지로 그룹화하여, 적어도 하나의 프로세스가 종료되는 횟수에 반영할 수 있다. 예를 들어, 특정 어플리케이션 프로그램의 실행에 응답하여, 수행되는 적어도 하나의 프로세스는 하나의 패키지로 그룹화될 수 있다. 일 실시예에 따르면, 패키지는 도 2의 패키지 매니저(247)가 관리하는 패키지로 정의될 수 있다. 일 실시예에 따르면, 메모리의 용량이 저사양인 전자 장치(101)는 적어도 하나의 프로세스를 패키지로 그룹화할 수 있고, 패키지화된 프로세스의 종료 비율을 기반으로 메모리 크리티컬 상황의 발생 여부를 결정할 수 있다. 일 실시예에 따르면, 저사양의 메모리가 장착된 전자 장치(101)는 고사양의 프로세스를 실행함에 있어서, 메모리에 할당된 다수의 프로세스가 종료될 수 있고, 메모리 크리티컬 상황이 발생될 수 있다. 전자 장치(101)는 고사양의 프로세스의 실행에 따른 메모리 크리티컬 상황의 발생을 방지하기 위해, 메모리(130)에 할당된 적어도 하나의 프로세스를 패키지로 그룹화하여 관리할 수 있다.
예를 들어, 프로세서(120)는 패키지화된 프로세스가 중복 실행되는 경우 크리티컬 킬의 발생 여부를 카운팅하지 않을 수 있다. 예를 들어, 프로세서(120)는 최초 "인터넷 프로그램"이 실행되고, "게임1 프로그램"이 실행되고, 다시 "인터넷 프로그램"이 실행되는 경우 재실행된 "인터넷 프로그램"에 대응되는 크리티컬 킬의 발생 여부를 무시할 수 있다. "게임1 프로그램"도 재차 실행되는 경우, 재실행된 "게임1 프로그램"에 대응되는 크리티컬 킬의 발생 여부를 무시할 수 있다.
도 8a 및 도 8b를 참조하면, 프로세서(120)는 총 9번의 프로그램이 실행되는 동안 3번의 크리티컬 킬이 발생하였음을 확인할 수 있다. 하지만, 9번의 프로그램이 실행된 것 중에서 4번이 중복되어 실행되었으므로, 프로세서(120)는 중복 실행된 4번의 실행 과정을 카운팅하지 않을 수 있다. 일 실시예에 따르면, 프로세서(120)는 패키지화된 프로세스를 기반으로, 총 5번의 프로그램 실행 중에서 크리티컬 킬이 2번 발생하였음을 확인할 수 있다. 프로세서(120)는 패키지화된 프로세스의 종료 비율을 40%로 계산할 수 있다. 일 실시예에 따르면, 프로세서(120)는 패키지화된 프로세스의 종료 비율이 약 50% 이상인 경우 메모리 크리티컬 상황이 발생하였다고 판단할 수 있다.
다양한 실시예에 따른 방법에 있어서, 전자 장치의 메모리를 관리하는 메모리 관리 모듈의 제어 하에 적어도 하나의 프로세스를 실행하는 동작, 기 설정된 제 1 사이클을 기반으로 상기 적어도 하나의 프로세스가 종료되는 비율을 확인하는 동작, 상기 확인된 비율이 제 1 임계값을 초과하는 상황을 감지하는 동작, 및 상기 감지된 상황이 연속적으로 발생하여 제 2 임계값을 초과하는 경우 리부팅 동작을 수행하는 동작을 포함할 수 있다.
일 실시예에 따르면, 상기 제 1 임계값은 메모리의 용량을 기반으로 설정되는 것을 특징으로 한다.
일 실시예에 따른 방법은, 메모리의 용량을 확인하는 동작, 상기 확인된 메모리의 용량을 기반으로 상기 적어도 하나의 프로세스를 패키지로 그룹화할지 여부를 결정하는 동작, 및 상기 적어도 하나의 프로세스를 패키지화하여, 상기 패키지가 재실행되는 경우 상기 재실행과 관련된 실행 횟수는 상기 패키지가 종료되는 비율에 반영하지 않는 동작을 더 포함할 수 있다.
본 문서에 개시된 다양한 실시예들에 따른 전자 장치는 다양한 형태의 장치가 될 수 있다. 전자 장치는, 예를 들면, 휴대용 통신 장치(예: 스마트폰), 컴퓨터 장치, 휴대용 멀티미디어 장치, 휴대용 의료 기기, 카메라, 웨어러블 장치, 또는 가전 장치를 포함할 수 있다. 본 문서의 실시예에 따른 전자 장치는 전술한 기기들에 한정되지 않는다.
본 문서의 다양한 실시예들 및 이에 사용된 용어들은 본 문서에 기재된 기술적 특징들을 특정한 실시예들로 한정하려는 것이 아니며, 해당 실시예의 다양한 변경, 균등물, 또는 대체물을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 또는 관련된 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 아이템에 대응하는 명사의 단수 형은 관련된 문맥상 명백하게 다르게 지시하지 않는 한, 상기 아이템 한 개 또는 복수 개를 포함할 수 있다. 본 문서에서, "A 또는 B", "A 및 B 중 적어도 하나", "A 또는 B 중 적어도 하나", "A, B 또는 C", "A, B 및 C 중 적어도 하나", 및 "A, B, 또는 C 중 적어도 하나"와 같은 문구들 각각은 그 문구들 중 해당하는 문구에 함께 나열된 항목들 중 어느 하나, 또는 그들의 모든 가능한 조합을 포함할 수 있다. "제 1", "제 2", 또는 "첫째" 또는 "둘째"와 같은 용어들은 단순히 해당 구성요소를 다른 해당 구성요소와 구분하기 위해 사용될 수 있으며, 해당 구성요소들을 다른 측면(예: 중요성 또는 순서)에서 한정하지 않는다. 어떤(예: 제 1) 구성요소가 다른(예: 제 2) 구성요소에, "기능적으로" 또는 "통신적으로"라는 용어와 함께 또는 이런 용어 없이, "커플드" 또는 "커넥티드"라고 언급된 경우, 그것은 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로(예: 유선으로), 무선으로, 또는 제 3 구성요소를 통하여 연결될 수 있다는 것을 의미한다.
본 문서의 다양한 실시예들에서 사용된 용어 "모듈"은 하드웨어, 소프트웨어 또는 펌웨어로 구현된 유닛을 포함할 수 있으며, 예를 들면, 로직, 논리 블록, 부품, 또는 회로와 같은 용어와 상호 호환적으로 사용될 수 있다. 모듈은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는, 상기 부품의 최소 단위 또는 그 일부가 될 수 있다. 예를 들면, 일실시예에 따르면, 모듈은 ASIC(application-specific integrated circuit)의 형태로 구현될 수 있다.
본 문서의 다양한 실시예들은 기기(machine)(예: 전자 장치(101)) 의해 읽을 수 있는 저장 매체(storage medium)(예: 내장 메모리(136) 또는 외장 메모리(138))에 저장된 하나 이상의 명령어들을 포함하는 소프트웨어(예: 프로그램(140))로서 구현될 수 있다. 예를 들면, 기기(예: 전자 장치(101))의 프로세서(예: 프로세서(120))는, 저장 매체로부터 저장된 하나 이상의 명령어들 중 적어도 하나의 명령을 호출하고, 그것을 실행할 수 있다. 이것은 기기가 상기 호출된 적어도 하나의 명령어에 따라 적어도 하나의 기능을 수행하도록 운영되는 것을 가능하게 한다. 상기 하나 이상의 명령어들은 컴파일러에 의해 생성된 코드 또는 인터프리터에 의해 실행될 수 있는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장 매체는, 비일시적(non-transitory) 저장 매체의 형태로 제공될 수 있다. 여기서, ‘비일시적’은 저장 매체가 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장 매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다.
일실시예에 따르면, 본 문서에 개시된 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory(CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 또는 두 개의 사용자 장치들(예: 스마트 폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.
다양한 실시예들에 따르면, 상기 기술한 구성요소들의 각각의 구성요소(예: 모듈 또는 프로그램)는 단수 또는 복수의 개체를 포함할 수 있으며, 복수의 개체 중 일부는 다른 구성요소에 분리 배치될 수도 있다. 다양한 실시예들에 따르면, 전술한 해당 구성요소들 중 하나 이상의 구성요소들 또는 동작들이 생략되거나, 또는 하나 이상의 다른 구성요소들 또는 동작들이 추가될 수 있다. 대체적으로 또는 추가적으로, 복수의 구성요소들(예: 모듈 또는 프로그램)은 하나의 구성요소로 통합될 수 있다. 이런 경우, 통합된 구성요소는 상기 복수의 구성요소들 각각의 구성요소의 하나 이상의 기능들을 상기 통합 이전에 상기 복수의 구성요소들 중 해당 구성요소에 의해 수행되는 것과 동일 또는 유사하게 수행할 수 있다. 다양한 실시예들에 따르면, 모듈, 프로그램 또는 다른 구성요소에 의해 수행되는 동작들은 순차적으로, 병렬적으로, 반복적으로, 또는 휴리스틱하게 실행되거나, 상기 동작들 중 하나 이상이 다른 순서로 실행되거나, 생략되거나, 또는 하나 이상의 다른 동작들이 추가될 수 있다.

Claims (15)

  1. 전자 장치에 있어서,
    메모리 관리 모듈;
    상기 메모리 관리 모듈에 작동적으로 연결된 프로세서; 및
    상기 메모리 관리 모듈에 의해 제어되고, 상기 프로세서와 작동적으로 연결된 메모리를 포함하고,
    상기 메모리는, 실행될 때, 상기 프로세서가,
    상기 적어도 하나의 프로세스를 실행하고, 기 설정된 제 1 사이클을 기반으로 상기 적어도 하나의 프로세스가 종료되는 비율을 확인하고, 상기 확인된 비율이 제 1 임계값을 초과하는 상황을 감지하고, 상기 감지된 상황이 연속적으로 발생하여 제 2 임계값을 초과하는 경우, 상기 전자 장치를 리부팅하도록 하는 인스트럭션들을 저장하는 전자 장치.
  2. 제 1 항에 있어서,
    상기 프로세서는,
    상기 메모리의 용량을 확인하고,
    상기 확인된 메모리의 용량을 기반으로 상기 제 1 임계값을 설정하는 전자 장치.
  3. 제 1 항에 있어서,
    상기 프로세서는,
    상기 메모리의 용량을 확인하고,
    상기 확인된 메모리의 용량을 기반으로 상기 적어도 하나의 프로세스를 패키지로 그룹화하고,
    상기 패키지가 재실행되는 경우 상기 재실행과 관련된 실행 횟수는 상기 패키지가 종료되는 비율에 반영하지 않는 전자 장치.
  4. 제 3 항에 있어서,
    상기 프로세서는,
    상기 제 1 사이클을 기반으로 상기 패키지에 기반한 종료 비율을 확인하고,
    상기 확인된 패키지에 기반한 종료 비율이 제 3 임계값을 초과하는 경우, 상기 전자 장치를 리부팅하고,
    상기 제 3 임계값은 약 50% 인 것을 특징으로 하는 전자 장치.
  5. 제 1 항에 있어서,
    상기 프로세서는,
    상기 확인된 비율이 상기 제 1 임계값을 초과하는 경우 상기 메모리가 부족한 상황임을 확인하고,
    상기 메모리에 할당된 상기 적어도 하나의 프로세스의 우선 순위를 확인하고,
    상기 확인된 우선 순위를 기반으로 상기 적어도 하나의 프로세스를 선택하고,
    상기 선택된 적어도 하나의 프로세스를 종료시키는 전자 장치.
  6. 제 1 항에 있어서,
    상기 프로세서는,
    상기 확인된 비율이 제 1 임계값을 초과하는 상황이 연속적으로 발생하여 상기 제 2 임계값을 초과하는 경우, 지속적으로 상기 메모리에 문제가 발생하는 상태임을 확인하고, 상기 메모리를 초기화하도록 상기 전자 장치를 리부팅하고,
    상기 확인된 비율이 제 1 임계값을 초과하는 상황이 연속적으로 발생하지 않는 경우, 제 2 사이클을 기반으로 상기 적어도 하나의 프로세스가 종료되는 비율을 확인하는 전자 장치.
  7. 제 1 항에 있어서,
    상기 리부팅 관련 사용자 인터페이스를 표시하기 위한 디스플레이 모듈을 더 포함하고,
    상기 프로세서는,
    상기 감지된 상황이 상기 제 2 임계값을 초과하여 발생할 때, 상기 디스플레이 모듈을 통해 가이드를 표시하고,
    상기 가이드에 대응하는 사용자 입력에 응답하여, 상기 전자 장치를 리부팅하는 전자 장치.
  8. 제 1 항에 있어서,
    상기 프로세서는,
    상기 메모리에 저장된 사용 패턴을 확인하고,
    상기 확인된 사용 패턴을 기반으로 상기 전자 장치를 리부팅하는 전자 장치.
  9. 제 1 항에 있어서,
    서버와 통신하기 위한 통신 모듈을 더 포함하고,
    상기 프로세서는,
    상기 통신 모듈을 사용하여 상기 서버와 무선 통신을 수행하고,
    상기 메모리와 관련된 정보, 로그 정보, 및 시간 정보 중 적어도 하나를 상기 서버로 전송하고,
    상기 통신 모듈을 사용하여, 상기 서버로부터 리부팅 명령을 수신하고, 상기 리부팅 명령에 응답하여, 상기 전자 장치를 리부팅하는 전자 장치.
  10. 방법에 있어서,
    전자 장치의 메모리를 관리하는 메모리 관리 모듈의 제어 하에 적어도 하나의 프로세스를 실행하는 동작;
    기 설정된 제 1 사이클을 기반으로 상기 적어도 하나의 프로세스가 종료되는 비율을 확인하는 동작;
    상기 확인된 비율이 제 1 임계값을 초과하는 상황을 감지하는 동작; 및
    상기 감지된 상황이 연속적으로 발생하여 제 2 임계값을 초과하는 경우 리부팅 동작을 수행하는 동작; 을 포함하는 방법.
  11. 제 10 항에 있어서,
    상기 제 1 임계값은 메모리의 용량을 기반으로 설정되는 것을 특징으로 하는 방법.
  12. 제 10 항에 있어서,
    상기 메모리의 용량을 확인하는 동작;
    상기 확인된 메모리의 용량을 기반으로 상기 적어도 하나의 프로세스를 패키지로 그룹화할지 여부를 결정하는 동작; 및
    상기 적어도 하나의 프로세스를 패키지화하여, 상기 패키지가 재실행되는 경우 상기 재실행과 관련된 실행 횟수는 상기 패키지가 종료되는 비율에 반영하지 않는 동작; 을 더 포함하는 방법.
  13. 제 12 항에 있어서,
    상기 제 1 사이클을 기반으로 상기 패키지에 기반한 종료 비율을 확인하는 동작; 및
    상기 확인된 패키지에 기반한 종료 비율이 제 3 임계값을 초과하는 경우, 상기 전자 장치를 리부팅하는 동작; 을 더 포함하는 방법.
  14. 제 10 항에 있어서,
    상기 확인된 비율이 상기 제 1 임계값을 초과하는 경우 상기 메모리가 부족한 상황임을 확인하는 동작;
    상기 메모리에 할당된 상기 적어도 하나의 프로세스의 우선 순위를 확인하는 동작;
    상기 확인된 우선 순위를 기반으로 상기 적어도 하나의 프로세스를 선택하는 동작; 및
    상기 선택된 적어도 하나의 프로세스를 종료시키는 동작; 을 더 포함하는 방법.
  15. 제 10 항에 있어서,
    상기 리부팅 동작을 수행하는 동작은,
    상기 확인된 비율이 제 1 임계값을 초과하는 상황이 연속적으로 발생하여 상기 제 2 임계값을 초과하는 경우, 지속적으로 상기 메모리에 문제가 발생하는 상태임을 확인하는 동작; 및
    상기 메모리를 초기화하도록 상기 전자 장치를 리부팅하는 동작; 을 포함하는 방법.
PCT/KR2021/008712 2020-08-04 2021-07-08 메모리 관리 방법 및 전자 장치 WO2022030774A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/106,131 US20230185458A1 (en) 2020-08-04 2023-02-06 Memory management method and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020200097160A KR20220017085A (ko) 2020-08-04 2020-08-04 메모리 관리 방법 및 전자 장치
KR10-2020-0097160 2020-08-04

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/106,131 Continuation US20230185458A1 (en) 2020-08-04 2023-02-06 Memory management method and electronic device

Publications (1)

Publication Number Publication Date
WO2022030774A1 true WO2022030774A1 (ko) 2022-02-10

Family

ID=80117360

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/008712 WO2022030774A1 (ko) 2020-08-04 2021-07-08 메모리 관리 방법 및 전자 장치

Country Status (3)

Country Link
US (1) US20230185458A1 (ko)
KR (1) KR20220017085A (ko)
WO (1) WO2022030774A1 (ko)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080052339A (ko) * 2006-12-05 2008-06-11 한국전자통신연구원 임베디드 시스템을 위한 메모리 부족상황 관리 방법 및장치
KR101300806B1 (ko) * 2007-01-17 2013-08-26 삼성전자주식회사 다중 프로세스 시스템에서 오동작 처리 장치 및 방법
KR20140127104A (ko) * 2013-04-24 2014-11-03 삼성전자주식회사 사용자 디바이스의 메모리 관리 방법 및 장치
JP2016207122A (ja) * 2015-04-28 2016-12-08 京セラドキュメントソリューションズ株式会社 電子機器およびリブートプログラム
KR20200015000A (ko) * 2018-08-02 2020-02-12 삼성전자주식회사 메모리 누수 검출 방법 및 그 전자 장치

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080052339A (ko) * 2006-12-05 2008-06-11 한국전자통신연구원 임베디드 시스템을 위한 메모리 부족상황 관리 방법 및장치
KR101300806B1 (ko) * 2007-01-17 2013-08-26 삼성전자주식회사 다중 프로세스 시스템에서 오동작 처리 장치 및 방법
KR20140127104A (ko) * 2013-04-24 2014-11-03 삼성전자주식회사 사용자 디바이스의 메모리 관리 방법 및 장치
JP2016207122A (ja) * 2015-04-28 2016-12-08 京セラドキュメントソリューションズ株式会社 電子機器およびリブートプログラム
KR20200015000A (ko) * 2018-08-02 2020-02-12 삼성전자주식회사 메모리 누수 검출 방법 및 그 전자 장치

Also Published As

Publication number Publication date
US20230185458A1 (en) 2023-06-15
KR20220017085A (ko) 2022-02-11

Similar Documents

Publication Publication Date Title
WO2018155854A1 (ko) 포고 모듈 및 이를 포함하는 전자 장치
WO2022030893A1 (ko) 오디오 공유를 지원하는 전자 장치
WO2021060836A1 (ko) 어플리케이션 실행 방법 및 장치
WO2022030903A1 (ko) 어플리케이션 설치 방법 및 이를 지원하는 전자 장치
WO2021075905A1 (en) Application optimization method and electronic device supporting the same
WO2021020711A1 (ko) 불량을 예측하는 전자 장치 및 그 전자 장치의 제어 방법
WO2021006574A1 (en) Method and apparatus for managing application
WO2022149771A1 (ko) 전자 장치 및 이를 이용한 메모리 관리 방법
WO2022030774A1 (ko) 메모리 관리 방법 및 전자 장치
WO2022154414A1 (ko) 전자 장치 및 전자 장치의 스토리지 운영 방법
WO2022154380A1 (ko) 전자 장치 및 전자 장치의 메모리 관리 방법
WO2022255652A1 (ko) 어플리케이션 업데이트 방법 및 그 전자 장치
WO2021206374A1 (ko) 전자 장치 및 이를 이용한 태스크 스케쥴링 방법
KR20230118391A (ko) 전자 장치 및 이의 동작 방법
WO2021162439A1 (en) Electronic device performing restoration on basis of comparison of constant value and control method thereof
WO2022030964A1 (ko) 가상 메모리의 할당 방법 및 이를 지원하는 전자 장치
WO2022149970A1 (ko) 서비스 운용 방법 및 이를 지원하는 전자 장치
WO2020022616A1 (ko) 전자 장치 및 그의 동작 방법
WO2022177061A1 (ko) 비정상적인 앱을 백그라운드에서 미리 로딩하는 전자 장치 및 그의 동작 방법
WO2024071861A1 (ko) 업데이트 방법 및 이를 위한 전자 장치
WO2023013866A1 (ko) 어플리케이션 최적화 방법 및 이를 지원하는 장치
WO2024072117A1 (ko) 전자 장치 및 어플리케이션 간의 통신 방법
WO2022244961A1 (ko) 제어 방법 및 그 방법을 이용하는 장치
WO2022163907A1 (ko) 전자 장치 및 이의 제어 방법
WO2023022359A1 (ko) 어플리케이션의 실행 오류를 검출하는 전자 장치 및 그 작동 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21852592

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21852592

Country of ref document: EP

Kind code of ref document: A1