WO2022059978A1 - 전자장치 및 그 제어방법 - Google Patents

전자장치 및 그 제어방법 Download PDF

Info

Publication number
WO2022059978A1
WO2022059978A1 PCT/KR2021/011982 KR2021011982W WO2022059978A1 WO 2022059978 A1 WO2022059978 A1 WO 2022059978A1 KR 2021011982 W KR2021011982 W KR 2021011982W WO 2022059978 A1 WO2022059978 A1 WO 2022059978A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory
data
processor
application
electronic device
Prior art date
Application number
PCT/KR2021/011982
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 WO2022059978A1 publication Critical patent/WO2022059978A1/ko
Priority to US18/124,253 priority Critical patent/US20230236843A1/en

Links

Images

Classifications

    • 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/445Program loading or initiating
    • 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/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading
    • 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
    • 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/061Improving I/O performance
    • G06F3/0611Improving I/O performance in relation to response time
    • 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
    • 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/445Program loading or initiating
    • G06F9/44557Code layout in executable memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration

Definitions

  • the present disclosure relates to an electronic device capable of efficiently using a memory and a method for controlling the same.
  • the designated application is preloaded at the time of initial operation of the system or when it is judged necessary according to the user's usage scenario.
  • An object of the present disclosure relates to an electronic device capable of using a memory more efficiently and executing an application more quickly, and a method for controlling the same.
  • An electronic device comprising: a first memory; a second memory; A plurality of processes of an application are loaded into the first memory, a process switched to an inactive state is identified among a plurality of processes loaded into the first memory, and data of the process switched to an inactive state is stored in the second memory. and a processor that stores data of the process stored in the region of the second memory in a sequential access method and loads the data of the process stored in the region of the second memory into the first memory in response to an event in which the process is restored from the inactive state to the active state.
  • the processor may switch to the inactive state by excluding a process to be converted to the inactive state from a scheduling target among a plurality of processes of the application loaded into the first memory.
  • the process switched to the inactive state is a first process
  • the region of the second memory is a first region of the second memory
  • the processor is loaded into the first memory and does not change to the inactive state
  • Data of the second process of the application maintaining the active state may be stored in the second area of the second memory in a random access method.
  • the processor may load a plurality of processes of the application into the first memory based on an event for preparing the execution of the application.
  • the processor may identify that an event for preparing to execute the application has occurred based on at least one of an amount of free memory of the first memory, a speed of the processor, or an average usage of the processor.
  • the electronic device may include an interface unit, and the processor may identify that the restoration event has occurred based on receiving a user input for executing the application through the interface unit. .
  • the processor may restore the activated state by adding the process in which data is stored in the area of the second memory to a scheduling target in response to the restoration event.
  • the processor identifies whether a plurality of processes of the application exist in the first memory in response to the restoration event, and based on a process in which data does not exist in the first memory among the plurality of processes, An area of the second memory in which data of the process is stored may be identified.
  • a control method of an electronic device comprising: loading a plurality of processes of an application into a first memory; identifying a process switched to an inactive state among a plurality of processes loaded into the first memory; storing data of the process switched to the inactive state in a sequential access method in an area of a second memory; and loading data of the process stored in the area of the second memory into the first memory in response to an event in which the process is restored from the inactive state to the active state.
  • the process switched to the inactive state is a first process, and the region of the second memory is the first region of the second memory, is loaded into the first memory, does not change to the inactive state, and maintains the activated state and storing the data of the second process of the application in a random access method in the second area of the second memory.
  • the loading of the plurality of processes of the application into the first memory may include loading the plurality of processes of the application into the first memory based on an event preparing to execute the application.
  • the method may include identifying that an event to prepare for execution of the application has occurred based on at least one of an amount of free memory of the first memory, a speed of the processor, or an average usage of the processor.
  • a computer readable code wherein the computer program is stored thereon, the computer program including a code for performing a control method of an electronic device, the control method of the electronic device comprising: loading a plurality of processes of an application into a first memory; ; identifying a process switched to an inactive state among a plurality of processes loaded into the first memory; storing data of the process switched to the inactive state in a sequential access method in an area of a second memory; and loading data of the process stored in the area of the second memory into the first memory in response to an event in which the process is restored from the inactive state to the active state.
  • an application operation can be performed quickly by implementing a preloading state of an application and efficiently using a memory capacity.
  • data can be stably swapped by switching the process to an inactive state.
  • FIG. 1 is a block diagram illustrating the configuration of an electronic device according to an embodiment of the present invention.
  • FIG. 2 is a block diagram illustrating the configuration of an electronic device according to an embodiment of the present invention in more detail.
  • FIG. 3 is a diagram illustrating an operation flowchart of an electronic device according to an embodiment of the present invention.
  • FIG. 4 is a diagram illustrating an operation of an electronic device according to an embodiment of the present invention.
  • FIG. 5 is a diagram illustrating a scheduling operation of an electronic device according to an embodiment of the present invention.
  • FIG. 6 is a diagram illustrating an operation flowchart of an electronic device according to an embodiment of the present invention.
  • FIG. 7 is a diagram illustrating an operation of an electronic device according to an embodiment of the present invention.
  • FIG. 8 is a diagram illustrating an operation flowchart of an electronic device according to an embodiment of the present invention.
  • FIG. 9 is a diagram illustrating an operation flowchart of an electronic device according to an embodiment of the present invention.
  • FIG. 10 is a diagram illustrating an operation flowchart of an electronic device according to an embodiment of the present invention.
  • a 'module' or 'unit' performs at least one function or operation, and may be implemented as hardware or software or a combination of hardware and software, and is integrated into at least one module. and can be implemented.
  • at least one of the plurality of elements refers to all of the plurality of elements as well as each one or a combination thereof excluding the rest of the plurality of elements.
  • FIG. 1 is a block diagram illustrating the configuration of an electronic device according to an embodiment of the present invention.
  • the electronic device 100 includes a memory 10 .
  • the memory 10 is a device for storing or storing data or resources necessary for executing an application or the like.
  • the memory 10 may be classified based on, for example, whether it is volatile, an access method, a type of an allocated process, and the like.
  • the memory 10 is broadly classified into a first memory 11 and a second memory 12 according to volatility.
  • the first memory 11 is a volatile memory, which temporarily stores data or resources (hereinafter collectively referred to as data) or reads temporarily stored data. Due to the characteristics of volatile memory, stored data is lost when power is not supplied, such as when electricity is cut off.
  • the volatile memory includes a buffer, a random access memory (RAM), and the like.
  • the second memory 12 is a non-volatile memory that can keep stored information even when power is not supplied, that is, can permanently store data, and has a large capacity, but has a slow data execution speed.
  • the nonvolatile memory includes a flash-memory, a hard-disc drive (HDD), a solid-state drive (SSD), and a read-only memory (ROM).
  • the electronic device 100 includes a processor 180 .
  • the processor 180 includes one or more hardware processors implemented with a CPU, a chipset, a buffer, a circuit, etc. mounted on a printed circuit board, and may be implemented as a system on chip (SOC) depending on a design method.
  • SOC system on chip
  • the processor 180 loads the application stored in the second memory 12 into the first memory 11 to execute the application.
  • the processor 180 advances the data loading and calculation operations necessary for the execution of the application in the first memory 11 in advance, and omits the corresponding process when the user executes the application.
  • Application usability can be improved. This process is called pre-loading. When preloading is applied, data of a previously executed application occupies the first memory 11 .
  • the processor 180 moves unused data to the second memory 12 to secure capacity, and reads and uses data when necessary. .
  • the operation of storing data not currently being used from the first memory 11 to the second memory 12 is called a swap-out, and loading the swapped-out data back into the first memory 11 is performed.
  • the operation is called swap-in.
  • the processor 180 In order to execute the application in the preloaded state, the processor 180 must perform an operation of swapping in the data swapped out to the second memory 12 again.
  • FIG. 2 is a block diagram illustrating the configuration of an electronic device according to an embodiment of the present invention in more detail.
  • the electronic device 100 may include an interface unit 110 .
  • the interface unit 110 may include a wired interface unit 111 .
  • the wired interface unit 111 includes a connector or port to which an antenna capable of receiving a broadcast signal according to a broadcasting standard such as terrestrial/satellite broadcasting can be connected, or a cable capable of receiving a broadcast signal according to a cable broadcasting standard can be connected. do.
  • the electronic device 100 may have a built-in antenna capable of receiving a broadcast signal.
  • Wired interface unit 111 is an HDMI port, DisplayPort, DVI port, Thunderbolt, composite video, component (component) video, super video (super video), SCART, such as, such as, video and / or audio transmission standards according to It may include a connector or a port, and the like.
  • the wired interface unit 111 may include a connector or port according to a universal data transmission standard, such as a USB port.
  • the wired interface unit 111 may include a connector or a port to which an optical cable can be connected according to an optical transmission standard.
  • the wired interface unit 111 is connected to an external microphone or an external audio device having a microphone, and may include a connector or a port capable of receiving or inputting an audio signal from the audio device.
  • the wired interface unit 111 is connected to an audio device such as a headset, earphone, or external speaker, and may include a connector or port capable of transmitting or outputting an audio signal to the audio device.
  • the wired interface unit 111 may include a connector or port according to a network transmission standard such as Ethernet.
  • the wired interface unit 111 may be implemented as a LAN card connected to a router or a gateway by wire.
  • the wired interface unit 111 is wired through the connector or port in a 1:1 or 1:N (N is a natural number) method with an external device such as a set-top box, an optical media player, or an external display device, speaker, server, etc. By being connected, a video/audio signal is received from the corresponding external device or a video/audio signal is transmitted to the corresponding external device.
  • the wired interface unit 111 may include a connector or port for separately transmitting video/audio signals.
  • the wired interface unit 111 is embedded in the electronic device 100 , but may be implemented in the form of a dongle or a module to be detachably attached to the connector of the electronic device 100 .
  • the interface unit 110 may include a wireless interface unit 112 .
  • the wireless interface unit 112 may be implemented in various ways corresponding to the implementation form of the electronic device 100 .
  • the wireless interface unit 112 is a communication method RF (radio frequency), Zigbee (Zigbee), Bluetooth (bluetooth), Wi-Fi (Wi-Fi), UWB (Ultra WideBand) and NFC (Near Field Communication), etc.
  • Wireless communication can be used.
  • the wireless interface unit 112 may be implemented as a wireless communication module that performs wireless communication with an AP according to a Wi-Fi method, or a wireless communication module that performs one-to-one direct wireless communication such as Bluetooth.
  • the wireless interface unit 112 may transmit and receive data packets to and from the server by wirelessly communicating with the server on the network.
  • the wireless interface unit 112 may include an IR transmitter and/or an IR receiver capable of transmitting and/or receiving an IR (Infrared) signal according to an infrared communication standard.
  • the wireless interface unit 112 may receive or input a remote control signal from a remote control or other external device through an IR transmitter and/or an IR receiver, or transmit or output a remote control signal to another external device.
  • the electronic device 100 may transmit/receive a remote control signal to and from the remote control or other external device through the wireless interface unit 112 of another method such as Wi-Fi or Bluetooth.
  • the electronic device 100 may further include a tuner for tuning the received broadcast signal for each channel.
  • the electronic device 100 When the electronic device 100 is implemented as a display device, it may include the display unit 120 .
  • the display unit 120 includes a display panel capable of displaying an image on the screen.
  • the display panel is provided with a light-receiving structure such as a liquid crystal type or a self-luminous structure such as an OLED type.
  • the display unit 120 may further include additional components according to the structure of the display panel. For example, if the display panel is a liquid crystal type, the display unit 120 includes a liquid crystal display panel and a backlight unit for supplying light. and a panel driving substrate for driving the liquid crystal of the liquid crystal display panel.
  • the electronic device 100 may include a user input unit 130 .
  • the user input unit 130 transmits various preset control commands or non-limited information to the processor 180 in response to a user's input.
  • the user input unit 130 includes various input means capable of receiving a user input.
  • the user input unit 130 may include a keypad (or input panel) including buttons such as a power key, a number key, and a menu key provided in the electronic device 100 .
  • the user input unit 130 may include an input device that generates a preset command/data/information/signal to be able to remotely control the electronic device 100 and transmits the generated command/data/information/signal to the electronic device 100 .
  • the input device includes, for example, a remote control, a game console, a keyboard, a mouse, and the like, and is separated from the electronic device 100 to receive a user input.
  • At least one button for receiving a user input may be provided in the remote control.
  • the remote control may be provided with a touch sensing unit that receives a user's touch input (touch gesture) and/or a motion sensing unit that detects movement of the remote control itself by the user.
  • the input device includes a terminal device such as a smartphone on which a remote control application is installed, and in this case, a user's touch input through the touch screen can be received.
  • the input device becomes an external device capable of wireless communication with the main body of the electronic device 100 , and wireless communication includes Bluetooth, infrared communication, RF communication, wireless LAN, Wi-Fi Direct, and the like.
  • the user input unit 130 may include a motion sensing unit that detects a motion of the user's hand, that is, a hand gesture (hereinafter, also referred to as a gesture).
  • the electronic device 100 may output data by detecting a movement distance, a movement speed, an area of a movement region, and the like, of the hand by the motion detection unit.
  • the user input unit 130 may include a touch sensing unit capable of detecting a user's touch on the bezel area around the display 121 .
  • a sound receiving unit 130 such as a microphone 150 capable of receiving a voice uttered by a user may be included in the user input unit 130 .
  • the user input unit 130 may receive a user input for a set distance that is a standard for privacy processing for image data. For example, a user input for setting or adjusting (changing) a set distance or a reference position corresponding to the set distance may be received through the user input unit 130 .
  • the electronic device 100 may include a storage unit 140 .
  • the storage unit 140 stores digitized data.
  • the storage unit 140 is a nonvolatile storage capable of preserving data regardless of whether power is supplied or not, and data to be processed by the processor 180 is loaded, and data is stored when power is not provided. This includes memory with volatile properties that cannot be used. Storage includes flash-memory, hard-disc drive (HDD), solid-state drive (SSD), read-only memory (ROM), etc., and memory includes buffer and random access memory (RAM). etc.
  • the electronic device 100 may include a microphone 150 .
  • the microphone 150 collects sounds of the external environment including the user's voice.
  • the microphone 150 transmits the collected sound signal to the processor 180 .
  • the electronic device 100 may include a microphone 150 for collecting user voices or may receive a voice signal from an external device such as a remote controller having a microphone or a smart phone through the interface unit 110 .
  • a remote controller application may be installed in an external device to control the electronic device 100 or perform functions such as voice recognition. In the case of an external device installed with such an application, a user voice can be received, and the external device can transmit/receive and control data using the electronic device 100 and Wi-Fi/BT or infrared rays, etc.
  • a plurality of interface units 110 that can be implemented may exist in the electronic device 100 .
  • the electronic device 100 may include a speaker 160 .
  • the speaker 160 outputs audio data processed by the processor 180 as sound.
  • the speaker 160 may include a unit speaker provided to correspond to audio data of one audio channel, and may include a plurality of unit speakers to respectively correspond to audio data of a plurality of audio channels.
  • the speaker 160 may be provided separately from the electronic device 100 . In this case, the electronic device 100 may transmit audio data to the speaker 160 through the interface unit 110 .
  • the electronic device 100 may include a sensor 170 .
  • the sensor 170 may detect a state of the electronic device 100 or a state around the electronic device 100 , and transmit the sensed information to the processor 180 .
  • the sensor 170 includes a camera.
  • a magnetic sensor an acceleration sensor, a temperature/humidity sensor, an infrared sensor, a gyroscope sensor, a position sensor (eg, GPS), a barometric pressure sensor, a proximity sensor, and an RGB sensor (illuminance sensor) It may include at least one, but is not limited thereto. Since a function of each sensor can be intuitively inferred from the name of a person skilled in the art, a detailed description thereof will be omitted.
  • the electronic device 100 may include a processor 180 .
  • the processor 180 includes one or more hardware processors implemented with a CPU, a chipset, a buffer, a circuit, etc. mounted on a printed circuit board, and may be implemented as a system on chip (SOC) depending on a design method.
  • SOC system on chip
  • the processor 180 includes modules corresponding to various processes such as a demultiplexer, a decoder, a scaler, an audio digital signal processor (DSP), and an amplifier.
  • DSP audio digital signal processor
  • some or all of these modules may be implemented as SOC.
  • a module related to image processing such as a demultiplexer, decoder, and scaler may be implemented as an image processing SOC
  • an audio DSP may be implemented as a chipset separate from the SOC.
  • the processor 180 may convert the voice signal into voice data.
  • the voice data may be text data obtained through a speech-to-text (STT) process for converting a voice signal into text data.
  • STT speech-to-text
  • the processor 180 identifies a command indicated by the voice data and performs an operation according to the identified command.
  • the voice data processing process and the command identification and execution process may all be executed in the electronic device 100 .
  • at least a part of the process is performed by at least one server communicatively connected to the electronic device 100 through a network. can be performed.
  • the processor 180 may call at least one command among commands of software stored in a storage medium readable by a machine such as the electronic device 100 and execute it. This enables a device such as the electronic device 100 to be operated to perform at least one function according to the called at least one command.
  • 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 refers to cases in which data is semi-permanently stored in a storage medium and temporary storage. It does not distinguish between cases where
  • the processor 180 is loaded into the first memory, identifies the process of the application switched from the active state to the inactive state, and stores the data of the process switched to the inactive state in the area of the second memory in a sequential access method, In response to an event in which the process is restored from the inactive state to the active state, at least a part of data analysis, processing, and result information generation for loading data of the process stored in the region of the second memory into the first memory is performed in a rule-based or artificial manner As an artificial intelligence algorithm, it may be performed using at least one of machine learning, a neural network, and a deep learning algorithm.
  • the processor 180 is loaded into the first memory, identifies the process of the application switched from the active state to the inactive state, stores the data of the process switched to the inactive state in a sequential access method in the area of the second memory, and the process
  • data of the process stored in the area of the second memory may be loaded into the first memory and converted into a form suitable for use as an input of an artificial intelligence model.
  • AI models can be created through learning. Here, being made through learning means that a basic artificial intelligence model is learned using a plurality of learning data by a learning algorithm, so that a predefined action rule or artificial intelligence model set to perform a desired characteristic (or purpose) is created means burden.
  • the artificial intelligence model may be composed of a plurality of neural network layers. Each of the plurality of neural network layers has a plurality of weight values, and a neural network operation is performed through an operation between the operation result of a previous layer and the plurality of weights.
  • Inference prediction is a technology for logically reasoning and predicting by judging information. It is a technology that uses knowledge based reasoning, optimization prediction, preference-based planning, and recommendation. includes
  • the processor 180 may perform the functions of the learning unit and the recognition unit together.
  • the learning unit may perform a function of generating a learned neural network
  • the recognition unit may perform a function of recognizing (or inferring, predicting, estimating, determining) data using the learned neural network.
  • the learning unit may create or update the neural network.
  • the learning unit may acquire learning data to generate a neural network.
  • the learning unit may acquire the learning data from the storage 140 or the outside.
  • the learning data may be data used for learning of the neural network, and the neural network may be trained by using the data obtained by performing the above-described operation as learning data.
  • the learning unit may perform a preprocessing operation on the acquired training data before training the neural network using the training data, or may select data to be used for learning from among a plurality of training data. For example, the learning unit may process the learning data in a preset format, filter it, or add/remove noise to process the learning data into a form suitable for learning. The learner may generate a neural network set to perform the above-described operation by using the preprocessed learning data.
  • the learned neural network network may be composed of a plurality of neural network networks (or layers). Nodes of the plurality of neural networks have weights, and the plurality of neural networks may be connected to each other so that an output value of one neural network is used as an input value of another neural network.
  • Examples of neural networks include Convolutional Neural Network (CNN), Deep Neural Network (DNN), Recurrent Neural Network (RNN), Restricted Boltzmann Machine (RBM), Deep Belief Network (DBN), Bidirectional Recurrent Deep Neural Network (BRDNN) and It can include models such as Deep Q-Networks.
  • the recognizer may acquire target data to perform the above-described operation.
  • the target data may be obtained from the storage 140 or from the outside.
  • the target data may be data to be recognized by the neural network.
  • the recognizer may perform preprocessing on the acquired target data before applying the target data to the learned neural network, or select data to be used for recognition from among a plurality of target data.
  • the recognition unit may process the target data into a preset format, filter, or add/remove noise to process the target data into a form suitable for recognition.
  • the recognizer may obtain an output value output from the neural network by applying the preprocessed target data to the neural network.
  • the recognition unit may obtain a probability value or a reliability value together with the output value.
  • the method for controlling the electronic device 100 according to the present invention may be provided by being included in a computer program product.
  • the computer program product may include instructions for software executed by the processor 180 , as described above.
  • 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, CD-ROM), or via an application store (eg, Play StoreTM) or between two user devices (eg, smartphones). It may be distributed directly, online (eg, downloaded or uploaded). In the case of online distribution, at least a part of the computer program product may be temporarily stored or temporarily created 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.
  • 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.
  • FIG. 3 is a diagram illustrating an operation flowchart of an electronic device according to an embodiment of the present invention.
  • the processor 180 loads a plurality of processes of an application into the first memory 11, and identifies a process converted to an inactive state among a plurality of processes loaded into the first memory (S310) ).
  • a process is a unit of work executed based on data or an application loaded in the memory 10 . That is, the application includes at least one process, and the processor 180 processes data loaded in the memory 10 , so that one or more processes are performed. Accordingly, in order for a process to be executed, data corresponding to the process must be loaded into the memory 10 , specifically, the first memory 11 .
  • the processor 180 identifies the state of the process of the application.
  • the active state of the process refers to a state in which data of the process can be used as needed by the processor 180 and can be moved freely. is not used and means a state in which it is not moved arbitrarily. Specific details will be described with reference to FIGS. 4 and 5 .
  • the processor 180 is in a state in which an application is preloaded. Even when the processor 180 swaps out data to the second memory 12 in order to secure the capacity of the first memory 11 , since the application is still running in the background, the processor 180 ), the data moved to the second memory 12 is loaded back into the first memory 11 during driving.
  • the processor 180 may implement a preloading state by swapping out data from the first memory 11 to the second memory 12 based on the deactivated data, while efficiently using the memory capacity.
  • the processor 180 stores the data of the process identified as being switched to the inactive state in the area 121 of the second memory 12 in a sequential access method (S320).
  • Sequential access means that data is stored sequentially in a single area of memory having consecutive addresses, and when data is retrieved, the area can be accessed one after the other from the beginning. Compared to random access, which requires accessing multiple regions multiple times when retrieving data by dividing data into multiple regions of the memory and storing data, I/O efficiency of data is high.
  • I/O efficiency is higher in the case of sequential access than in the case of a small memory size, and the speed of reading data is usually 3 to 10 times faster in sequential access than in random access.
  • the area of the address where the data is located is read randomly in page units (4 KB), so the larger the data size, the longer it takes to find the desired data. Accordingly, when the processor 180 needs to read a lot of data from the second memory 12 within a short time, if data is randomly stored, an I/O operation becomes a bottleneck, which causes application usability degradation. On the other hand, since the sequential access method can store data sequentially, it can have a larger data unit and read data is fast.
  • the processor 180 sequentially stores data in the area 121 of the second memory 12 .
  • the area 121 of the second memory 12 is a space having consecutive addresses, and the size of sequentially stored data is determined according to the size of the area 121 .
  • the processor 180 loads data of the process stored in the area 121 of the second memory 11 into the first memory in response to an event in which the process is restored from the inactive state to the active state do (S330).
  • the event restored from the inactive state to the active state may be, for example, a user input for executing a user's application. The details will be described in FIG. 9 .
  • the processor 180 loads process data stored in the area 121 of the second memory 12 into the first memory 11 in response to the predetermined event. At this time, since the data of the process is sequentially stored in the region 121 of the second memory 12 , the processor 180 simultaneously stores the data stored in the region 121 of the second memory 12 into the first memory ( 11), so you can run your application quickly.
  • the processor 180 minimizes the area designated by the sequential access method in the first memory 11 and swaps out the area to the second memory 12 for efficient use of the area.
  • the state of the process is switched to the inactive state, and the data is stored in the second memory 12 in a sequential access manner.
  • FIG. 4 is a diagram illustrating an operation of an electronic device according to an embodiment of the present invention.
  • FIG. 4 shows an activated state in which data of the process 410 in the memory 10 can be moved between the first memory 11 and the second memory 12 as described in S310 of FIG. 3 above.
  • the processor 180 may move the data loaded in the first memory 11 to the second memory 12 in order to secure the capacity of the first memory 11 , and the moved data is used for execution of the processor 180 . Thus, it is possible to move back from the second memory 12 to the first memory 11 . That is, a state in which data can be moved between these memories is referred to as an active state.
  • the processor 180 prevents data swapped out from the first memory 11 to the second memory 12 from unnecessarily returning to the first memory 11 for memory efficiency. may be switched from an active state to an inactive state in which data movement between memories is impossible, and data may be stored in the second memory 12 .
  • the operation of switching to the inactive state will be described in detail below with reference to FIG. 5 .
  • FIG. 4 shows a state in which data of the process 420 is swapped out in a sequential access method or a random access method.
  • the state of the process 420 is switched to the inactive state, when the processor 180 stores the data of the process 420 from the first memory 11 to the second memory 12 , the second memory 12 is It exists in the second memory 12 without a separate operation of the processor 180 .
  • the processor 180 identifies the amount of free memory of the first memory 11 , the speed of the processor 180 or the average usage of the processor 180 , and identifies whether data is swapped out based on at least one of them. can For example, when the amount of free memory in the first memory 11 is less than a predefined value, the processor 180 determines that swap out to the second memory 12 is necessary to secure the amount of memory in the first memory 11 . can be identified.
  • the second memory 12 may be divided into a first area 121 and a second area 122 .
  • the first area 121 means an area in which data is sequentially stored
  • the second area 122 means an area in which data is arbitrarily stored.
  • the first region 121 includes a plurality of sub-regions provided (designated) for each process.
  • a single process may be divided into a plurality of regions and stored, but even in this case, they are sequentially stored within each region.
  • the processor 180 converts the data of the process 420 to an inactive state, and stores the switched data of the process 420 in the first area 121 of the second memory 12 in a sequential access method.
  • the processor 180 may store the data of the process 420 in the second area 122 of the second memory 12 in a random access method.
  • the processor 180 is loaded into the first memory 11 and does not change to an inactive state, but randomly accesses data of an application process that maintains an active state to the second area 122 of the second memory 12 . method can be saved. In the case of the random access method, data of the process may be arbitrarily distributed and stored in the second area 122 .
  • FIG. 5 is a diagram illustrating scheduling of an electronic device according to an embodiment of the present invention.
  • the processor 180 converts a process to be converted to an inactive state among a plurality of processes of an application loaded into the first memory 11 from an execution target of the processor 180 , that is, a scheduling target, and then switches to an inactive state.
  • a scheduling target for example, as shown in FIG. 5 in the form of a list
  • information indicating the status of each activated process is stored and managed. That is, becoming inactive means that the processor 180 excludes or deletes an activated process from the list of scheduling targets.
  • a process excluded from scheduling is, for example, a process with a low need for occupying the first memory 11 because it is not used for a long period of time, or a process essential for the execution of an application and needs to be loaded at once for fast execution, so that it is stably It may be a process that needs to be stored in the second memory 12 .
  • the scheduling target of this embodiment A process excluded from 'Waiting' may have a lower priority of use than a process in a 'waiting state'.
  • FIG. 5 shows in detail a process scheduling process of the processor 180 .
  • the process operates according to the following scheduling procedure.
  • the ready state is a state in which the processor 180 is scheduled to be executed. In order to transition from the Ready state to the Running state, the task scheduler must select the process.
  • Dispatch refers to a process of transitioning from the ready state to the execution state, which is executed by the task scheduler selecting the corresponding process, in which case the executed process occupies the processor 180 .
  • the running process transitions to the ready state, and the high-priority process transitions to the running state.
  • I/O or Event wait In input/output or event wait (I/O or Event wait), if the process occupying the processor 180 has to perform I/O processing, the running process is changed from the running state to the waiting state. And the process changed to the standby state stays in the standby state until all I/O processing is finished. In addition, the process that was in the running state is transferred to the standby state, and another process that was in the ready state is transferred to the running state. In addition, if the process in the standby state stays in any area of the first memory 11 or cannot be deactivated when it is swapped out to the second memory 12 , the process stored in the second area 122 in a random access method is performed. it means.
  • the standby state and the ready state in the scheduling process are one of the active states operated by the processor 180, and thus are distinguished from the inactive state of the present invention.
  • a process that has completed input/output or event completion transitions from the standby state to the ready state so that it can be selected by the scheduler.
  • the processor 180 may restore a process to an activated state by adding a process in which data is stored in the area of the second memory 12 to a scheduling target in response to a restoration event.
  • data can be stably stored in the second memory 12 by switching the process to an inactive state.
  • 6 is a diagram illustrating an operation flowchart of an electronic device according to an embodiment of the present invention. 6 is a flowchart illustrating an example of implementing the operation of S320 of FIG. 3 .
  • the processor 180 swaps out data of the process from the first memory 11 to the second memory 12 , the first area 121 that matches the ID of the process to be swapped out to the second memory 12 . ) is identified (S610).
  • the processor 180 When there is the first area 121 matching the ID of the process (Yes in S610), the processor 180 requires that the data of the corresponding process be quickly swapped into the first memory 11 for later application execution. It may be continuously stored in the second memory 12 . On the other hand, if there is no first area 121 matching the ID of the process (No in S610 ), the processor 180 randomly stores process data in the second area 122 .
  • the processor 180 identifies whether the process is in an inactive state (S620).
  • the processor 180 stores the data of the process in the second area 122 of the second memory 12 in a random access method. (S640).
  • the processor 180 may identify whether a process (including some) is a process capable of being in an inactive state. If the deactivated state is possible, the process data is stored in the first region 121 by inactivating the process (S630), otherwise, the process data is stored in the second region 122 in the activated state (S640). .
  • FIG. 7 is a diagram illustrating an operation of an electronic device according to an embodiment of the present invention.
  • FIG. 7 illustrates a state in which data stored in the first area 121 of the second memory 12 is swapped in to the first memory 11 in a sequential access method, as described in S330 of FIG. 3 .
  • the processor 180 may load data of the process 410 stored in the region of the second memory 12 into the first memory 11 in response to an event of restoring the state from the inactive state to the active state.
  • the event restored from the inactive state to the active state may be, for example, a user input for executing a user's application.
  • the electronic device 100 includes an interface unit 110 , and the processor 180 receives a user input for executing an application through the interface unit 110 , and receives the received user input. Based on the , the process 410 may identify that an event of restoring the activated state has occurred.
  • the user input may be an input for selecting an icon for executing an application in a graphic user interface (GUI) displayed on the display unit 120 , or a voice input for executing an application.
  • GUI graphic user interface
  • the processor 180 changes the process stored in the first region 121 from an inactive state to an active state. It can be loaded into the first memory 11 by switching to an active state based on an event restored to .
  • the processor 180 can load the process stored in the second region 122 in the active state into the first memory 11 by changing the state of the process in the ready state or the standby state to the running state as described with reference to FIG. 5 . there is.
  • the data is data stored in the first area 121 of the second memory 12 in a sequential access method, and thus data stored in the first area 121 is removed at a faster rate.
  • One memory 11 can be swapped in.
  • FIG. 8 is a diagram illustrating an operation flowchart of an electronic device according to an embodiment of the present invention.
  • FIG. 8 is a flowchart illustrating an operation in which a plurality of processes of an application are loaded into the first memory 11 before operation S310 of FIG. 3 is performed.
  • preloading is performed in the background of the processor 180 in advance in preparation for future execution even though the user has not executed it separately, and the processor 180 determines which application is to be executed at which point, and the like.
  • the processor 180 may identify the amount of free memory of the first memory 11 , the speed of the processor 180 , or the average usage of the processor 180 ( S810 ).
  • the processor 180 may identify that an event to prepare an application for execution has occurred based on at least one of the amount of free memory of the first memory 11 , the speed of the processor 180 , or the average usage of the processor 180 . (S820).
  • the processor 180 may identify that an event to prepare an application for execution has occurred.
  • the processor 180 may identify the application to be executed based on the frequency of use of the application, the time of use, the capacity of the application, and the like.
  • the processor 180 may load a plurality of processes of the application into the first memory 11 based on an event for preparing the execution of the application.
  • FIG. 9 is a diagram illustrating an operation flowchart of an electronic device according to an embodiment of the present invention.
  • 9 is a flowchart illustrating another example that the electronic device may implement in relation to S320 of FIG. 3 above.
  • the processor 180 may preload the application as it is identified that an event to prepare the application for execution has occurred based on FIG. 8 ( S910 ).
  • the processor 180 may store data of the application process from the first memory 11 to the second area 122 of the second memory 12 . There is (S920).
  • the processor 180 may switch the process state to the inactive state in order to store the stable process data in the second memory 12 ( S930 ).
  • the processor 180 may move the data of the process switched to the inactive state to the first area 121 of the second memory 12 ( S940 ).
  • the processor 180 identifies whether all of the data of the process has moved to the second memory 12 (S950), and if not moved (Yes in S950), returns to S940 and stores the remaining data in the second memory 12. It can move to the first area 121 . When all of them have moved to the second memory 12 (No in S950 ), the processor 180 ends the operation.
  • FIG. 10 is a diagram illustrating an operation flowchart of an electronic device according to an embodiment of the present invention.
  • FIG. 10 is a flowchart illustrating an operation related to S330 of FIG. 3 after the processor 180 stably moves data to the second memory 12 .
  • the processor 180 identifies that an event in which the process is restored from the inactive state to the active state has occurred (S1010). Restoring the process from the inactive state to the active state means that the process is selected by the task scheduler to transition from the ready state to the running state, as described above with reference to FIG. 5 . The selected process will be executed and occupy the processor 180 . The occurrence of an event for restoring the state of the process is as described above with reference to FIG. 7 .
  • the processor 180 identifies whether a plurality of processes of an application exist in the first memory 11 in response to an event, that is, a user input for executing the user's application.
  • an event that is, a user input for executing the user's application.
  • the processor 180 may execute the corresponding application using the data (S1040).
  • the processor 180 stores the plurality of processes of the application in the first memory 11 . It can be identified that some or all of them do not exist (No in S1020).
  • the processor 180 may receive a request (page fault) indicating that application data is required.
  • the processor 180 may identify an area of the second memory 12 in which data of the corresponding process is stored, based on a process that does not exist in the first memory 11 among a plurality of processes of the application.
  • the processor 180 may load data from the second memory 12 into the first memory 11 ( S1030 ). More specifically, the processor 180 may load data stored in the identified area of the second memory 12 into the first memory 11 .
  • the processor 180 may execute an application based on the loaded data (S1040). In an embodiment of the present invention, executing the corresponding application means that the application that was running in the background is switched to the foreground and executed.
  • the processor 180 converts the process stored in the second memory 12 in the inactive state to the active state, and adds it to the scheduling target to operate in the running state.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 발명의 일 실시예에 따른 전자장치에 있어서, 제1메모리; 제2메모리; 어플리케이션의 복수의 프로세스를 상기 제1메모리에 로드하고, 상기 제1메모리에 로드된 복수의 프로세스 중 비활성화 상태로 전환된 프로세스를 식별하고, 상기 비활성화 상태로 전환된 프로세스의 데이터를 상기 제2메모리의 영역에 순차 액세스 방식으로 저장하고, 상기 프로세스가 상기 비활성화 상태에서 활성화 상태로 복원되는 이벤트에 대응하여, 상기 제2메모리의 영역에 저장된 상기 프로세스의 데이터를 상기 제1메모리에 로드시키는 프로세서를 포함한다.

Description

전자장치 및 그 제어방법
관련된 출원에 대한 상호-참조, 본 출원은 2020년 9월 21일자로 대한민국 특허청에 제출된 대한민국 특허 출원번호 제10-2020-0121501호에 기초한 우선권을 주장하며, 그 개시 내용은 전체가 참조로 본 발명에 포함된다.
본 개시는 메모리를 효율적으로 사용할 수 있는 전자장치 및 그 제어방법에 관한 것이다.
어플리케이션이 실행될 때에는 여러가지 리소스가 메모리에 로딩되고 연산되는 과정이 존재한다. 어플리케이션이 실행되는 시스템의 성능이 충분하지 않거나 리소스가 큰 어플리케이션이 실행되는 경우에는 어플리케이션의 진입이 느려지게 된다.
어플리케이션 진입 시간은 사용자의 어플리케이션 사용성에 큰 영향을 미치기 때문에 사용자와 플랫폼의 상황을 고려하여 다양한 방식으로 어플리케이션을 프리로딩(pre-loading)하는 기법이 사용된다.
시스템의 최초 동작시점이나 사용자의 사용 시나리오에 따라 필요하다고 판단되는 시점에 지정된 어플리케이션을 프리로딩 시킨다.
하지만 시스템의 메모리 자원은 한정적이기 때문에, 활발히 사용하고 있지 않는 리소스와 데이터를 스왑(swap) 장치로 이동시켜 메모리 자원을 확보하고, 필요할 때 스왑 장치에서 메모리로 읽어와 사용한다.
본 개시의 목적은 메모리를 보다 효율적으로 사용하고, 어플리케이션을 보다 빠르게 실행시킬 수 있는 전자장치 및 그 제어방법에 관한 것이다.
본 발명의 일 실시예에 따른 전자장치에 있어서, 제1메모리; 제2메모리; 어플리케이션의 복수의 프로세스를 상기 제1메모리에 로드하고, 상기 제1메모리에 로드된 복수의 프로세스 중 비활성화 상태로 전환된 프로세스를 식별하고, 상기 비활성화 상태로 전환된 프로세스의 데이터를 상기 제2메모리의 영역에 순차 액세스 방식으로 저장하고, 상기 프로세스가 상기 비활성화 상태에서 활성화 상태로 복원되는 이벤트에 대응하여, 상기 제2메모리의 영역에 저장된 상기 프로세스의 데이터를 상기 제1메모리에 로드시키는 프로세서를 포함한다.
상기 프로세서는, 상기 제1메모리에 로드된 상기 어플리케이션의 복수의 프로세스 중 상기 비활성화 상태로 전환할 프로세스를 스케줄링 대상에서 제외시켜 상기 비활성화 상태로 전환할 수 있다.
상기 비활성화 상태로 전환된 프로세스는 제1프로세스이며, 상기 제2메모리의 영역은 상기 제2메모리의 제1영역이고, 상기 프로세서는, 상기 제1메모리에 로드되며 상기 비활성화 상태로 전환되지 않고, 상기 활성화 상태를 유지하는 어플리케이션의 제2프로세스의 데이터를 상기 제2메모리의 제2영역에 임의 액세스 방식으로 저장할 수 있다.
상기 프로세서는, 상기 어플리케이션의 실행을 준비하는 이벤트에 기초하여 상기 어플리케이션의 복수의 프로세스를 상기 제1메모리에 로드할 수 있다.
상기 프로세서는, 상기 제1메모리의 여유 메모리량, 상기 프로세서의 속도 또는 상기 프로세서의 평균 사용량 중 적어도 하나에 기초하여 상기 어플리케이션의 실행을 준비하는 이벤트가 발생한 것으로 식별할 수 있다.
본 발명의 일 실시예에 따른 전자장치에 있어서, 인터페이스부를 포함하고, 상기 프로세서는, 상기 어플리케이션을 실행하는 사용자입력을 상기 인터페이스부를 통해 수신한 것에 기초하여 상기 복원하는 이벤트가 발생한 것으로 식별할 수 있다.
상기 프로세서는, 상기 복원하는 이벤트에 대응하여, 상기 제2메모리의 영역에 데이터가 저장된 상기 프로세스를 스케줄링 대상에 추가하여 상기 활성화 상태로 복원할 수 있다.
상기 프로세서는, 상기 복원하는 이벤트에 대응하여 상기 제1메모리에 상기 어플리케이션의 복수의 프로세스가 존재하는지 여부를 식별하고, 상기 복수의 프로세스 중 상기 제1메모리에 데이터가 존재하지 않는 프로세스에 기초하여, 상기 프로세스의 데이터가 저장된 상기 제2메모리의 영역을 식별할 수 있다.
본 발명의 일 실시예에 따른 전자장치의 제어방법에 있어서, 어플리케이션의 복수의 프로세스를 제1메모리에 로드하는 단계; 상기 제1메모리에 로드된 복수의 프로세스 중 비활성화 상태로 전환된 프로세스를 식별하는 단계; 상기 비활성화 상태로 전환된 프로세스의 데이터를 제2메모리의 영역에 순차 액세스 방식으로 저장하는 단계; 및 상기 프로세스가 상기 비활성화 상태에서 활성화 상태로 복원되는 이벤트에 대응하여, 상기 제2메모리의 영역에 저장된 상기 프로세스의 데이터를 상기 제1메모리에 로드시키는 단계를 포함할 수 있다.
상기 제1메모리에 로드된 상기 어플리케이션의 복수의 프로세스 중 상기 비활성화 상태로 전환할 프로세스를 스케줄링 대상에서 제외시켜 상기 비활성화 상태로 전환하는 단계를 포함할 수 있다.
상기 비활성화 상태로 전환된 프로세스는 제1프로세스이며, 상기 제2메모리의 영역은 상기 제2메모리의 제1영역이고, 상기 제1메모리에 로드되며 상기 비활성화 상태로 전환되지 않고, 상기 활성화 상태를 유지하는 어플리케이션의 제2프로세스의 데이터를 상기 제2메모리의 제2영역에 임의 액세스 방식으로 저장하는 단계를 포함할 수 있다.
상기 어플리케이션의 복수의 프로세스를 제1메모리에 로드하는 단계는, 상기 어플리케이션의 실행을 준비하는 이벤트에 기초하여 상기 어플리케이션의 복수의 프로세스를 상기 제1메모리에 로드하는 단계를 포함할 수 있다.
상기 제1메모리의 여유 메모리량, 상기 프로세서의 속도 또는 상기 프로세서의 평균 사용량 중 적어도 하나에 기초하여 상기 어플리케이션의 실행을 준비하는 이벤트가 발생한 것으로 식별하는 단계를 포함할 수 있다.
상기 어플리케이션을 실행하는 사용자입력을 인터페이스부를 통해 수신한 것에 기초하여 상기 복원하는 이벤트가 발생한 것으로 식별하는 단계를 포함할 수 있다.
상기 복원하는 이벤트에 대응하여, 상기 제2메모리의 영역에 데이터가 저장된 상기 프로세스를 스케줄링 대상에 추가하여 상기 활성화 상태로 복원하는 단계를 포함할 수 있다.
상기 복원하는 이벤트에 대응하여 상기 제1메모리에 상기 어플리케이션의 복수의 프로세스가 존재하는지 여부를 식별하는 단계; 및 상기 복수의 프로세스 중 상기 제1메모리에 데이터가 존재하지 않는 프로세스에 기초하여, 상기 프로세스의 데이터가 저장된 상기 제2메모리의 영역을 식별하는 단계를 포함할 수 있다.
컴퓨터가 읽을 수 있는 코드로서, 전자장치의 제어방법을 수행하는 코드를 포함하는 컴퓨터 프로그램이 저장된 기록매체에 있어서, 상기 전자장치의 제어방법은, 어플리케이션의 복수의 프로세스를 제1메모리에 로드하는 단계; 상기 제1메모리에 로드된 복수의 프로세스 중 비활성화 상태로 전환된 프로세스를 식별하는 단계; 상기 비활성화 상태로 전환된 프로세스의 데이터를 제2메모리의 영역에 순차 액세스 방식으로 저장하는 단계; 및 상기 프로세스가 상기 비활성화 상태에서 활성화 상태로 복원되는 이벤트에 대응하여, 상기 제2메모리의 영역에 저장된 상기 프로세스의 데이터를 상기 제1메모리에 로드시키는 단계를 포함할 수 있다.
본 발명의 일 실시예에 따르면, 어플리케이션의 프리로딩 상태를 구현하되 메모리 용량을 효율적으로 이용하여 어플리케이션 동작을 빠르게 수행할 수 있다.
본 발명의 일 실시예에 따르면, 프로세스를 비활성화 상태로 전환하여, 안정적으로 데이터를 스와핑할 수 있다.
도 1은 본 발명의 일 실시예에 따른 전자장치의 구성을 도시한 블록도이다.
도 2는 본 발명의 일 실시예에 따른 전자장치의 구성을 보다 구체적으로 도시한 블록도이다.
도 3은 본 발명의 일 실시예에 따른 전자장치의 동작 흐름도를 도시한 도면이다.
도 4는 본 발명의 일 실시예에 따른 전자장치의 동작 모습을 도시한 도면이다.
도 5는 본 발명의 일 실시예에 따른 전자장치의 스케줄링 동작 모습을 도시한 도면이다.
도 6은 본 발명의 일 실시예에 따른 전자장치의 동작 흐름도를 도시한 도면이다.
도 7은 본 발명의 일 실시예에 따른 전자장치의 동작 모습을 도시한 도면이다.
도 8은 본 발명의 일 실시예에 따른 전자장치의 동작 흐름도를 도시한 도면이다.
도 9는 본 발명의 일 실시예에 따른 전자장치의 동작 흐름도를 도시한 도면이다.
도 10은 본 발명의 일 실시예에 따른 전자장치의 동작 흐름도를 도시한 도면이다.
이하에서는 첨부 도면을 참조하여 본 발명의 실시예들을 상세히 설명한다. 도면에서 동일한 참조번호 또는 부호는 실질적으로 동일한 기능을 수행하는 구성요소를 지칭하며, 도면에서 각 구성요소의 크기는 설명의 명료성과 편의를 위해 과장되어 있을 수 있다. 다만, 본 발명의 기술적 사상과 그 핵심 구성 및 작용이 이하의 실시예에 설명된 구성 또는 작용으로만 한정되지는 않는다. 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략하기로 한다.
본 발명의 실시예에서, 제1, 제2 등과 같이 서수를 포함하는 용어는 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용되며, 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 또한, 본 발명의 실시예에서, '구성되다', '포함하다', '가지다' 등의 용어는 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다. 또한, 본 발명의 실시예에서, '모듈' 혹은 '부'는 적어도 하나의 기능이나 동작을 수행하며, 하드웨어 또는 소프트웨어로 구현되거나 하드웨어와 소프트웨어의 결합으로 구현될 수 있으며, 적어도 하나의 모듈로 일체화되어 구현될 수 있다. 또한, 본 발명의 실시예에서, 복수의 요소 중 적어도 하나(at least one)는, 복수의 요소 전부뿐만 아니라, 복수의 요소 중 나머지를 배제한 각 하나 혹은 이들의 조합 모두를 지칭한다.
도 1은 본 발명의 일 실시예에 따른 전자장치의 구성을 도시한 블록도이다.
전자장치(100)는 메모리(10)를 포함한다. 메모리(10)는 어플리케이션 등을 실행하는데 필요한 데이터나 리소스 등을 저장하거나 기억해두는 장치이다. 메모리(10)는, 예컨대, 휘발성 여부, 접근 방식, 할당되는 프로세스의 종류 등에 기초하여 분류될 수 있다. 본 발명에서는 휘발성 여부에 따라 메모리(10)를 크게 제1메모리(11)와 제2메모리(12)로 분류한다.
제1메모리(11)는 휘발성 메모리로, 일시적으로 데이터나 리소스(이하 통칭하여 데이터라 한다.)를 기억시키거나, 일시적으로 기억된 데이터를 읽어내기도 하는 메모리이다. 휘발성 메모리 특성상 전기가 차단이 되는 등 전원이 공급되지 않는 상황에서는 기억된 데이터가 소실되고, 비휘발성 메모리에 비해 용량이 적은 편이나, 데이터 실행 속도가 빠르다. 대표적으로, 휘발성 메모리에는 버퍼(buffer), 램(RAM; Random Access Memory) 등이 있다.
제2메모리(12)는 비휘발성 메모리로, 전원이 공급되지 않아도 저장된 정보를 계속 유지, 즉 영구적으로 데이터를 저장할 수 있으며, 용량은 큰 반면, 데이터 실행 속도가 느리다. 대표적으로, 비휘발성 메모리에는 플래시메모리(flash-memory), HDD(hard-disc drive), SSD(solid-state drive), ROM(Read Only Memory) 등이 있다.
전자장치(100)는 프로세서(180)를 포함한다.
프로세서(180)는 인쇄회로기판 상에 장착되는 CPU, 칩셋, 버퍼, 회로 등으로 구현되는 하나 이상의 하드웨어 프로세서를 포함하며, 설계 방식에 따라서는 SOC(system on chip)로 구현될 수도 있다.
본 발명의 일 실시예에 따르면, 프로세서(180)는 어플리케이션을 실행하기 위해 제2메모리(12)에 저장된 어플리케이션을 제1메모리(11)에 로드한다.
이 때, 보다 빠른 어플리케이션 실행을 위해, 프로세서(180)는 제1메모리(11)에서의 어플리케이션의 실행에 필요한 데이터 로딩과 연산 작업을 미리 진행해 놓고, 사용자가 해당 어플리케이션을 실행할 때에는 해당 과정을 생략함으로써 어플리케이션 사용성을 향상시킬 수 있다. 이 과정을 프리로딩(pre-loading)이라 한다. 프리로딩을 적용하면 미리 실행된 어플리케이션의 데이터가 제1메모리(11)를 점유하게 된다.
다만, 제1메모리(11)는 그 용량이 한정적이기 때문에, 프로세서(180)는 활발히 사용하고 있지 않는 데이터를 제2메모리(12)로 이동시켜 용량을 확보하고, 필요할 때 데이터를 읽어와 사용한다. 현재 이용하고 있지 않은 데이터를 제1메모리(11)에서 제2메모리(12)로 저장하는 동작을 스왑아웃(swap-out)이라 하고, 스왑아웃된 데이터를 다시 제1메모리(11)로 로드하는 동작을 스왑인(swap-in)이라 한다.
프리로딩 상태의 어플리케이션이 실행되기 위해서는 프로세서(180)는 제2메모리(12)로 스왑아웃한 데이터를 다시 스왑인하는 동작을 수행하여야 한다.
이 때, 제2메모리(12)로 읽어오는 데이터가 제2메모리(12) 내에서 랜덤하게 존재하는 경우, 이를 읽어오는데 시간이 많이 걸리게 된다.
이하, 프리로딩을 위해 제1메모리(11)에 로드한 어플리케이션 데이터를 메모리 효율을 위해 제2메모리(12)로 스왑아웃한 경우, 효율적인 I/O 동작을 수행하는 방법에 대해 자세히 서술한다.
도 2는 본 발명의 일 실시예에 따른 전자장치의 구성을 보다 구체적으로 도시한 블록도이다.
도 2에 도시된 바와 같이, 전자장치(100)는 인터페이스부(110)를 포함할 수 있다.
인터페이스부(110)는 유선 인터페이스부(111)를 포함할 수 있다. 유선 인터페이스부(111)는 지상파/위성방송 등 방송표준에 따른 방송신호를 수신할 수 있는 안테나가 연결되거나, 케이블 방송표준에 따른 방송신호를 수신할 수 있는 케이블이 연결될 수 있는 커넥터 또는 포트를 포함한다. 다른 예로서, 전자장치(100)는 방송신호를 수신할 수 있는 안테나를 내장할 수도 있다. 유선 인터페이스부(111)는 HDMI 포트, DisplayPort, DVI 포트, 썬더볼트, 컴포지트(composite) 비디오, 컴포넌트(component) 비디오, 슈퍼 비디오(super video), SCART 등과 같이, 비디오 및/또는 오디오 전송표준에 따른 커넥터 또는 포트 등을 포함할 수 있다. 유선 인터페이스부(111)는 USB 포트 등과 같은 범용 데이터 전송표준에 따른 커넥터 또는 포트 등을 포함할 수 있다. 유선 인터페이스부(111)는 광 전송표준에 따라 광케이블이 연결될 수 있는 커넥터 또는 포트 등을 포함할 수 있다. 유선 인터페이스부(111)는 외부 마이크 또는 마이크를 구비한 외부 오디오기기가 연결되며, 오디오기기로부터 오디오 신호를 수신 또는 입력할 수 있는 커넥터 또는 포트 등을 포함할 수 있다. 유선 인터페이스부(111)는 헤드셋, 이어폰, 외부 스피커 등과 같은 오디오기기가 연결되며, 오디오기기로 오디오 신호를 전송 또는 출력할 수 있는 커넥터 또는 포트 등을 포함할 수 있다. 유선 인터페이스부(111)는 이더넷 등과 같은 네트워크 전송표준에 따른 커넥터 또는 포트를 포함할 수 있다. 예컨대, 유선 인터페이스부(111)는 라우터 또는 게이트웨이에 유선 접속된 랜카드 등으로 구현될 수 있다.
유선 인터페이스부(111)는 상기 커넥터 또는 포트를 통해 셋탑박스, 광학미디어 재생장치와 같은 외부기기, 또는 외부 디스플레이장치나, 스피커, 서버 등과 1:1 또는 1:N(N은 자연수) 방식으로 유선 접속됨으로써, 해당 외부기기로부터 비디오/오디오 신호를 수신하거나 또는 해당 외부기기에 비디오/오디오 신호를 송신한다. 유선 인터페이스부(111)는, 비디오/오디오 신호를 각각 별개로 전송하는 커넥터 또는 포트를 포함할 수도 있다.
그리고, 본 실시예에 따르면 유선 인터페이스부(111)는 전자장치(100)에 내장되나, 동글(dongle) 또는 모듈(module) 형태로 구현되어 전자장치(100)의 커넥터에 착탈될 수도 있다.
인터페이스부(110)는 무선 인터페이스부(112)를 포함할 수 있다. 무선 인터페이스부(112)는 전자장치(100)의 구현 형태에 대응하여 다양한 방식으로 구현될 수 있다. 예를 들면, 무선 인터페이스부(112)는 통신방식으로 RF(radio frequency), 지그비(Zigbee), 블루투스(bluetooth), 와이파이(Wi-Fi), UWB(Ultra WideBand) 및 NFC(Near Field Communication) 등 무선통신을 사용할 수 있다. 무선 인터페이스부(112)는 와이파이(Wi-Fi) 방식에 따라서 AP와 무선통신을 수행하는 무선통신모듈이나, 블루투스 등과 같은 1대 1 다이렉트 무선통신을 수행하는 무선통신모듈 등으로 구현될 수 있다. 무선 인터페이스부(112)는 네트워크 상의 서버와 무선 통신함으로써, 서버와의 사이에 데이터 패킷을 송수신할 수 있다. 무선 인터페이스부(112)는 적외선 통신표준에 따라 IR(Infrared) 신호를 송신 및/또는 수신할 수 있는 IR송신부 및/또는 IR수신부를 포함할 수 있다. 무선 인터페이스부(112)는 IR송신부 및/또는 IR수신부를 통해 리모컨 또는 다른 외부기기로부터 리모컨신호를 수신 또는 입력하거나, 다른 외부기기로 리모컨신호를 전송 또는 출력할 수 있다. 다른 예로서, 전자장치(100)는 와이파이(Wi-Fi), 블루투스(bluetooth) 등 다른 방식의 무선 인터페이스부(112)를 통해 리모컨 또는 다른 외부기기와 리모컨신호를 송수신할 수 있다.
전자장치(100)는 인터페이스부(110)를 통해 수신하는 비디오/오디오신호가 방송신호인 경우, 수신된 방송신호를 채널 별로 튜닝하는 튜너(tuner)를 더 포함할 수 있다.
전자장치(100)가 디스플레이 장치로 구현되는 경우, 디스플레이부(120)를 포함할 수 있다. 디스플레이부(120)는 화면 상에 영상을 표시할 수 있는 디스플레이 패널을 포함한다. 디스플레이 패널은 액정 방식과 같은 수광 구조 또는 OLED 방식과 같은 자발광 구조로 마련된다. 디스플레이부(120)는 디스플레이 패널의 구조에 따라서 부가적인 구성을 추가로 포함할 수 있는데, 예를 들면 디스플레이 패널이 액정 방식이라면, 디스플레이부(120)는 액정 디스플레이 패널과, 광을 공급하는 백라이트유닛과, 액정 디스플레이 패널의 액정을 구동시키는 패널구동기판을 포함한다.
전자장치(100)는 사용자입력부(130)를 포함할 수 있다.
사용자입력부(130)는 사용자의 입력에 의해, 기설정된 다양한 제어 커맨드 또는 한정되지 않은 정보를 프로세서(180)에 전달한다. 사용자입력부(130)는 사용자 입력을 수신할 수 있는 다양한 입력수단을 포함한다.
일 실시예에서 사용자입력부(130)는 전자장치(100)에 마련된 전원키, 숫자키, 메뉴키 등의 버튼을 포함하는 키패드(또는 입력패널)를 포함할 수 있다.
일 실시예에서 사용자입력부(130)는 전자장치(100)를 원격으로 제어 가능하게 기설정된 커맨드/데이터/정보/신호를 생성하여 전자장치(100)로 전송하는 입력장치를 포함할 수 있다. 입력장치는, 예를 들면, 리모컨(remote control), 게임콘솔(game console), 키보드(keyboard), 마우스(mouse) 등을 포함하며, 전자장치(100)와 이격 분리되어, 사용자 입력을 수신할 수 있다.
리모컨에는 사용자 입력을 수신할 수 있는 적어도 하나의 버튼이 마련될 수 있다. 일 실시예에서 리모컨에는 사용자의 터치입력(터치제스처)을 수신하는 터치감지부 및/또는 사용자에 의한 리모컨 자체의 움직임을 감지하는 모션감지부가 마련될 수 있다. 일 실시예에서 입력장치는 리모컨 어플리케이션이 설치된 스마트폰과 같은 단말장치를 포함하며, 이 경우 터치스크린을 통한 사용자의 터치입력이 수신 가능하다.
입력장치는 전자장치(100) 본체와 무선통신이 가능한 외부장치가 되며, 무선통신은 블루투스, 적외선 통신, RF 통신, 무선랜, 와이파이 다이렉트 등을 포함한다.
일 실시예에서 사용자입력부(130)는 사용자의 손의 움직임, 다시 말해, 핸드 제스처(hand gesture)(이하, 제스처 라고도 한다)를 감지하는 모션감지부를 포함할 수 있다. 전자장치(100)는 모션감지부는 손의 이동거리, 이동속도, 이동영역의 면적 등을 감지하여 데이터를 출력할 수 있다.
일 실시예에서 사용자입력부(130)는 디스플레이(121) 주변의 베젤영역에 대한 사용자의 터치를 검출할 수 있는 터치감지부를 포함할 수 있다.
일 실시예에서 사용자로부터 발화된 음성을 수신할 수 있는 마이크로폰(150)와 같은 소리수신부(130)가 사용자입력부(130)에 포함될 수 있다.
일 실시예에서, 사용자입력부(130)는 영상데이터에 대한 프라이버시 처리의 기준이 되는 설정 거리에 대한 사용자입력을 수신할 수 있다. 예를 들면, 사용자입력부(130)를 통해, 설정 거리 또는 설정 거리에 대응하는 기준 위치를 설정 또는 조정(변경)하기 위한 사용자입력이 수신될 수 있다.
전자장치(100)는 저장부(140)를 포함할 수 있다. 저장부(140)는 디지털화된 데이터를 저장한다. 저장부(140)는 전원의 제공 유무와 무관하게 데이터를 보존할 수 있는 비휘발성 속성의 스토리지(storage)와, 프로세서(180)에 의해 처리되기 위한 데이터가 로딩되며 전원이 제공되지 않으면 데이터를 보존할 수 없는 휘발성 속성의 메모리(memory)를 포함한다. 스토리지에는 플래시메모리(flash-memory), HDD(hard-disc drive), SSD(solid-state drive) ROM(Read Only Memory) 등이 있으며, 메모리에는 버퍼(buffer), 램(RAM; Random Access Memory) 등이 있다.
전자장치(100)는 마이크로폰(150)을 포함할 수 있다. 마이크로폰(150)은 사용자 음성을 비롯한 외부 환경의 소리를 수집한다. 마이크로폰(150)은 수집된 소리의 신호를 프로세서(180)에 전달한다. 전자장치(100)는 사용자 음성을 수집하는 마이크로폰(150)을 구비하거나, 또는 인터페이스부(110)를 통해 마이크로폰을 가진 리모트 컨트롤러, 스마트폰 등의 외부장치로부터 음성신호를 수신할 수 있다. 외부장치에 리모트 컨트롤러 어플리케이션을 설치하여 전자장치(100)를 제어하거나 음성 인식 등의 기능을 수행할 수도 있다. 이와 같은 어플리케이션이 설치된 외부장치의 경우, 사용자 음성을 수신할 수 있으며, 외부장치는 전자장치(100)와 Wi-Fi/BT 또는 적외선 등을 이용하여 데이터 송수신 및 제어가 가능한 바, 상기 통신 방식을 구현할 수 있는 복수의 인터페이스부(110)가 전자장치(100) 내에 존재할 수 있다.
전자장치(100)는 스피커(160)를 포함할 수 있다. 스피커(160)는 프로세서(180)에 의해 처리되는 오디오 데이터를 소리로 출력한다. 스피커(160)는 어느 한 오디오 채널의 오디오 데이터에 대응하게 마련된 단위 스피커를 포함하며, 복수 오디오 채널의 오디오 데이터에 각기 대응하도록 복수의 단위 스피커를 포함할 수 있다. 다른 실시예로서, 스피커(160)는 전자장치(100)와 분리되어 마련될 수 있으며, 이 경우 전자장치(100)는 오디오 데이터를 인터페이스부(110)를 통하여 스피커(160)로 전달할 수 있다.
전자장치(100)는 센서(170)를 포함할 수 있다. 센서(170)는, 전자장치(100)의 상태 또는 전자장치(100) 주변의 상태를 감지하고, 감지된 정보를 프로세서(180)로 전달할 수 있다. 센서(170)는, 카메라를 포함한다.
이 외에도 지자기 센서(Magnetic sensor), 가속도 센서(Acceleration sensor), 온/습도 센서, 적외선 센서, 자이로스코프 센서, 위치 센서(예컨대, GPS), 기압 센서, 근접 센서, 및 RGB 센서(illuminance sensor) 중 적어도 하나를 포함할 수 있으나, 이에 한정되는 것은 아니다. 각 센서들의 기능은 그 명칭으로부터 당업자가 직관적으로 추론할 수 있으므로, 구체적인 설명은 생략하기로 한다.
전자장치(100)는 프로세서(180)를 포함할 수 있다. 프로세서(180)는 인쇄회로기판 상에 장착되는 CPU, 칩셋, 버퍼, 회로 등으로 구현되는 하나 이상의 하드웨어 프로세서를 포함하며, 설계 방식에 따라서는 SOC(system on chip)로 구현될 수도 있다. 프로세서(180)는 전자장치(100)가 디스플레이장치로 구현되는 경우에 디멀티플렉서, 디코더, 스케일러, 오디오 DSP(Digital Signal Processor), 앰프 등의 다양한 프로세스에 대응하는 모듈들을 포함한다. 여기서, 이러한 모듈들 중 일부 또는 전체가 SOC로 구현될 수 있다. 예를 들면, 디멀티플렉서, 디코더, 스케일러 등 영상처리와 관련된 모듈이 영상처리 SOC로 구현되고, 오디오 DSP는 SOC와 별도의 칩셋으로 구현되는 것이 가능하다.
프로세서(180)는 마이크로폰(150) 등에 의해 사용자 음성에 대한 음성신호를 획득하면, 음성신호를 음성데이터로 변환할 수 있다. 이 때, 음성데이터는 음성신호를 텍스트 데이터로 변환하는 STT(Speech-to-Text) 처리 과정을 통해 얻어진 텍스트 데이터일 수 있다. 프로세서(180)는 음성데이터가 나타내는 커맨드를 식별하고, 식별된 커맨드에 따라서 동작을 수행한다. 음성데이터 처리 과정과, 커맨드 식별 및 수행 과정은, 전자장치(100)에서 모두 실행될 수도 있다. 그러나, 이 경우에 전자장치(100)에 필요한 시스템 부하 및 소요 저장용량이 상대적으로 커지게 되므로, 적어도 일부의 과정은 네트워크를 통해 전자장치(100)와 통신 가능하게 접속되는 적어도 하나의 서버에 의해 수행될 수 있다.
본 발명에 따른 프로세서(180)는 전자장치(100)와 같은 기기(Machine)가 읽을 수 있는 저장 매체(Storage Medium)에 저장된 소프트웨어의 명령어들 중 적어도 하나의 명령을 호출하고, 그것을 실행할 수 있다. 이것은 전자장치(100)와 같은 기기가 상기 호출된 적어도 하나의 명령어에 따라 적어도 하나의 기능을 수행하도록 운영되는 것을 가능하게 한다. 상기 하나 이상의 명령어들은 컴파일러에 의해 생성된 코드 또는 인터프리터에 의해 실행될 수 있는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장매체는, 비일시적(Non-transitory) 저장매체의 형태로 제공될 수 있다. 여기서, ‘비일시적'은 저장매체가 실재(tangible)하는 장치이고, 신호(예컨대, 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다.
한편, 프로세서(180)는 제1메모리에 로드되며 활성화 상태에서 비활성화 상태로 전환된 어플리케이션의 프로세스를 식별하고, 비활성화 상태로 전환된 프로세스의 데이터를 제2메모리의 영역에 순차 액세스 방식으로 저장하고, 프로세스가 비활성화 상태에서 활성화 상태로 복원되는 이벤트에 대응하여, 제2메모리의 영역에 저장된 프로세스의 데이터를 제1메모리에 로드하기 위한 데이터 분석, 처리, 및 결과 정보 생성 중 적어도 일부를 규칙 기반 또는 인공지능(Artificial Intelligence) 알고리즘으로서 기계학습, 신경망 네트워크(neural network), 또는 딥러닝 알고리즘 중 적어도 하나를 이용하여 수행할 수 있다.
프로세서(180)는 제1메모리에 로드되며 활성화 상태에서 비활성화 상태로 전환된 어플리케이션의 프로세스를 식별하고, 비활성화 상태로 전환된 프로세스의 데이터를 제2메모리의 영역에 순차 액세스 방식으로 저장하고, 프로세스가 비활성화 상태에서 활성화 상태로 복원되는 이벤트에 대응하여, 제2메모리의 영역에 저장된 프로세스의 데이터를 제1메모리에 로드하여 인공지능 모델의 입력으로 사용하는 데에 적합한 형태로 변환할 수 있다. 인공지능 모델은 학습을 통해 만들어 질 수 있다. 여기서, 학습을 통해 만들어진다는 것은, 기본 인공지능 모델이 학습 알고리즘에 의하여 다수의 학습 데이터들을 이용하여 학습됨으로써, 원하는 특성(또는, 목적)을 수행하도록 설정된 기 정의된 동작 규칙 또는 인공지능 모델이 만들어짐을 의미한다. 인공지능 모델은, 복수의 신경망 레이어들로 구성될 수 있다. 복수의 신경망 레이어들 각각은 복수의 가중치들(weight values)을 갖고 있으며, 이전(previous) 레이어의 연산 결과와 복수의 가중치들 간의 연산을 통해 신경망 연산을 수행한다.
추론 예측은 정보를 판단하여 논리적으로 추론하고 예측하는 기술로서, 지식/확률 기반 추론(Knowledge based Reasoning), 최적화 예측(Optimization Prediction), 선호 기반 계획(Preference-based Planning), 추천(Recommendation) 등을 포함한다
일 예로, 프로세서(180)는 학습부 및 인식부의 기능을 함께 수행할 수 있다. 학습부는 학습된 신경망 네트워크를 생성하는 기능을 수행하고, 인식부는 학습된 신경망 네트워크를 이용하여 데이터를 인식(또는, 추론, 예측, 추정, 판단)하는 기능을 수행할 수 있다. 학습부는 신경망 네트워크를 생성하거나 갱신할 수 있다. 학습부는 신경망 네트워크를 생성하기 위해서 학습 데이터를 획득할 수 있다. 일 예로, 학습부는 학습 데이터를 저장부(140) 또는 외부로부터 획득할 수 있다. 학습 데이터는, 신경망 네트워크의 학습을 위해 이용되는 데이터일 수 있으며, 상기한 동작을 수행한 데이터를 학습데이터로 이용하여 신경망 네트워크를 학습시킬 수 있다.
학습부는 학습 데이터를 이용하여 신경망 네트워크를 학습시키기 전에, 획득된 학습 데이터에 대하여 전처리 작업을 수행하거나, 또는 복수 개의 학습 데이터들 중에서 학습에 이용될 데이터를 선별할 수 있다. 일 예로, 학습부는 학습 데이터를 기 설정된 포맷으로 가공하거나, 필터링하거나, 또는 노이즈를 추가/제거하여 학습에 적절한 데이터의 형태로 가공할 수 있다. 학습부는 전처리된 학습 데이터를 이용하여 상기한 동작을 수행하도록 설정된 신경망 네트워크를 생성할 수 있다.
학습된 신경망 네트워크는, 복수의 신경망 네트워크(또는, 레이어)들로 구성될 수 있다. 복수의 신경망 네트워크의 노드들은 가중치를 가지며, 복수의 신경망 네트워크들은 일 신경망 네트워크의 출력 값이 다른 신경망 네트워크의 입력 값으로 이용되도록 서로 연결될 수 있다. 신경망 네트워크의 예로는, CNN (Convolutional Neural Network), DNN (Deep Neural Network), RNN (Recurrent Neural Network), RBM (Restricted Boltzmann Machine), DBN (Deep Belief Network), BRDNN (Bidirectional Recurrent Deep Neural Network) 및 심층 Q-네트워크 (Deep Q-Networks)과 같은 모델을 포함할 수 있다.
한편 인식부는 상기한 동작을 수행하기 위해, 타겟 데이터를 획득할 수 있다. 타겟 데이터는 저장부(140) 또는 외부로부터 획득된 것일 수 있다. 타겟 데이터는 신경망 네트워크의 인식 대상이 되는 데이터일 수 있다. 인식부는 타겟 데이터를 학습된 신경망 네트워크에 적용하기 전에, 획득된 타겟 데이터에 대하여 전처리 작업을 수행하거나, 또는 복수 개의 타겟 데이터들 중에서 인식에 이용될 데이터를 선별할 수 있다. 일 예로, 인식부는 타겟 데이터를 기 설정된 포맷으로 가공하거나, 필터링 하거나, 또는 노이즈를 추가/제거하여 인식에 적절한 데이터의 형태로 가공할 수 있다. 인식부는 전처리된 타겟 데이터를 신경망 네트워크에 적용함으로써, 신경망 네트워크로부터 출력되는 출력값을 획득할 수 있다. 인식부는 출력값과 함께, 확률값 또는 신뢰도값을 획득할 수 있다.
일 예로, 본 발명에 따른 전자장치(100)의 제어방법은 컴퓨터 프로그램 제품 (Computer Program Product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은, 앞서 설명한, 프로세서(180)에 의해 실행되는 소프트웨어의 명령어들을 포함할 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예컨대, CD-ROM)의 형태로 배포되거나, 또는 어플리케이션 스토어(예컨대, 플레이 스토어TM)를 통해 또는 두 개의 사용자 장치들(예컨대, 스마트폰들) 간에 직접, 온라인으로 배포(예컨대, 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.
도 3은 본 발명의 일 실시예에 따른 전자장치의 동작 흐름도를 도시한 도면이다.
본 발명의 일 실시예에 따른 프로세서(180)는 어플리케이션의 복수의 프로세스를 제1메모리(11)에 로드하고, 제1메모리에 로드된 복수의 프로세스 중 비활성화 상태로 전환된 프로세스를 식별한다(S310).
본 발명의 일 실시예에 따르면, 프로세스는, 메모리(10)에 로드되어 있는 데이터 또는 어플리케이션에 기반하여 실행되는 작업 단위이다. 즉, 어플리케이션은 적어도 하나의 프로세스를 포함하고, 프로세서(180)가 메모리(10)에 로드되어 있는 데이터를 처리함으로써, 하나 이상의 프로세스가 수행된다. 따라서, 프로세스가 실행되기 위해서는 해당 프로세스에 대응하는 데이터가 메모리(10), 구체적으로는 제1메모리(11)에 로드되어 있어야 한다.
프로세서(180)는 어플리케이션의 프로세스의 상태를 식별한다. 프로세스의 활성화 상태란 프로세스의 데이터가 프로세서(180)에 의해 필요에 따라 이용이 가능하며, 자유롭게 이동이 가능한 상태를 말하며, 반대로, 비활성화 상태란 프로세스의 데이터가 메모리는 점유한 상태이나 프로세서(180)는 이용하지 않고, 임의로 이동되지 않는 상태를 의미한다. 구체적인 내용은 도 4 및 도 5를 이용하여 서술한다.
앞서 도 1에서 서술한 바와 같이, 프로세서(180)가 어플리케이션을 프리로딩한 상태라고 가정한다. 프로세서(180)는 제1메모리(11)의 용량을 확보하기 위해, 데이터를 제2메모리(12)로 스왑아웃한 경우에도, 여전히 어플리케이션은 백그라운드(Background)로 구동 중인 상태이기 때문에, 프로세서(180)의 구동 중 제2메모리(12)로 이동된 데이터가 제1메모리(11)로 다시 로드되는 경우가 있다.
이 동작이 반복되면, 사실상 제2메모리(12)로 데이터를 스왑아웃한 의미가 없어진다. 따라서, 프로세서(180)는 비활성화된 데이터를 기초로 제1메모리(11)에서 제2메모리(12)로 스왑아웃함으로써, 프리로딩 상태를 구현하되 메모리 용량을 효율적으로 이용할 수 있다.
본 발명의 일 실시예에 따른 프로세서(180)는 비활성화 상태로 전환된 것으로 식별된 프로세스의 데이터를 제2메모리(12)의 영역(121)에 순차 액세스 방식으로 저장한다(S320).
순차 액세스(sequential access)란 연속하는 주소를 가지는 메모리의 단일 영역에 데이터를 순차적으로 저장하여, 데이터를 불러올 때 해당 영역을 처음부터 차례대로 한번에 액세스할 수 있는 것을 의미하며, 상호 연속하지 않는 주소를 가지는 메모리의 임의의 복수 영역에 데이터를 나누어 저장하여 데이터를 불러올 때 복수의 영역을 여러 번 액세스하여야 하는 임의 액세스(random access)와 비교하여 데이터의 I/O 효율이 높다.
특히, I/O 효율은, 순차 액세스의 경우, 메모리 사이즈가 작은 경우보다 큰 경우가 높으며, 보통 순차 액세스가 임의 액세스보다 데이터를 읽는 속도가 3~10 배 정도 빠르다.
구체적으로, 임의 액세스 방식으로 데이터를 읽어오는 경우 데이터가 위치한 주소의 영역을 페이지 단위(4KB)로 랜덤하게 읽기 때문에, 데이터의 크기가 클수록 원하고자 하는 데이터를 찾을 때까지 시간이 많이 걸린다. 따라서, 프로세서(180)가 제2메모리(12)로부터 짧은 시간 내에 많은 데이터를 읽어야 하는 경우, 랜덤하게 데이터가 저장되어 있으면 I/O 동작이 병목을 일으키며 이는 어플리케이션 사용성 저하를 야기한다. 반면, 순차 액세스 방식은 데이터를 순차적으로 저장할 수 있으므로, 보다 큰 데이터 단위를 가질 수 있고, 데이터를 읽어들이는데 속도가 빠르다.
추후 필요에 따라 데이터를 제1메모리(11)에 순차 액세스 방식으로 읽어들이기 위해, 프로세서(180)는 제2메모리(12)의 영역(121)에 데이터를 순차적으로 저장한다. 제2메모리(12)의 영역(121)은 연속하는 주소를 가지는 공간으로, 영역(121)의 크기에 따라 순차적으로 저장되는 데이터 크기가 결정된다.
본 발명의 일 실시예에 따른 프로세서(180)는 프로세스가 비활성화 상태에서 활성화 상태로 복원되는 이벤트에 대응하여, 제2메모리(11)의 영역(121)에 저장된 프로세스의 데이터를 제1메모리에 로드한다(S330).
비활성화 상태에서 활성화 상태로 복원되는 이벤트란, 예컨대, 사용자의 어플리케이션을 실행하는 사용자입력일 수 있다. 자세한 내용은 도 9에서 서술한다.
프로세서(180)는 상기 소정의 이벤트에 대응하여, 제2메모리(12)의 영역(121)에 저장된 프로세스의 데이터를 제1메모리(11)에 로드한다. 이 때, 프로세스의 데이터는 제2메모리(12)의 영역(121)에 순차적으로 저장되어 있으므로, 프로세서(180)는 제2메모리(12)의 영역(121)에 저장된 데이터를 한꺼번에 제1메모리(11)에 로드할 수 있고, 따라서 어플리케이션을 빠르게 실행할 수 있다.
다만, 순차 액세스 방식으로 데이터를 저장하는 경우, 액세스 속도의 면에서는 유리함은 있으나, 메모리 영역의 점유의 면에서는 제약이 있을 수 있다. 즉, 순차 액세스되는 영역은, 자유로이 분산될 수 있는 랜덤 액세스 방식의 영역과는 달리, 저장될 데이터의 크기를 전부 만족할 정도의 연속된 공간이 미리 확보되어야 하며, 확보된 영역은 다른 데이터의 저장에 이용될 수 없는 제한이 있다. 따라서, 메모리 공간의 효율적인 이용을 위해서는, 순차 액세스 방식으로 데이터를 저장할 영역의 지정에 있어서 신중한 고려가 요구되고, 순차 액세스 방식으로 저장할 영역은 가급적 최소화하는 것이 바람직하다.
한편, 앞서 설명한 바와 같이, 비활성화된 데이터를 기초로 제1메모리(11)에서 제2메모리(12)로 스왑아웃하게 되면, 의도적이지 않은 스왑인을 방지하게 되어 메모리 공간을 효율적으로 이용할 수 있음을 언급하였다.
따라서, 본 발명의 일 실시예에서는, 프로세서(180)는 제1메모리(11)에서 순차 액세스 방식으로 지정되는 영역을 최소화하고, 해당 영역의 효율적인 이용을 위하여 제2메모리(12)로 스왑아웃한 데이터가 불필요하게 다시 제1메모리(11)로 돌아가는 것이 방지되도록, 프로세스의 상태를 비활성화 상태로 전환하고, 데이터를 제2메모리(12)에 순차 액세스 방식으로 저장한다.
따라서, 본 발명의 일 실시예에 따르면, 어플리케이션의 프리로딩 상태를 구현하되 메모리 용량을 효율적으로 이용하여 어플리케이션 동작을 빠르게 수행할 수 있다.
도 4는 본 발명의 일 실시예에 따른 전자장치의 동작 모습을 도시한 도면이다.
도 4는 앞서 도 3의 S310에서 설명한 바와 같이 메모리(10)에서 프로세스(410)의 데이터가 제1메모리(11)와 제2메모리(12)간 이동이 가능한 활성화 상태를 도시한다.
프로세서(180)는 제1메모리(11)의 용량을 확보하기 위해 제1메모리(11)에 로드된 데이터를 제2메모리(12)로 이동할 수 있고, 이동된 데이터는 프로세서(180)의 실행에 의해 제2메모리(12)에서 제1메모리(11)로 다시 이동할 수 있다. 즉, 이러한 메모리 간 데이터의 이동이 가능한 상태를 활성화 상태라고 한다.
따라서, 프로세서(180)는 메모리의 효율을 위하여 제1메모리(11)에서 제2메모리(12)로 스왑아웃한 데이터가 불필요하게 다시 제1메모리(11)로 돌아가지 않게 하기 위해, 프로세스의 상태를 활성화 상태에서 메모리 간 데이터의 이동이 불가한 비활성화 상태로 전환하고, 데이터를 제2메모리(12)로 저장할 수 있다. 비활성화 상태로 전환하는 동작은 이하 도 5에서 자세히 서술한다.
또한, 도 4는 도 3의 S320에서 설명한 바와 같이, 프로세스(420)의 데이터가 순차 액세스 방식 혹은 임의 액세스 방식으로 데이터를 스왑아웃하는 모습을 도시한다.
프로세스(420)의 상태가 비활성화 상태로 전환된 경우, 프로세서(180)가 프로세스(420)의 데이터를 제1메모리(11)에서 제2메모리(12)로 저장하면, 제2메모리(12)는 별도의 프로세서(180)의 동작 없이는 제2메모리(12)에 존재하게 된다.
프로세서(180)는 제1메모리(11)의 여유 메모리량, 프로세서(180)의 속도 또는 프로세서(180)의 평균 사용량 등을 식별하고, 이 중 적어도 하나에 기초하여 데이터의 스왑아웃 여부를 식별할 수 있다. 예컨대, 제1메모리(11)의 여유 메모리량이 기 정의된 값보다 적은 경우, 프로세서(180)는 제1메모리(11)의 메모리량을 확보하기 위해 제2메모리(12)로의 스왑아웃이 필요함을 식별할 수 있다.
제2메모리(12)는 제1영역(121)과 제2영역(122)으로 구분될 수 있다. 제1영역(121)은 데이터가 순차적으로 저장되는 영역을 의미하고, 제2영역(122)은 데이터가 임의로 저장되는 영역을 의미한다.
제1영역(121)은 각 프로세스 별로 마련(지정)되는 복수 서브영역을 포함한다. 물론 경우에 따라서, 단일 프로세스를 복수의 영역으로 분할하여 저장할 수 있지만, 이 경우에도 각 영역 내에서는 순차 저장된다.
프로세서(180)는 프로세스(420)의 데이터를 비활성화 상태로 전환하고, 전환된 프로세스(420)의 데이터를 제2메모리(12)의 제1영역(121)에 순차 액세스 방식으로 저장한다. 물론 비활성화 상태에서도, 프로세서(180)는 프로세스(420)의 데이터를 제2메모리(12)의 제2영역(122)에 임의 액세스 방식으로 저장할 수 있다. 이 때, 어느 영역에 어떤 방식으로 프로세스의 데이터를 저장할 것인지는 이하 도 5에서 자세히 서술한다. 추가로 프로세서(180)는 제1메모리(11)에 로드되며 비활성화 상태로 전환되지 않고, 활성화 상태를 유지하는 어플리케이션의 프로세스의 데이터를 제2메모리(12)의 제2영역(122)에 임의 액세스 방식으로 저장할 수 있다. 임의 액세스 방식의 경우, 프로세스의 데이터는 제2영역(122) 내에서 임의로 분산되어 저장될 수 있다.
도 5는 본 발명의 일 실시예에 따른 전자장치의 스케줄링 모습을 도시한 도면이다.
프로세서(180)는, 제1메모리(11)에 로드된 어플리케이션의 복수의 프로세스 중 비활성화 상태로 전환할 프로세스를 프로세서(180)의 실행 대상, 즉, 스케줄링 대상에서 제외시켜 비활성화 상태로 전환한다. 스케줄링 대상은, 예컨대, 리스트의 형태로 도 5에 도시된 바와 같이 활성화되어 있는 각 프로세스의 상태를 나타내는 정보가 저장 및 관리된다. 즉, 비활성화 상태로 된다는 것은 프로세서(180)가 활성화되어 있는 프로세스를 스케줄링 대상의 리스트에서 제외 혹은 삭제한다는 것을 의미한다.
스케줄링 대상에서 제외되는 프로세스는, 예컨대, 장기간 사용하지 않아 제1메모리(11)의 점유 필요성이 낮은 프로세스이거나, 어플리케이션의 실행을 위해 꼭 필요한 프로세스로 빠른 실행을 위해 한번에 로드될 필요가 있어, 안정적으로 제2메모리(12)에서 저장될 필요성이 있는 프로세스가 될 수 있다.
도 5에 도시된 스케줄링 대상 중에서, 예컨대, '대기(Waiting) 상태'의 프로세스의 경우에도, 그 사용의 우선순위가 '실행(Running) 상태'의 프로세스보다 낮은 것일 수 있는데, 본 실시예의 스케줄링 대상에서 제외되는 프로세스는, '대기(Waiting) 상태'의 프로세스보다 사용의 우선순위가 낮을 것일 수 있다.
도 5는 프로세서(180)의 프로세스 스케줄링의 과정을 상세히 도시하고 있다.
본 발명의 일 실시예에 따른 프로세서(180)가 활성화 상태로 복원하거나, 비활성화 상태로 전환하기 전 프로세스는 다음 스케줄링 과정에 따라 동작한다.
먼저, 프로세스가 생성(New)되고 나서 생성된 프로세스는 준비(Ready) 상태에 머문다. 준비 상태는 프로세서(180)가 실행 예정인 상태이다. 준비 상태에서 실행(Running) 상태로 넘어가려면 작업 스케줄러가 해당 프로세스를 선택해야 한다.
디스패치(Dispatch)란 준비 상태에서 실행 상태로 전이되는 과정을 말하며, 이는 작업 스케줄러가 해당 프로세스를 선택하여 실행되는 것으로, 이때 실행된 프로세스가 프로세서(180)를 점유하게 된다.
인터럽트(Interrupt) 신호를 받게 되면, 실행 중이던 프로세스는 준비 상태로 전이되고, 우선순위가 높은 프로세스를 실행 상태로 전이한다.
입출력 혹은 이벤트 대기(I/O or Event wait)는 프로세서(180)를 점유하고 있는 프로세스가 입출력 처리를 해야만 하는 상황이라면, 실행되고 있는 프로세스는 실행 상태에서 대기(Waiting) 상태로 바뀐다. 그리고 대기 상태로 바뀐 프로세스는 입출력 처리가 모두 끝날때까지 대기 상태로 머문다. 그리고 실행 상태이던 프로세스가 대기 상태로 전이됨과 함께, 준비 상태이던 또 다른 프로세스가 실행 상태로 전이된다. 또한 대기 상태인 프로세스는 제1메모리(11)의 어느 영역에 머물러 있거나, 혹은 제2메모리(12)로 스왑아웃되는 경우 비활성화될 수 없다면 제2영역(122)에 임의 액세스 방식으로 저장되는 프로세스를 의미한다.
이 때, 앞서 설명한 바와 같이, 스케줄링 과정에서의 대기 상태와 준비 상태는 프로세서(180)에 의해 동작하는 활성화 상태 중 하나인 바, 본 발명의 비활성화 상태와는 구별된다.
입출력 혹은 이벤트 완료(I/O or Event completion)된 프로세스는 대기 상태에서 준비 상태로 전이되어 스케줄러에게 선택될 수 있게 된다.
실행 상태가 끝나게 되면 프로세스는 종료(terminated)된다.
프로세서(180)는, 복원하는 이벤트에 대응하여, 제2메모리(12)의 영역에 데이터가 저장된 프로세스를 스케줄링 대상에 추가하여 프로세스를 활성화 상태로 복원할 수 있다.
본 발명의 일 실시예에 따르면, 프로세스를 비활성화 상태로 전환하여, 안정적으로 데이터를 제2메모리(12)에 저장할 수 있다.
도 6은 본 발명의 일 실시예에 따른 전자장치의 동작 흐름도를 도시한 도면이다. 도 6은 도 3의 S320의 동작을 구현하는 일 예를 흐름도로 도시한 도면이다.
프로세서(180)는 제1메모리(11)에서 제2메모리(12)로 프로세스의 데이터를 스왑아웃 할 때, 제2메모리(12)에 스왑아웃 하고자 하는 프로세스의 ID와 일치하는 제1영역(121)이 존재하는지 식별한다(S610).
프로세스의 ID와 일치하는 제1영역(121)이 있는 경우(S610의 Yes), 프로세서(180)는 해당 프로세스의 데이터가 추후 어플리케이션의 실행을 위해 빠르게 제1메모리(11)로 스왑인이 필요하여 제2메모리(12)에 연속적으로 저장할 수 있다. 반면, 프로세스의 ID와 일치하는 제1영역(121)이 없는 경우(S610의 No), 프로세서(180)는 제2영역(122)에 프로세스의 데이터를 랜덤하게 저장한다.
프로세서(180)는 프로세스의 ID와 일치하는 제1영역(121)이 있는 경우(S610의 Yes), 프로세스가 비활성화 상태인지 여부를 식별한다(S620).
프로세스가 비활성화 상태인 경우(S620의 Yes), 프로세서(180)가 프로세스의 데이터를 제2메모리(12)에 저장하여도, 제2메모리(12)에서 임의로 다시 제1메모리(11)로 이동할 우려가 없기 때문에 스왑아웃 시 메모리 효율을 기대할 수 있다. 또한, 추후 프로세스를 포함하는 어플리케이션을 실행 시, 보다 빠른 실행 속도를 위해 프로세서(180)는 제1영역(121)에 순차 액세스 방식으로 프로세스의 데이터를 저장한다(S630).
프로세스가 비활성화 상태가 아닌 경우, 즉 활성화 상태인 경우(S620의 No), 프로세서(180)는 프로세스의 데이터를 제2메모리(12)의 제2영역(122)에 임의 액세스 방식으로 데이터를 저장한다(S640).
추가로, S620 단계와 관련하여, 프로세서(180)는 프로세스(일부 포함)가 비활성화 상태가 가능한 프로세스인지 여부를 식별할 수 있다. 비활성화 상태가 가능한 경우, 프로세스를 비활성화하여 제1영역(121)에 프로세스의 데이터를 저장(S630)하고, 그렇지 못하면 활성화 상태로 제2영역(122)에 프로세스의 데이터를 저장(S640)할 수 있다.
도 7은 본 발명의 일 실시예에 따른 전자장치의 동작 모습을 도시한 도면이다.
도 7은 도 3의 S330에서 설명한 바와 같이, 순차 액세스 방식으로 제2메모리(12)의 제1영역(121)에 저장된 데이터를 제1메모리(11)에 스왑인하는 모습을 도시한다.
프로세서(180)는 비활성화 상태에서 활성화 상태로 복원되는 이벤트에 대응하여, 제2메모리(12)의 영역에 저장된 프로세스(410)의 데이터를 제1메모리(11)에 로드시킬 수 있다.
비활성화 상태에서 활성화 상태로 복원되는 이벤트란, 예컨대, 사용자의 어플리케이션을 실행하는 사용자입력일 수 있다.
본 발명의 일 실시예에 따른 전자장치(100)는 인터페이스부(110)를 포함하고, 프로세서(180)는, 어플리케이션을 실행하는 사용자입력을 인터페이스부(110)를 통해 수신하고, 수신된 사용자입력에 기초하여 프로세스(410)가 활성화 상태로 복원되는 이벤트가 발생한 것으로 식별할 수 있다.
사용자입력은 디스플레이부(120)에 표시된 그래픽 유저 인터페이스(GUI; Graphic User Interface)에서 어플리케이션을 실행시키는 아이콘을 선택하는 입력이거나, 어플리케이션을 실행하는 음성입력일 수 있다.
상기 도 6의 S620에서, 프로세스의 비활성화 상태 전환 여부에 기초하여 제2메모리(12)의 각 영역에 저장한 경우, 프로세서(180)는 제1영역(121)에 저장된 프로세스를 비활성화 상태에서 활성화 상태로 복원되는 이벤트에 기초하여 활성화 상태로 전환하여 제1메모리(11)에 로드할 수 있다. 프로세서(180)는 활성화 상태로 제2영역(122)에 저장된 프로세스는 도 5에서 설명한 바와 같이 준비상태 혹은 대기상태에 있는 프로세스의 상태를 실행 상태로 전환하여 제1메모리(11)로 로드할 수 있다.
본 발명의 일 실시예에 따르면, 데이터는 순차 액세스 방식으로 제2메모리(12)의 제1영역(121)에 저장된 데이터인 바, 보다 빠른 속도로 제1영역(121)에 저장된 데이터를 한꺼번에 제1메모리(11)에 스왑인할 수 있다.
도 8은 본 발명의 일 실시예에 따른 전자장치의 동작 흐름도를 도시한 도면이다.
도 8은 도 3의 S310의 동작이 수행되기 전 어플리케이션의 복수의 프로세스가 제1메모리(11)에 로드되는 동작 흐름도를 도시한다.
본 발명에서의 프리로딩은 사용자가 별도 실행하지 않았음에도, 추후 실행할 것을 대비하여 미리 프로세서(180)의 백그라운드에서 실행시키는 것인데, 프로세서(180)는 어떤 어플리케이션을 어느 시점에서 실행할 것인지 등을 결정한다.
프로세서(180)는 제1메모리(11)의 여유 메모리량, 프로세서(180)의 속도 또는 프로세서(180)의 평균 사용량을 식별할 수 있다(S810).
프로세서(180)는 제1메모리(11)의 여유 메모리량, 프로세서(180)의 속도 또는 프로세서(180)의 평균 사용량 중 적어도 하나에 기초하여 어플리케이션의 실행을 준비하는 이벤트가 발생한 것으로 식별할 수 있다(S820).
일 예로 제1메모리(11)의 여유 메모리량이 기 정의된 값 이상인 경우, 제1메모리(11)에서 현재 실행되고 있는 어플리케이션 이외에, 실행되고 있지 않지만 실행될 것으로 예상되는 어플리케이션을 실행할 여유가 있는 것으로 식별되므로, 프로세서(180)는 어플리케이션의 실행을 준비하는 이베트가 발생한 것으로 식별할 수 있다.
프로세서(180)는 어플리케이션의 사용 빈도, 사용 시간대, 어플리케이션의 용량 등에 기초하여 실행할 어플리케이션을 식별할 수 있다.
프로세서(180)는 어플리케이션의 실행을 준비하는 이벤트에 기초하여 어플리케이션의 복수의 프로세스를 제1메모리(11)에 로드할 수 있다.
본 발명의 일 실시예에 따르면, 프리로딩 될 어플리케이션을 식별하여 보다 효율적으로 프리로딩 및 메모리 사용을 구현할 수 있다.
도 9는 본 발명의 일 실시예에 따른 전자장치의 동작 흐름도를 도시한 도면이다.
도 9는 앞서 도 3의 S320과 관련하여 전자장치가 구현할 수 있는 또 다른 예를 흐름도로 도시한 도면이다.
프로세서(180)는 도 8에 기초하여 어플리케이션의 실행을 준비하는 이벤트가 발생한 것으로 식별됨에 따라 어플리케이션을 프리로딩할 수 있다(S910).
프로세서(180)는 도 6의 S620에서 식별한 바와 같이 프로세스의 상태가 활성화인 경우, 어플리케이션 프로세스의 데이터를 제1메모리(11)에서 제2메모리(12)의 제2영역(122)에 저장할 수 있다(S920).
프로세서(180)는 안정적인 프로세스의 데이터를 제2메모리(12)에 저장하기 위해 프로세스의 상태를 비활성화 상태로 전환할 수 있다(S930).
프로세서(180)는 비활성화 상태로 전환된 프로세스의 데이터를 제2메모리(12)의 제1영역(121)으로 이동할 수 있다(S940).
프로세서(180)는 프로세스의 데이터가 모두 제2메모리(12)로 이동하였는지 여부를 식별하고(S950), 이동되지 않으면(S950의 Yes), 다시 S940으로 돌아가 남은 데이터를 제2메모리(12)의 제1영역(121)으로 이동할 수 있다. 모두 제2메모리(12)로 이동한 경우(S950의 No), 프로세서(180)는 동작을 종료한다.
도 10은 본 발명의 일 실시예에 따른 전자장치의 동작 흐름도를 도시한 도면이다.
도 10은 프로세서(180)가 데이터를 제2메모리(12)에 안정적으로 이동하고 난 뒤, 도 3의 S330과 관련된 동작 흐름도를 도시한다.
프로세서(180)는 프로세스가 비활성화 상태에서 활성화 상태로 복원되는 이벤트가 발생된 것을 식별한다(S1010). 프로세스가 비활성화 상태에서 활성화 상태로 복원된다는 것은 앞서 도 5에서 설명한 바와 같이, 프로세스가 준비 상태에서 실행(Running) 상태로 넘어가기 위해 작업 스케줄러에 의해 선택된다는 것을 의미한다. 선택된 프로세스는 실행되어 프로세서(180)를 점유하게 된다. 프로세스의 상태를 복원하는 이벤트의 발생은 앞서 도 7에서 설명한 바와 같다.
프로세서(180)는 이벤트, 즉, 사용자의 어플리케이션을 실행하려는 사용자 입력에 대응하여 제1메모리(11)에 어플리케이션의 복수의 프로세스가 존재하는지 여부를 식별한다. 제1메모리(11)에 실행하고자 하는 어플리케이션을 실행할 수 있는 데이터가 존재하는 경우(S1020의 Yes), 프로세서(180)는 데이터를 이용하여 해당 어플리케이션을 실행할 수 있다(S1040).
만약, 해당 어플리케이션의 데이터가 본 발명의 일 실시예에 따라 프리로딩 및 메모리 효율을 위해 제2메모리(12)로 이동된 경우, 프로세서(180)는 제1메모리(11)에 어플리케이션의 복수의 프로세스 중 일부 또는 전부가 존재하지 않음을 식별할 수 있다(S1020의 No). 프로세서(180)는 어플리케이션 데이터가 필요하다는 요청(page fault)을 수신할 수 있다.
프로세서(180)는 어플리케이션의 복수의 프로세스 중 제1메모리(11)에 존재하지 않는 프로세스에 기초하여, 해당 프로세스의 데이터가 저장된 제2메모리(12)의 영역을 식별할 수 있다.
프로세서(180)는 제2메모리(12)에 있는 데이터를 제1메모리(11)로 로드할 수 있다(S1030). 보다 구체적으로는, 프로세서(180)는 식별된 제2메모리(12)의 영역에 저장된 데이터를 제1메모리(11)로 로드할 수 있다. 프로세서(180)는 로드한 데이터에 기초하여 어플리케이션을 실행할 수 있다(S1040). 본 발명의 실시예에서 해당 어플리케이션을 실행한다는 것은, 백그라운드에서 실행되던 어플리케이션이 포어그라운드(foreground)로 전환되어 실행되는 것을 의미한다. 프로세서(180)는 비활성화 상태로 제2메모리(12)에 저장된 프로세스를 활성화 상태로 전환하고, 스케줄링 대상에서 추가하여 실행 상태로 동작하게 한다.

Claims (15)

  1. 전자장치에 있어서,
    제1메모리;
    제2메모리;
    어플리케이션의 복수의 프로세스를 상기 제1메모리에 로드하고,
    상기 제1메모리에 로드된 복수의 프로세스 중 비활성화 상태로 전환된 프로세스를 식별하고,
    상기 비활성화 상태로 전환된 프로세스의 데이터를 상기 제2메모리의 영역에 순차 액세스 방식으로 저장하고,
    상기 프로세스가 상기 비활성화 상태에서 활성화 상태로 복원되는 이벤트에 대응하여, 상기 제2메모리의 영역에 저장된 상기 프로세스의 데이터를 상기 제1메모리에 로드시키는
    프로세서를 포함하는 전자장치.
  2. 제1항에 있어서,
    상기 프로세서는,
    상기 제1메모리에 로드된 상기 어플리케이션의 복수의 프로세스 중 상기 비활성화 상태로 전환할 프로세스를 스케줄링 대상에서 제외시켜 상기 비활성화 상태로 전환하는 전자장치.
  3. 제1항에 있어서,
    상기 비활성화 상태로 전환된 프로세스는 제1프로세스이며, 상기 제2메모리의 영역은 상기 제2메모리의 제1영역이고,
    상기 프로세서는,
    상기 제1메모리에 로드되며 상기 비활성화 상태로 전환되지 않고, 상기 활성화 상태를 유지하는 어플리케이션의 제2프로세스의 데이터를 상기 제2메모리의 제2영역에 임의 액세스 방식으로 저장하는 전자장치.
  4. 제1항에 있어서,
    상기 프로세서는,
    상기 어플리케이션의 실행을 준비하는 이벤트에 기초하여 상기 어플리케이션의 복수의 프로세스를 상기 제1메모리에 로드하는 전자장치.
  5. 제4항에 있어서,
    상기 프로세서는,
    상기 제1메모리의 여유 메모리량, 상기 프로세서의 속도 또는 상기 프로세서의 평균 사용량 중 적어도 하나에 기초하여 상기 어플리케이션의 실행을 준비하는 이벤트가 발생한 것으로 식별하는 전자장치.
  6. 제1항에 있어서,
    인터페이스부를 포함하고,
    상기 프로세서는,
    상기 어플리케이션을 실행하는 사용자입력을 상기 인터페이스부를 통해 수신한 것에 기초하여 상기 이벤트가 발생한 것으로 식별하는 전자장치.
  7. 제1항에 있어서,
    상기 프로세서는,
    상기 이벤트에 대응하여, 상기 제2메모리의 영역에 데이터가 저장된 상기 프로세스를 스케줄링 대상에 추가하여 상기 활성화 상태로 복원하는 전자장치.
  8. 제1항에 있어서,
    상기 프로세서는,
    상기 이벤트에 대응하여 상기 제1메모리에 상기 어플리케이션의 복수의 프로세스가 존재하는지 여부를 식별하고,
    상기 복수의 프로세스 중 상기 제1메모리에 데이터가 존재하지 않는 프로세스에 기초하여, 상기 프로세스의 데이터가 저장된 상기 제2메모리의 영역을 식별하는 전자장치.
  9. 전자장치의 제어방법에 있어서,
    어플리케이션의 복수의 프로세스를 제1메모리에 로드하는 단계;
    상기 제1메모리에 로드된 복수의 프로세스 중 비활성화 상태로 전환된 프로세스를 식별하는 단계;
    상기 비활성화 상태로 전환된 프로세스의 데이터를 제2메모리의 영역에 순차 액세스 방식으로 저장하는 단계; 및
    상기 프로세스가 상기 비활성화 상태에서 활성화 상태로 복원되는 이벤트에 대응하여, 상기 제2메모리의 영역에 저장된 상기 프로세스의 데이터를 상기 제1메모리에 로드시키는 단계를 포함하는 것을 특징으로 하는 전자장치의 제어방법.
  10. 제9항에 있어서,
    상기 제1메모리에 로드된 상기 어플리케이션의 복수의 프로세스 중 상기 비활성화 상태로 전환할 프로세스를 스케줄링 대상에서 제외시켜 상기 비활성화 상태로 전환하는 단계를 포함하는 전자장치의 제어방법.
  11. 제9항에 있어서,
    상기 비활성화 상태로 전환된 프로세스는 제1프로세스이며, 상기 제2메모리의 영역은 상기 제2메모리의 제1영역이고,
    상기 제1메모리에 로드되며 상기 비활성화 상태로 전환되지 않고, 상기 활성화 상태를 유지하는 어플리케이션의 제2프로세스의 데이터를 상기 제2메모리의 제2영역에 임의 액세스 방식으로 저장하는 단계를 포함하는 전자장치의 제어방법.
  12. 제9항에 있어서,
    상기 어플리케이션의 복수의 프로세스를 제1메모리에 로드하는 단계는;
    상기 어플리케이션의 실행을 준비하는 이벤트에 기초하여 상기 어플리케이션의 복수의 프로세스를 상기 제1메모리에 로드하는 단계를 포함하는 전자장치의 제어방법.
  13. 제12항에 있어서,
    상기 제1메모리의 여유 메모리량, 상기 프로세서의 속도 또는 상기 프로세서의 평균 사용량 중 적어도 하나에 기초하여 상기 어플리케이션의 실행을 준비하는 이벤트가 발생한 것으로 식별하는 단계를 포함하는 전자장치의 제어방법.
  14. 제9항에 있어서,
    상기 어플리케이션을 실행하는 사용자입력을 인터페이스부를 통해 수신한 것에 기초하여 상기 이벤트가 발생한 것으로 식별하는 단계를 포함하는 전자장치의 제어방법.
  15. 제9항에 있어서,
    상기 이벤트에 대응하여, 상기 제2메모리의 영역에 데이터가 저장된 상기 프로세스를 스케줄링 대상에 추가하여 상기 활성화 상태로 복원하는 단계를 포함하는 전자장치의 제어방법.
PCT/KR2021/011982 2020-09-21 2021-09-06 전자장치 및 그 제어방법 WO2022059978A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/124,253 US20230236843A1 (en) 2020-09-21 2023-03-21 Electronic apparatus and control method thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2020-0121501 2020-09-21
KR1020200121501A KR20220038987A (ko) 2020-09-21 2020-09-21 전자장치 및 그 제어방법

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/124,253 Continuation US20230236843A1 (en) 2020-09-21 2023-03-21 Electronic apparatus and control method thereof

Publications (1)

Publication Number Publication Date
WO2022059978A1 true WO2022059978A1 (ko) 2022-03-24

Family

ID=80776282

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/011982 WO2022059978A1 (ko) 2020-09-21 2021-09-06 전자장치 및 그 제어방법

Country Status (3)

Country Link
US (1) US20230236843A1 (ko)
KR (1) KR20220038987A (ko)
WO (1) WO2022059978A1 (ko)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140144572A (ko) * 2013-06-11 2014-12-19 삼성전자주식회사 프로세스를 스케줄링하기 위한 방법 및 그 전자 장치
KR20160042398A (ko) * 2014-08-29 2016-04-19 시아오미 아이엔씨. 백그라운드 애플리케이션을 제어하기 위한 방법 및 장치
US20180039523A1 (en) * 2016-08-03 2018-02-08 Toshiba Memory Corporation Information processing system that determines a memory to store program data for a task carried out by a processing core
US20180225142A1 (en) * 2017-02-03 2018-08-09 Mohanish Chandrapalsingh PACHLORE Methods ad systems for hibernation of processes in computing devices
KR20180097674A (ko) * 2015-12-31 2018-08-31 후아웨이 테크놀러지 컴퍼니 리미티드 메모리 리클레임 방법 및 장치

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140144572A (ko) * 2013-06-11 2014-12-19 삼성전자주식회사 프로세스를 스케줄링하기 위한 방법 및 그 전자 장치
KR20160042398A (ko) * 2014-08-29 2016-04-19 시아오미 아이엔씨. 백그라운드 애플리케이션을 제어하기 위한 방법 및 장치
KR20180097674A (ko) * 2015-12-31 2018-08-31 후아웨이 테크놀러지 컴퍼니 리미티드 메모리 리클레임 방법 및 장치
US20180039523A1 (en) * 2016-08-03 2018-02-08 Toshiba Memory Corporation Information processing system that determines a memory to store program data for a task carried out by a processing core
US20180225142A1 (en) * 2017-02-03 2018-08-09 Mohanish Chandrapalsingh PACHLORE Methods ad systems for hibernation of processes in computing devices

Also Published As

Publication number Publication date
KR20220038987A (ko) 2022-03-29
US20230236843A1 (en) 2023-07-27

Similar Documents

Publication Publication Date Title
WO2019088802A1 (ko) 전자 장치 및 전자 장치 간 음성으로 기능을 실행하는 방법
WO2021096233A1 (en) Electronic apparatus and control method thereof
WO2020141952A1 (en) Conversational control system and method for registering external device
EP3906553A1 (en) Electronic device for providing graphic data based on voice and operating method thereof
WO2016111502A1 (en) System and method for transmitting information about task to external device
WO2020153766A1 (en) Method for displaying visual information associated with voice input and electronic device supporting the same
WO2022108192A1 (ko) 전자 장치 및 전자 장치의 멀티윈도우 제어방법
WO2017018705A1 (en) Image display apparatus and method of operating the same
WO2021080290A1 (en) Electronic apparatus and control method thereof
WO2021101276A1 (en) Electronic device for providing intelligent assistance service and operating method thereof
WO2022059978A1 (ko) 전자장치 및 그 제어방법
WO2022177162A1 (ko) 어플리케이션의 모델 파일을 초기화하는 프로세서 및 이를 포함하는 전자 장치
WO2022103019A1 (ko) 전자 장치 및 전자 장치의 어플리케이션 실행 방법
WO2021256760A1 (ko) 이동 가능한 전자장치 및 그 제어방법
WO2021153884A1 (en) Electronic device and operation method thereof
WO2023048424A1 (ko) 복수의 기기들을 제어하는 방법 및 장치
WO2022211245A1 (ko) 전자 장치 및 전자 장치에서 동적 조건으로 태스크를 수행하는 방법
WO2022124640A1 (ko) 전자장치 및 그 제어방법
WO2022114532A1 (ko) 전자장치 및 그 제어방법
WO2022092530A1 (ko) 전자장치 및 그 제어방법
WO2024063306A1 (ko) 전자 장치 및 전자 장치의 제어 방법
WO2024025194A1 (ko) 알림과 관련된 동작을 수행하기 위한 방법 및 이를 지원하는 전자 장치
WO2024111682A1 (ko) 인공지능 장치 및 그 제어 방법
WO2023013921A2 (ko) 어플리케이션의 실행 화면을 표시하기 위한 전자 장치, 그 동작 방법 및 저장 매체
WO2024117625A1 (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: 21869600

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: 21869600

Country of ref document: EP

Kind code of ref document: A1