WO2019039741A1 - 운영 체제의 운용 방법 및 이를 지원하는 전자 장치 - Google Patents

운영 체제의 운용 방법 및 이를 지원하는 전자 장치 Download PDF

Info

Publication number
WO2019039741A1
WO2019039741A1 PCT/KR2018/008162 KR2018008162W WO2019039741A1 WO 2019039741 A1 WO2019039741 A1 WO 2019039741A1 KR 2018008162 W KR2018008162 W KR 2018008162W WO 2019039741 A1 WO2019039741 A1 WO 2019039741A1
Authority
WO
WIPO (PCT)
Prior art keywords
resources
classes
cores
threads
volatile memory
Prior art date
Application number
PCT/KR2018/008162
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 삼성전자 주식회사
Priority to US16/641,177 priority Critical patent/US20200225992A1/en
Publication of WO2019039741A1 publication Critical patent/WO2019039741A1/ko

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/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
    • 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
    • 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
    • G06F9/4406Loading of operating system
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5018Thread allocation

Definitions

  • the embodiments disclosed herein relate to the operating technology of the operating system.
  • processors are not only improving the processing speed of data but also improving the ability to process a plurality of tasks (or processes) at the same time.
  • Processors have evolved from single-core processors to multi-core processors in recent years. That is, recently, in a method of parallel processing of an application program using a thread, a plurality of cores of a multicore processor in a time division multiplexing type thread processing of a single- And the like.
  • An electronic device using the Android operating system preloads a Java class and resources to be used in a user process of an application program during a booting process of the zygote process.
  • the Xigot process preloads Java classes and resources with a single thread
  • Java classes and resources are forced to be preloaded sequentially.
  • the execution of many processes will inevitably lower the chances of a jigot process being allocated to the core through scheduling. As a result, the existing Android operating system may take longer to boot.
  • the embodiments disclosed in this document can provide a method of operating an operating system capable of preloading Java classes and resources in a multi-threaded manner and an electronic device supporting the same.
  • An electronic device includes a display, a communication circuit, a display, and a processor electrically connected to the communication circuit, the processor including a plurality of cores, a volatile memory electrically connected to the processor, Volatile memory, wherein the non-volatile memory is configured to store at least one application program, and wherein the processor, when executed, causes the processor to: store the at least one application program in the non-volatile memory , Instructions to perform a process of preloading shared classes and / or resources of an operating system, and wherein the performing of the process comprises sending a plurality of groups of classes and / Doing more than one of two cores Operations, and using the two or more cores, the class and / or multiple groups of resources in parallel, which may include the operation of the preload in the volatile memory.
  • an electronic device includes a processor including a plurality of cores, a volatile memory electrically coupled to the processor, and a processor coupled to the processor and configured to store at least one application program Volatile memory, wherein the non-volatile memory is configured to, at run time, cause the processor to execute a process for preloading at least one of the classes and resources of the at least one application program in the volatile memory
  • Instructions for executing the process include generating a plurality of threads for the process, allocating the threads to two or more cores of the cores, and allocating the threads to the two or more cores Using these threads, It may include the operation of ever executed.
  • a method of operating an operating system of an electronic device having a process including a plurality of cores may include at least one of classes and resources of at least one application program stored in a nonvolatile memory To a volatile memory, wherein the act of executing the process further comprises: generating a plurality of threads for the process; assigning the threads to two or more cores of the cores, And using the two or more cores to execute the threads in parallel.
  • the electronic device since the electronic device operates the multithreaded process of the gigogot process, the Java classes and the resources can be preloaded in parallel or in series, and the time taken to boot can be shortened.
  • the chi-goth process is more likely to be allocated to the core, and the boot time can be shortened.
  • FIG. 1 is a block diagram of an electronic device in a network environment in accordance with various embodiments.
  • FIG. 2 is a diagram for explaining a configuration of an electronic device associated with the operation of an operating system according to an embodiment.
  • FIG. 3 is a diagram illustrating a method of operating an electronic device associated with operation of an operating system according to an embodiment.
  • FIG. 4 is a diagram for explaining a task allocation state per core according to an operation of an operating system according to an embodiment.
  • FIG. 1 is a block diagram of an electronic device 101 in a network environment 100, in accordance with various embodiments.
  • an electronic device 101 in a network environment 100 communicates with an electronic device 102 via a first network 198 (e.g., near-field wireless communication) or a second network 199 (E. G., Remote wireless communication).
  • a first network 198 e.g., near-field wireless communication
  • a second network 199 E. G., Remote wireless communication
  • ≪ / RTI &gt the electronic device 101 is capable of communicating with the electronic device 104 through the server 108.
  • the electronic device 101 includes a processor 120, a memory 130, an input device 150, an audio output device 155, a display device 160, an audio module 170, a sensor module 176, an interface 177, a haptic module 179, a camera module 180, a power management module 188, a battery 189, a communication module 190, a subscriber identity module 196, and an antenna module 197 ).
  • at least one (e.g., display 160 or camera module 180) of these components may be omitted from the electronic device 101, or other components may be added.
  • some components such as, for example, a sensor module 176 (e.g., a fingerprint sensor, an iris sensor, or an illuminance sensor) embedded in a display device 160 Can be integrated.
  • Processor 120 may be configured to operate at least one other component (e.g., hardware or software component) of electronic device 101 connected to processor 120 by driving software, e.g., And can perform various data processing and arithmetic operations.
  • Processor 120 loads and processes commands or data received from other components (e.g., sensor module 176 or communication module 190) into volatile memory 132 and processes the resulting data into nonvolatile memory 134.
  • the processor 120 may operate in conjunction with a main processor 121 (e.g., a central processing unit or an application processor) and, independently, or additionally or alternatively, Or a co-processor 123 (e.g., a graphics processing unit, an image signal processor, a sensor hub processor, or a communications processor) specific to the designated function.
  • a main processor 121 e.g., a central processing unit or an application processor
  • a co-processor 123 e.g., a graphics processing unit, an image signal processor, a sensor hub processor, or a communications processor
  • the coprocessor 123 may be operated separately from or embedded in the main processor 121.
  • the coprocessor 123 may be used in place of the main processor 121, for example, while the main processor 121 is in an inactive (e.g., sleep) state, At least one component (e.g., display 160, sensor module 176, or communications module 176) of the components of electronic device 101 (e.g., 190) associated with the function or states.
  • the coprocessor 123 e.g., an image signal processor or communications processor
  • the coprocessor 123 is implemented as a component of some other functionally related component (e.g., camera module 180 or communication module 190) .
  • Memory 130 may store various data used by at least one component (e.g., processor 120 or sensor module 176) of electronic device 101, e.g., software (e.g., program 140) ), And input data or output data for the associated command.
  • the memory 130 may include a volatile memory 132 or a non-volatile memory 134.
  • the program 140 may be software stored in the memory 130 and may include, for example, an operating system 142, a middleware 144,
  • the input device 150 is an apparatus for receiving a command or data to be used for a component (e.g., processor 120) of the electronic device 101 from the outside (e.g., a user) of the electronic device 101,
  • a component e.g., processor 120
  • a microphone, a mouse, or a keyboard may be included.
  • the sound output device 155 is a device for outputting a sound signal to the outside of the electronic device 101.
  • the sound output device 155 may be a speaker for general use such as a multimedia reproduction or a sound reproduction, .
  • the receiver may be formed integrally or separately with the speaker.
  • Display device 160 may be an apparatus for visually providing information to a user of electronic device 101 and may include, for example, a display, a hologram device, or a projector and control circuitry for controlling the projector. According to one embodiment, the display device 160 may include a touch sensor or a pressure sensor capable of measuring the intensity of the pressure on the touch.
  • the audio module 170 is capable of bi-directionally converting sound and electrical signals. According to one embodiment, the audio module 170 may acquire sound through the input device 150, or may be connected to the audio output device 155, or to an external electronic device (e.g., Electronic device 102 (e.g., a speaker or headphone)).
  • an external electronic device e.g., Electronic device 102 (e.g., a speaker or headphone)
  • the sensor module 176 may generate an electrical signal or data value corresponding to an internal operating state (e.g., power or temperature) of the electronic device 101, or an external environmental condition.
  • the sensor module 176 may be a gesture sensor, a gyro sensor, a barometric sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an infrared sensor, Or an illuminance sensor.
  • the interface 177 may support a designated protocol that may be wired or wirelessly connected to an external electronic device (e.g., the electronic device 102).
  • the interface 177 may include 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 interface
  • audio interface an audio interface
  • the connection terminal 178 may be a connector such as an HDMI connector, a USB connector, an SD card connector, or an audio connector that can physically connect the electronic device 101 and an external electronic device (e.g., the electronic device 102) (E.g., a headphone connector).
  • an HDMI connector such as an HDMI connector, a USB connector, an SD card connector, or an audio connector that can physically connect the electronic device 101 and an external electronic device (e.g., the electronic device 102) (E.g., a headphone connector).
  • the haptic module 179 may convert electrical signals into mechanical stimuli (e.g., vibrations or movements) or electrical stimuli that the user may perceive through tactile or kinesthetic sensations.
  • the haptic module 179 may include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
  • the camera module 180 can capture a still image and a moving image.
  • the camera module 180 may include one or more lenses, an image sensor, an image signal processor, or a flash.
  • the power management module 188 is a module for managing the power supplied to the electronic device 101, and may be configured as at least a part of, for example, a power management integrated circuit (PMIC).
  • PMIC power management integrated circuit
  • the battery 189 is an apparatus for supplying power to at least one component of the electronic device 101 and may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.
  • the communication module 190 is responsible for establishing a wired or wireless communication channel between the electronic device 101 and an external electronic device (e.g., electronic device 102, electronic device 104, or server 108) Lt; / RTI > Communication module 190 may include one or more communication processors that support wired communication or wireless communication, operating independently of processor 120 (e.g., an application processor).
  • the communication module 190 may include a wireless communication module 192 (e.g., 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 (E.g., a local area network (LAN) communication module, or a power line communication module), and the corresponding communication module may be used to communicate with a first network 198 (e.g., Bluetooth, WiFi direct, Communication network) or a second network 199 (e.g., a telecommunications network such as a cellular network, the Internet, or a computer network (e.g., a LAN or WAN)).
  • a wireless communication module 192 e.g., a cellular communication module, a short range wireless communication module, or a global navigation satellite system (GNSS) communication module
  • GNSS global navigation satellite system
  • wired communication module 194 E.g., a local area network (LAN) communication module, or a power line communication module
  • the wireless communication module 192 may use the user information stored in the subscriber identification module 196 to identify and authenticate the electronic device 101 within the communication network.
  • the antenna module 197 may include one or more antennas for externally transmitting or receiving signals or power.
  • the communication module 190 e.g., the wireless communication module 192 may transmit or receive signals to or from an external electronic device via an antenna suitable for the communication scheme.
  • Some of the components are connected to each other via a communication method (e.g., bus, general purpose input / output (GPIO), serial peripheral interface (SPI), or mobile industry processor interface (MIPI) (Such as commands or data) can be exchanged between each other.
  • a communication method e.g., bus, general purpose input / output (GPIO), serial peripheral interface (SPI), or mobile industry processor interface (MIPI) (Such as commands or data) can be exchanged between each other.
  • the command or data may be transmitted or received between the electronic device 101 and the external electronic device 104 via the server 108 connected to the second network 199.
  • Each of the electronic devices 102 and 104 may be the same or a different kind of device as the electronic device 101.
  • all or a portion of the operations performed in the electronic device 101 may be performed in another or a plurality of external electronic devices.
  • the electronic device 101 in the event that the electronic device 101 has to perform some function or service automatically or upon request, the electronic device 101 may be capable of executing the function or service itself, And may request the external electronic device to perform at least some functions associated therewith.
  • the external electronic device receiving the request can execute the requested function or additional function and transmit the result to the electronic device 101.
  • the electronic device 101 can directly or additionally process the received result to provide the requested function or service.
  • cloud computing, distributed computing, or client-server computing technology may be used.
  • FIG. 2 is a diagram for explaining a configuration of an electronic device associated with the operation of an operating system according to an embodiment.
  • the processor 120 may include a plurality of cores. Although processor 120 depicts a state including a first core 125, a second core 126, a third core 127 and a fourth core 128 in the diagram shown, At least one of the cores described above may be omitted, or at least one other core may be further included.
  • first core 125, second core 126, third core 127, or fourth core 128) may have the same performance, or may have different capabilities have.
  • a plurality of cores having different performances may mean cores operating at different clock frequencies.
  • a process can be allocated to a core according to resources required for each process. For example, a process that requires a relatively large amount of resources and a process that requires a relatively small amount of resources should be allocated according to the performance of the core or the process occupancy state of the core.
  • a process may mean a part of an application program or an entire application program.
  • the performance of the core may imply the ability to process the process. That is, as the number of resources required to process one and the same process is larger, the core has a lower performance. The smaller the resources required to process one same process, the higher the performance.
  • At least one of the above-mentioned cores may be a core that manages threads of processes and processes that are assigned to cores.
  • the first core 125 may be a process that is assigned to another core (e.g., a second core 126, a third core 127, or a fourth core 128) And a scheduler 125a that manages threads.
  • the first core 125 may further include an error checking module 125b for monitoring threads of a process for each core.
  • the scheduler 125a may specify a core to process the process, for example, depending on the type of process.
  • the scheduler 125a may designate a jiggo process to be processable on all cores, and one of the other processes other than the jiecoat process may be designated such that processes of relatively low importance can be processed only on the limited cores . That is, the scheduler 125a may allow other processes other than the jiggot process to be allocated only to limited cores (e.g., CPU affinity setting), thereby allowing the jiggot process to receive more scheduling.
  • limited cores e.g., CPU affinity setting
  • the scheduler 125a may allocate the number of threads for the process to the cores (e.g., the first core 125, the second core 126, the third core 127, or the fourth core 128 ) ≪ / RTI > In one example, the scheduler 125a may determine that the number of threads corresponds to half the total number of cores, if the cores have the same processing capability (e.g., in the case of symmetric multiprocessing (SMP)).
  • SMP symmetric multiprocessing
  • the scheduler 125a may be configured such that the threads correspond to the number of high performance cores (e.g., big cores) if the cores have different processing capabilities (e.g., for heterogeneous multiprocessing (HMP) Can be determined.
  • high performance cores e.g., big cores
  • HMP heterogeneous multiprocessing
  • the scheduler 125a may allocate the threads of the process to the cores. For example, the scheduler 125a may allocate threads of the process to cores designated to process the process. In this case, the scheduler 125a may allocate threads to the cores, taking into account the connectivity (or dependency) of the function or routine to process through the thread.
  • threads of a process allocated per core can be performed. Threads executed per core may be monitored by the error checking module 125b. The error checking module 125b checks the execution time for each core and the thread, and when information on the execution time of the thread exceeds a specified time, information (for example, a function to process through the thread) about the thread is stored in the memory 130 Can be recorded. Also, the error checking module 125b may terminate the thread whose execution time exceeds the specified time, and restart the process. In this case, the scheduler 125a may schedule the function causing the problem (the function for processing through the thread whose execution time exceeds the specified time) to be processed after execution of the other functions. In some embodiments, the scheduler 125a may operate the process as a single thread if the execution time of the thread exceeds the specified time.
  • the error checking module 125b may store the execution history information of the process in the memory 130 when the execution of all the processes is completed.
  • the error checking module 125b may store in the memory 130 the preload history information 139 for the Java classes and resources of the jiggo process in relation to booting.
  • the process preload history information 139 can be used by the scheduler 125a at the next boot time to schedule processes and threads of the process.
  • the scheduler 125a may check the execution time for each core and each thread in the process preload history information 139, reduce the number of Java classes or resources to be preloaded for a thread having a long execution time, A short thread can increase the number of Java classes or resources to preload.
  • the error checking module 125b may store in the memory 130 error information for Java classes or resources that were attempting to preload through the thread for threads whose execution time has exceeded a specified amount of time have.
  • the scheduler 125a checks the error information stored in the memory 130 at the next booting, and after the corresponding Java classes or resources are preloaded (or other Java classes or resources) Before the preload of resources is performed).
  • the error information may include, for example, information about Java classes or resources to be preloaded after preloading of other Java classes or resources (or before preloading of other Java classes or resources is performed) (E.g., post preload information 137).
  • the post-preload information 137 may be stored in the memory 130 as default. Also, if the firmware is updated via a firmware over the air (FOTA), the post-preload information 137 may be changed.
  • FOTA firmware over the air
  • a jigot process in an electronic device to which an Android operating system is applied, can be started after an init process is started during a boot process. That is, the jiggo process is initiated by the inet process and can initialize the dalvik virtual machine. Thereafter, various Java components in the application framework are executed under the control of the Dalvik virtual machine, in which the system servers may be the first Java components to be executed in the system.
  • the gigort process can preload the Java classes and resources to be used in the application's user process.
  • a jigot process can read a list of Java classes to preload from a specified file (eg / system / etc / preloaded-classes).
  • a gigort process can also read a list of resources to preload. Thereafter, the gigort process can preload Java classes and resources, respectively, based on the Java class list and the resource list.
  • a jigot process may preload Java classes and resources in parallel via multi-threading.
  • the Xigot process preloads the Java class via multi-threading, and if the Java class is all preloaded, it can preload the resources via multi-threading. That is, the resources can be preloaded after all the Java classes are preloaded.
  • the scheduler 125a may allocate threads to the cores.
  • the scheduler 125a may be configured to only create a multi-thread for a jiggot process associated with booting, that is, a jiggot process that is directly related to booting when there are a plurality of jiggot processes, You can do this by assigning a thread.
  • the error checking module 125b may terminate the thread and restart the corresponding jigot process if any one of the threads of the jigot process is performed beyond a specified time.
  • the scheduler 125a may be configured so that the function causing the problem, that is, the Java class and resource to be preloaded through the thread whose execution time exceeds the specified time, can be preloaded after other Java classes and resources are preloaded Scheduling.
  • the scheduler 125a may operate as a single thread for a given jiggo process.
  • the error checking module 125b may store the preload history information 139 of the jiggot process in the memory 130 when the execution of all the jigot processes is completed and the booting operation is terminated.
  • the process preload history information 139 may include, for example, execution time information of each thread of the jigot process and information about a Java class (or resources) preloaded through the thread.
  • the scheduler 125a when booting is started, generates multithreading for the jiggot process and allocation of the generated multithread, etc. based on the process preload history information 139 stored in the memory 130 You can decide.
  • an electronic device may include a display (e.g., display 160), a communication circuit (e.g., communication module 190) (E. G., Volatile memory 132) electrically coupled to the processor, such as processor (e.
  • Processor 120 electrically coupled to the communication circuitry and including a plurality of cores, Volatile memory (134), wherein the non-volatile memory is configured to store at least one application program, wherein, at run time, the processor is configured to, for the at least one application program, Storing instructions in a non-volatile memory to perform a process of preloading shared classes and / or resources of an operating system,
  • the act of performing a process may include assigning a plurality of groups of classes and / or resources to two or more of the cores, and using the two or more cores, And preloading a plurality of groups of resources in parallel to the volatile memory.
  • the act of performing the process further comprises: if the operation of preloading the multiple groups of classes and / or resources is not completed within a selected time range, or if an error occurs,
  • the method may further include sequentially preloading a plurality of groups of resources.
  • the operating system is an Android operating system
  • the process may be a jiggot process.
  • the act of assigning multiple groups of classes and / or resources may further include providing multiple lists of classes and / or resources for preloading.
  • the method may further include selecting the two or more cores prior to assigning the plurality of groups.
  • the act of assigning the groups and / or the multiple groups of resources may include assigning classes and / or resources to the classes and / or resources based at least in part on the sizes or dependencies of the classes and / Grouping operations.
  • the jigot process includes a jigot main method that includes a preload method, wherein the preload method further comprises grouping a plurality of groups of classes and / or resources into the two or more cores And using the two or more cores to preload the plurality of groups of classes and / or resources in parallel to the volatile memory.
  • an electronic device may include a processor (e.g., processor 120) including a plurality of cores, a volatile memory (e.g., Volatile memory (e.g., non-volatile memory 132) that is electrically coupled to the processor and that stores at least one application program,
  • the instructions for causing the processor to execute a process for preloading at least one of the classes and resources of the at least one application program in the volatile memory Generating a plurality of threads for at least two of the cores, Using the operations, and the two or more cores for assigning can comprise operations to execute the threads in parallel.
  • the operation of creating threads may further comprise determining the number of threads based on at least one of the number of cores and the capabilities of the cores.
  • the act of creating the threads may include generating the threads based on at least one of the size of each of the classes and resources, and the dependencies between the classes and resources have.
  • the act of executing the process further comprises re-executing the process if the execution time of any one of the threads exceeds a specified time, May comprise running the process sequentially through one thread.
  • the act of executing the process further comprises: when the execution time of any one of the threads exceeds a specified time, at least one of the classes and resources to preload through the thread To the non-volatile memory.
  • the act of executing the process includes determining whether to execute the processes sequentially or in parallel, based on information about at least one of the classes and the resources stored in the non-volatile memory And may further include an operation of judging.
  • the non-volatile memory further stores instructions that, when executed, cause the processor to execute a process different from the process, and the act of executing the other process comprises: And executing the other process using at least one core other than the at least one core.
  • FIG. 3 is a diagram illustrating a method of operating an electronic device associated with operation of an operating system according to an embodiment.
  • processor 120 of electronic device 101 may determine, at operation 310, whether the preload function of the process at boot time is parallel executable.
  • the scheduler 125a of the processor 120 may determine whether the preload of Java classes and resources of the jigot process is executable in parallel.
  • the scheduler 125a can check whether there is error information generated during the initial booting through the process preload history information 139 stored in the memory 130. [ The scheduler 125a may determine that the preload function of the jiggo process is not executable in parallel if there is error information generated during the initial boot.
  • the scheduler 125a may sequentially execute the preload function of the jiggo process in operation 320 when the preload function of the jigot process is not executable in parallel due to an error occurring at the time of the initial boot. For example, the scheduler 125a may operate the jiggo process as a single thread. If the preload capability of the Xigot process is not feasible in parallel, for example, if a new Java class is updated via a firmware over the air (FOTA) A case where a integrity problem related to firmware is generated due to a hacking operation, and the like.
  • FOTA firmware over the air
  • the scheduler 125a may generate a plurality of threads for the jiggo process at operation 330, if the preload capability of the jiggo process is enabled in parallel. According to one embodiment, the scheduler 125a schedules the number of threads for the jiggo process to the number of threads in the core (e.g., first core 125, second core 126, third core 127, (128)).
  • the core e.g., first core 125, second core 126, third core 127, (128)
  • the scheduler 125a may determine the number of threads to be a half of the total number of cores, and if the cores have different processing capabilities, The number can be determined to correspond to the number of high performance cores. Also, the scheduler 125a can confirm the execution time of each thread of the jigot process and the data (e.g., Java class or resources) preloaded through each thread through the process preload history information 139, The number of Java classes or resources to be preloaded through the thread can be determined based on the execution time of each thread.
  • the data e.g., Java class or resources
  • the scheduler 125a may reduce the number of Java classes or resources to be preloaded for a thread that has the longest execution time within a designated time that can be determined as an execution error of the thread, The number of Java classes or resources to be preloaded can be increased. That is, the scheduler 125a redistributes the classes or resources allocated to the thread to the corresponding thread when the execution time is within the designated time (reference time for judging execution error of the thread) can do.
  • the scheduler 125a may allocate threads per core. As an example, the scheduler 125a may allocate threads in the jigot process to all cores. As another example, the scheduler 125a may allocate only processes other than the jiggo process to the limited cores.
  • the scheduler 125a may be operable to retrieve a Java class or resources that were attempting to be preloaded through a thread that caused the error at the previous boot (e.g., a thread whose execution time has exceeded a specified time) And can be preloaded after the resources are preloaded.
  • the scheduler 125a may specify an order such that a thread for preloading a corresponding Java class or resources may be allocated to a core after a thread for preloading other Java classes or resources is performed.
  • the scheduler 125a may allocate threads to cores, taking into account the connectivity (or dependencies) of the Java classes or resources to be preloaded through the threads of the jiggo process. For example, the scheduler 125a may specify the order of the threads so that the thread for preloading the Java class may be performed prior to the thread for preloading the resources. As another example, the scheduler 125a may allocate to a core a thread for preloading Java classes or resources that have dependencies. As another example, the scheduler 125a may execute a dependency of a Java class or threads for preloading resources after a thread for preloading Java classes or resources that have no dependency. The dependency of the Java class or resources can be ascertained, for example, through testing.
  • the scheduler 125a may allocate threads to cores, taking into account the size (amount of data) of the Java classes or resources to be preloaded through the threads of the jiggo process. For example, the scheduler 125a may allocate a Java class having a relatively large size (or an amount of data) or a thread for preloading resources to a core having a relatively high performance. In another example, the scheduler 125a may classify a Java class or resources into units of a predetermined size, and allocate a thread for preloading a Java class or resources on a group basis to each core.
  • the memory 130 may store post preload information 137, such as information about Java classes or resources to be preloaded after the preloading of other Java classes is complete have.
  • memory 130 may store information about the connectivity (or dependencies) for Java classes or resources.
  • the scheduler 125a may receive information (e.g., post-preload information 137) about the connectivity (or dependency) for the Java classes from the memory 130 to specify the preload order of the Java classes have.
  • the memory 130 may store only a list of Java classes that should be preloaded with priority. In this case, the scheduler 125a may preferentially assign Java classes to be preloaded to the core using multi-thread.
  • each of the cores e.g., first core 125, second core 126, third core 127, or fourth core 128, of processor 120 performs the assigned threads can do. Threads executed per core may be monitored by the error checking module 125b.
  • the error checking module 125b may determine whether an error has occurred during execution of each thread. According to one embodiment, the error checking module 125b may check the execution time of each core and each thread, and may determine that a thread execution error has occurred when the execution time of the thread exceeds a specified time. According to one embodiment, the error checking module 125b may store, in the memory 130, information about Java classes or resources that were to be preloaded through the thread for the thread that caused the execution error. In this case, the scheduler 125a confirms information about the Java classes or resources stored in the memory 130 at the next boot time, and after the Java classes or resources are preloaded with other Java classes and resources It can be stored and managed in the post preload information 137 so as to be preloaded.
  • the error checking module 125b does not generate a thread execution error, and when execution of all the threads of the jigot processes is completed, the thread execution history information (e.g., process preload history information 139) And can be stored in the memory 130.
  • the error checking module 125b may store execution time information of each thread and information about a Java class (or resources) preloaded through each thread in the memory 130.
  • the error checking module 125b may perform error handling. According to one embodiment, the error checking module 125b may terminate the faulted thread. According to another embodiment, the error checking module 125b may store in the memory 130 information about the thread in error, such as a Java class (or resources) to preload via a thread.
  • the scheduler 125a may, in operation 320, sequentially execute the preload function of the jiggo process. For example, the scheduler 125a may operate the jiggo process as a single thread.
  • the preload operation of the above-described jiggo process can be implemented through a preload method (e.g., preload ()).
  • a preload method e.g., preload ()
  • Table 1 below shows some of the main methods (eg main ()) of the gygo process.
  • the preload method may include grouping Java classes and resources into a plurality of groups and assigning them to the cores.
  • the preload method may include using the cores to preload the groups in parallel.
  • a method of operating an operating system of an electronic device having a processor (e.g., processor 120) comprising a plurality of cores
  • the method comprising: executing a process for preloading at least one of classes and resources of at least one application program stored in a memory into a volatile memory, wherein the act of executing the process comprises: Assigning the threads to two or more of the cores, and executing the threads in parallel using the two or more cores.
  • the operation of creating threads may further comprise determining the number of threads based on at least one of the number of cores and the capabilities of the cores.
  • the act of creating the threads may include generating the threads based on at least one of the size of each of the classes and resources, and the dependencies between the classes and resources have.
  • the act of executing the process further comprises re-executing the process if the execution time of any one of the threads exceeds a specified time, May comprise running the process sequentially through one thread.
  • the act of executing the process further comprises: when the execution time of any one of the threads exceeds a specified time, at least one of the classes and resources to preload through the thread Volatile memory and information on at least one of the classes and the resources stored in the non-volatile memory, wherein the processes are executed sequentially or in parallel And may further include an operation of judging.
  • an operating method of an operating system further includes an operation of executing a process different from the process, and the operation of executing the other process is performed by selecting at least one of the cores And using the core to execute the other process.
  • FIG. 4 is a diagram for explaining a task allocation state per core according to an operation of an operating system according to an embodiment.
  • the processor 120 of the electronic device 101 includes a plurality of cores (e.g., a first core 411, a second core 412, a third core 413, a fourth core 414, ), A fifth core 415, a sixth core 416, a seventh core 417, or an eighth core 418).
  • a plurality of cores e.g., a first core 411, a second core 412, a third core 413, a fourth core 414, ), A fifth core 415, a sixth core 416, a seventh core 417, or an eighth core 418).
  • the boot time can be shortened if the core to process the process is limited.
  • the top graph of FIG. 4 shows the assignment status of the task (or process) for each core when the core to process the process is not defined
  • the bottom graph of FIG. 4 shows the processing of the remaining processes excluding the jiggot process 431 (For example, a low performance core (or a little core)), it indicates the allocation state of the task for each core.
  • the jigot process 431 is performed on all cores, while other processes (e.g., the first process 432, the second process 433, the third process 434, The fourth process 435, the fifth process 436, the sixth process 437, and the seventh process 438) are executed only on the limited core.
  • the execution completion time of the jigot process 431 is shortened, and as a result, the boot time can be shortened Can be confirmed.
  • FIG. 5 shows a flowchart of an operating system operating method according to an embodiment.
  • a processor may include at least one class of at least one application program stored in a non-volatile memory (e.g., non-volatile memory 134 of Figure 1)
  • a process for preloading at least one of the resources to a volatile memory e.g., volatile memory 132 of FIG. 1).
  • the process may be, for example, a xyco process.
  • the processor 120 may generate a plurality of threads for a process to be executed.
  • the processor 120 may allocate a plurality of threads to two or more cores.
  • the processor 120 may execute a plurality of threads in parallel using two or more cores.
  • An electronic device can be various types of devices.
  • the electronic device can include, for example, at least one of a portable communication device (e.g., a smart phone), a computer device, a portable multimedia device, a portable medical device, a camera, a wearable device, or a home appliance.
  • a portable communication device e.g., a smart phone
  • a computer device e.g., a laptop, a desktop, a smart phone
  • portable multimedia device e.g., a portable multimedia device
  • portable medical device e.g., a portable medical device
  • camera e.g., a camera
  • a wearable device e.g., a smart watch
  • a home appliance e.g., a smart bracelet
  • first component is "(functionally or communicatively) connected” or “connected” to another (second) component, May be connected directly to the component, or may be connected through another component (e.g., a third component).
  • module includes units comprised of hardware, software, or firmware and may be used interchangeably with terms such as, for example, logic, logic blocks, components, or circuits.
  • a module may be an integrally constructed component or a minimum unit or part thereof that performs one or more functions.
  • the module may be configured as an application-specific integrated circuit (ASIC).
  • ASIC application-specific integrated circuit
  • Various embodiments of the present document may include instructions stored on a machine-readable storage medium (e.g., internal memory 136 or external memory 138) readable by a machine (e.g., a computer) Software (e.g., program 140).
  • the device may include an electronic device (e.g., electronic device 101) in accordance with the disclosed embodiments as an apparatus that is operable to invoke stored instructions from the storage medium and act upon the called instructions.
  • the instruction When the instruction is executed by a processor (e.g., processor 120), the processor may perform the function corresponding to the instruction, either directly or using other components under the control of the processor.
  • the instructions may include code generated or executed by the compiler or interpreter.
  • a device-readable storage medium may be provided in the form of a non-transitory storage medium.
  • 'non-temporary' means that the storage medium does not include a signal and is tangible, but does not distinguish whether data is stored semi-permanently or temporarily on the storage medium.
  • a method according to various embodiments disclosed herein may be provided in a computer program product.
  • a computer program product can be traded between a seller and a buyer as a product.
  • a computer program product may be distributed in the form of a machine readable storage medium (eg, compact disc read only memory (CD-ROM)) or distributed online through an application store (eg PlayStore TM ).
  • an application store eg PlayStore TM
  • at least a portion of the computer program product may be temporarily stored, or temporarily created, on a storage medium such as a manufacturer's server, a server of an application store, or a memory of a relay server.
  • Each of the components may be comprised of a single entity or a plurality of entities, and some subcomponents of the aforementioned subcomponents may be omitted, or other subcomponents may be various May be further included in the embodiment.
  • some components e.g., modules or programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

전자 장치에 있어서, 디스플레이, 통신 회로, 상기 디스플레이 및 상기 통신 회로와 전기적으로 연결되고, 복수 개의 코어들을 포함하는 프로세서, 상기 프로세서와 전기적으로 연결된 휘발성 메모리, 및 상기 프로세서와 전기적으로 연결된 비휘발성 메모리를 포함하고, 상기 비휘발성 메모리는 적어도 하나의 어플리케이션 프로그램을 저장하도록 구성되고, 실행 시에, 상기 프로세서가, 상기 적어도 하나의 어플리케이션 프로그램을 위하여, 상기 비휘발성 메모리에, 운영 체제의 공유된 클래스들 및/또는 리소스들을 프리로드하는 프로세스를 수행하도록 하는 인스트럭션들을 저장하고, 상기 프로세스를 수행하는 동작은, 상기 클래스들 및/또는 리소스들의 다수의 그룹들을, 상기 코어들 중 두 개 이상의 코어들에 할당하는 동작, 및 상기 두 개 이상의 코어들을 이용하여, 상기 클래스들 및/또는 리소스들의 다수의 그룹들을 병렬적으로 상기 휘발성 메모리에 프리로드하는 동작을 포함하는 것을 특징으로 하는 전자 장치가 개시된다. 이 외에도 명세서를 통해 파악되는 다양한 실시 예가 가능하다.

Description

운영 체제의 운용 방법 및 이를 지원하는 전자 장치
본 문서에서 개시되는 실시 예들은 운영 체제의 운용 기술과 관련된다.
최근 모바일 전자 장치의 사용이 급증함에 따라, 전자 장치의 성능 향상에 대한 요구가 높아지고 있다. 예를 들어, 전자 장치의 사용자는 전자 장치의 전원 버튼을 눌렀을 때 전자 장치의 부팅이 완료되어 사용 가능하기까지의 시간이 단축되기를 기대하고 있다.
한편, 전자 장치가 점점 고도화되면서, 프로세서의 성능 또한 향상되고 있다. 일 예로, 프로세서는 데이터의 처리 속도가 향상되고 있을 뿐만 아니라 복수의 태스크(task)(또는 프로세스)를 동시에 처리할 수 있는 능력도 향상되고 있다. 프로세서는 최근 들어, 싱글 코어 프로세서에서 멀티 코어 프로세서로 진화하고 있다. 즉, 최근에는 스레드(thread)를 이용하여 응용 프로그램을 병렬처리 하는 방법에 있어서도, 싱글 코어 프로세서의 시간 분할 멀티플렉싱(time division multiplexing) 방식의 스레드 프로세싱에서 멀티 코어 프로세서의 복수의 코어들이 병렬로 멀티 스레드를 프로세싱하는 방식으로 변화되고 있다.
안드로이드 운영 체제를 적용한 전자 장치는, 부팅 중 자이고트 프로세스(zygote process)가 응용 프로그램의 사용자 프로세스(user process)에서 사용할 자바 클래스(java class)와 리소스(resource)들을 프리로드(preload)하게 된다. 그러나, 자이고트 프로세스는 싱글 스레드로 자바 클래스와 리소스들을 프리로드하기 때문에, 자바 클래스와 리소스들이 순차적으로 프리로드될 수밖에 없다. 또한, 부팅 중에는 많은 프로세스들의 수행으로 인해서 자이고트 프로세스가 스케줄링을 통해 코어에 할당될 확률이 낮아질 수 밖에 없다. 결과적으로 기존의 안드로이드 운용 체제에서는 부팅 시간이 길어질 수 있다.
본 문서에 개시되는 실시 예들은, 자이고트 프로세스가 멀티 스레드로 자바 클래스와 리소스들을 프리로드할 수 있는 운영 체제의 운용 방법 및 이를 지원하는 전자 장치를 제공할 수 있다.
본 문서에 개시되는 일 실시 예에 따른 전자 장치는, 디스플레이, 통신 회로, 상기 디스플레이 및 상기 통신 회로와 전기적으로 연결되고, 복수 개의 코어들을 포함하는 프로세서, 상기 프로세서와 전기적으로 연결된 휘발성 메모리, 및 상기 프로세서와 전기적으로 연결된 비휘발성 메모리를 포함하고, 상기 비휘발성 메모리는 적어도 하나의 어플리케이션 프로그램을 저장하도록 구성되고, 실행 시에, 상기 프로세서가, 상기 적어도 하나의 어플리케이션 프로그램을 위하여, 상기 비휘발성 메모리에, 운영 체제의 공유된 클래스들 및/또는 리소스들을 프리로드하는 프로세스를 수행하도록 하는 인스트럭션들을 저장하고, 상기 프로세스를 수행하는 동작은, 상기 클래스들 및/또는 리소스들의 다수의 그룹들을, 상기 코어들 중 두 개 이상의 코어들에 할당하는 동작, 및 상기 두 개 이상의 코어들을 이용하여, 상기 클래스들 및/또는 리소스들의 다수의 그룹들을 병렬적으로 상기 휘발성 메모리에 프리로드하는 동작을 포함할 수 있다.
또한, 본 문서에 개시되는 일 실시 예에 따른 전자 장치는, 복수 개의 코어들을 포함하는 프로세서, 상기 프로세서와 전기적으로 연결된 휘발성 메모리, 및 상기 프로세서와 전기적으로 연결되고, 적어도 하나의 어플리케이션 프로그램을 저장하는 비휘발성 메모리를 포함하고, 상기 비휘발성 메모리는, 실행 시에, 상기 프로세서가, 상기 적어도 하나의 어플리케이션 프로그램의 클래스들 및 리소스들 중 적어도 하나를 상기 휘발성 메모리에 프리로드하기 위한 프로세스를 실행시키도록 하는 인스트럭션들을 저장하고, 상기 프로세스를 실행시키는 동작은, 상기 프로세스에 대한 복수 개의 스레드들을 생성하는 동작, 상기 코어들 중 두 개 이상의 코어들에 상기 스레드들을 할당하는 동작, 및 상기 두 개 이상의 코어들을 이용하여, 상기 스레드들을 병렬적으로 실행시키는 동작을 포함할 수 있다.
또한, 본 문서에 개시되는 일 실시 예에 따른 복수 개의 코어들을 포함하는 프로세스를 구비한 전자 장치의 운영 체제 운용 방법은, 비휘발성 메모리에 저장된 적어도 하나의 어플리케이션 프로그램의 클래스들 및 리소스들 중 적어도 하나를 휘발성 메모리에 프리로드하기 위한 프로세스를 실행시키는 동작을 포함하고, 상기 프로세스를 실행시키는 동작은, 상기 프로세스에 대한 복수 개의 스레드들을 생성하는 동작, 상기 코어들 중 두 개 이상의 코어들에 상기 스레드들을 할당하는 동작, 및 상기 두 개 이상의 코어들을 이용하여, 상기 스레드들을 병렬적으로 실행시키는 동작을 포함할 수 있다.
본 문서에 개시되는 실시 예들에 따르면, 전자 장치가 자이고트 프로세스를 멀티 스레드를 이용하여 동작시킴으로써, 자바 클래스들과 리소스들을 병렬 또는 직렬로 프리로드할 수 있어 부팅하는데 걸리는 시간이 단축될 수 있다.
또한, 본 문서에 개시되는 실시 예들에 따르면, 자이고트 프로세스 이외의 다른 프로세스들이 한정된 코어에만 할당되기 때문에 자이고트 프로세스가 코어에 할당될 확률이 높아져 부팅 시간이 단축될 수 있다.
이 외에, 본 문서를 통해 직접적 또는 간접적으로 파악되는 다양한 효과들이 제공될 수 있다.
도 1은 다양한 실시 예에 따른 네트워크 환경 내의 전자 장치의 블록도이다.
도 2는 일 실시 예에 따른 운영 체제의 운용과 관련된 전자 장치의 구성을 설명하기 위한 도면이다.
도 3은 일 실시 예에 따른 운영 체제의 운용과 관련된 전자 장치의 운용 방법을 나타낸 도면이다.
도 4는 일 실시 예에 따른 운영 체제의 운용에 따른 코어별 태스크의 할당 상태를 설명하기 위한 도면이다.
도면의 설명과 관련하여, 동일 또는 유사한 구성 요소에 대해서는 동일 또는 유사한 참조 부호가 사용될 수 있다.
본 발명의 일 실시 예를 서술하기에 앞서, 본 발명의 일 실시 예가 적용될 수 있는 전자 장치에 대해 설명한다.
도 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), 햅틱 모듈(179), 카메라 모듈(180), 전력 관리 모듈(188), 배터리(189), 통신 모듈(190), 가입자 식별 모듈(196), 및 안테나 모듈(197)을 포함할 수 있다. 어떤 실시 예에서는, 전자 장치(101)에는, 이 구성 요소들 중 적어도 하나(예: 표시 장치(160) 또는 카메라 모듈(180))가 생략되거나 다른 구성 요소가 추가될 수 있다. 어떤 실시 예에서는, 예를 들면, 표시 장치(160)(예: 디스플레이)에 임베디드된 센서 모듈(176)(예: 지문 센서, 홍채 센서, 또는 조도 센서)의 경우와 같이, 일부의 구성 요소들이 통합되어 구현될 수 있다.
프로세서(120)는, 예를 들면, 소프트웨어(예: 프로그램(140))를 구동하여 프로세서(120)에 연결된 전자 장치(101)의 적어도 하나의 다른 구성 요소(예: 하드웨어 또는 소프트웨어 구성 요소)을 제어할 수 있고, 다양한 데이터 처리 및 연산을 수행할 수 있다. 프로세서(120)는 다른 구성 요소(예: 센서 모듈(176) 또는 통신 모듈(190))로부터 수신된 명령 또는 데이터를 휘발성 메모리(132)에 로드하여 처리하고, 결과 데이터를 비휘발성 메모리(134)에 저장할 수 있다. 일 실시 예에 따르면, 프로세서(120)는 메인 프로세서(121)(예: 중앙 처리 장치 또는 어플리케이션 프로세서), 및 이와는 독립적으로 운영되고, 추가적으로 또는 대체적으로, 메인 프로세서(121)보다 저전력을 사용하거나, 또는 지정된 기능에 특화된 보조 프로세서(123)(예: 그래픽 처리 장치, 이미지 시그널 프로세서, 센서 허브 프로세서, 또는 커뮤니케이션 프로세서)를 포함할 수 있다. 여기서, 보조 프로세서(123)는 메인 프로세서(121)와 별개로 또는 임베디드되어 운영될 수 있다.
이런 경우, 보조 프로세서(123)는, 예를 들면, 메인 프로세서(121)가 인액티브(예: 슬립) 상태에 있는 동안 메인 프로세서(121)를 대신하여, 또는 메인 프로세서(121)가 액티브(예: 어플리케이션 수행) 상태에 있는 동안 메인 프로세서(121)와 함께, 전자 장치(101)의 구성 요소들 중 적어도 하나의 구성 요소(예: 표시 장치(160), 센서 모듈(176), 또는 통신 모듈(190))와 관련된 기능 또는 상태들의 적어도 일부를 제어할 수 있다. 일 실시 예에 따르면, 보조 프로세서(123)(예: 이미지 시그널 프로세서 또는 커뮤니케이션 프로세서)는 기능적으로 관련 있는 다른 구성 요소(예: 카메라 모듈(180) 또는 통신 모듈(190))의 일부 구성 요소로서 구현될 수 있다.
메모리(130)는, 전자 장치(101)의 적어도 하나의 구성 요소(예: 프로세서(120) 또는 센서 모듈(176))에 의해 사용되는 다양한 데이터, 예를 들어, 소프트웨어(예: 프로그램(140)) 및, 이와 관련된 명령에 대한 입력 데이터 또는 출력 데이터를 저장할 수 있다. 메모리(130)는 휘발성 메모리(132) 또는 비휘발성 메모리(134)를 포함할 수 있다.
프로그램(140)은 메모리(130)에 저장되는 소프트웨어로서, 예를 들면, 운영 체제(142), 미들 웨어(144) 또는 어플리케이션(146)을 포함할 수 있다.
입력 장치(150)는, 전자 장치(101)의 구성 요소(예: 프로세서(120))에 사용될 명령 또는 데이터를 전자 장치(101)의 외부(예: 사용자)로부터 수신하기 위한 장치로서, 예를 들면, 마이크, 마우스, 또는 키보드를 포함할 수 있다.
음향 출력 장치(155)는 음향 신호를 전자 장치(101)의 외부로 출력하기 위한 장치로서, 예를 들면, 멀티미디어 재생 또는 녹음 재생과 같이 일반적인 용도로 사용되는 스피커와 전화 수신 전용으로 사용되는 리시버를 포함할 수 있다. 일 실시 예에 따르면, 리시버는 스피커와 일체 또는 별도로 형성될 수 있다.
표시 장치(160)는 전자 장치(101)의 사용자에게 정보를 시각적으로 제공하기 위한 장치로서, 예를 들면, 디스플레이, 홀로그램 장치, 또는 프로젝터 및 해당 장치를 제어하기 위한 제어 회로를 포함할 수 있다. 일 실시 예에 따르면, 표시 장치(160)는 터치 회로(touch circuitry) 또는 터치에 대한 압력의 세기를 측정할 수 있는 압력 센서를 포함할 수 있다.
오디오 모듈(170)은 소리와 전기 신호를 쌍방향으로 변환시킬 수 있다. 일 실시 예에 따르면, 오디오 모듈(170)은, 입력 장치(150)를 통해 소리를 획득하거나, 음향 출력 장치(155), 또는 전자 장치(101)와 유선 또는 무선으로 연결된 외부 전자 장치(예: 전자 장치(102)(예: 스피커 또는 헤드폰))를 통해 소리를 출력할 수 있다.
센서 모듈(176)은 전자 장치(101)의 내부의 작동 상태(예: 전력 또는 온도), 또는 외부의 환경 상태에 대응하는 전기 신호 또는 데이터 값을 생성할 수 있다. 센서 모듈(176)은, 예를 들면, 제스처 센서, 자이로 센서, 기압 센서, 마그네틱 센서, 가속도 센서, 그립 센서, 근접 센서, 컬러 센서, IR(infrared) 센서, 생체 센서, 온도 센서, 습도 센서, 또는 조도 센서를 포함할 수 있다.
인터페이스(177)는 외부 전자 장치(예: 전자 장치(102))와 유선 또는 무선으로 연결할 수 있는 지정된 프로토콜을 지원할 수 있다. 일 실시 예에 따르면, 인터페이스(177)는 HDMI(high definition multimedia interface), USB(universal serial bus) 인터페이스, SD카드 인터페이스, 또는 오디오 인터페이스를 포함할 수 있다.
연결 단자(178)는 전자 장치(101)와 외부 전자 장치(예: 전자 장치(102))를 물리적으로 연결시킬 수 있는 커넥터, 예를 들면, HDMI 커넥터, USB 커넥터, SD 카드 커넥터, 또는 오디오 커넥터(예: 헤드폰 커넥터)를 포함할 수 있다.
햅틱 모듈(179)은 전기적 신호를 사용자가 촉각 또는 운동 감각을 통해서 인지할 수 있는 기계적인 자극(예: 진동 또는 움직임) 또는 전기적인 자극으로 변환할 수 있다. 햅틱 모듈(179)은, 예를 들면, 모터, 압전 소자, 또는 전기 자극 장치를 포함할 수 있다.
카메라 모듈(180)은 정지 영상 및 동영상을 촬영할 수 있다. 일 실시 예에 따르면, 카메라 모듈(180)은 하나 이상의 렌즈, 이미지 센서, 이미지 시그널 프로세서, 또는 플래시를 포함할 수 있다.
전력 관리 모듈(188)은 전자 장치(101)에 공급되는 전력을 관리하기 위한 모듈로서, 예를 들면, PMIC(power management integrated circuit)의 적어도 일부로서 구성될 수 있다.
배터리(189)는 전자 장치(101)의 적어도 하나의 구성 요소에 전력을 공급하기 위한 장치로서, 예를 들면, 재충전 불가능한 1차 전지, 재충전 가능한 2차 전지 또는 연료 전지를 포함할 수 있다.
통신 모듈(190)은 전자 장치(101)와 외부 전자 장치(예: 전자 장치(102), 전자 장치(104), 또는 서버(108))간의 유선 또는 무선 통신 채널의 수립, 및 수립된 통신 채널을 통한 통신 수행을 지원할 수 있다. 통신 모듈(190)은 프로세서(120)(예: 어플리케이션 프로세서)와 독립적으로 운영되는, 유선 통신 또는 무선 통신을 지원하는 하나 이상의 커뮤니케이션 프로세서를 포함할 수 있다. 일 실시 예에 따르면, 통신 모듈(190)은 무선 통신 모듈(192)(예: 셀룰러 통신 모듈, 근거리 무선 통신 모듈, 또는 GNSS(global navigation satellite system) 통신 모듈) 또는 유선 통신 모듈(194)(예: LAN(local area network) 통신 모듈, 또는 전력선 통신 모듈)을 포함하고, 그 중 해당하는 통신 모듈을 이용하여 제1 네트워크(198)(예: 블루투스, WiFi direct 또는 IrDA(infrared data association) 같은 근거리 통신 네트워크) 또는 제2 네트워크(199)(예: 셀룰러 네트워크, 인터넷, 또는 컴퓨터 네트워크(예: LAN 또는 WAN)와 같은 원거리 통신 네트워크)를 통하여 외부 전자 장치와 통신할 수 있다. 상술한 여러 종류의 통신 모듈(190)은 하나의 칩으로 구현되거나 또는 각각 별도의 칩으로 구현될 수 있다.
일 실시 예에 따르면, 무선 통신 모듈(192)은 가입자 식별 모듈(196)에 저장된 사용자 정보를 이용하여 통신 네트워크 내에서 전자 장치(101)를 구별 및 인증할 수 있다.
안테나 모듈(197)은 신호 또는 전력을 외부로 송신하거나 외부로부터 수신하기 위한 하나 이상의 안테나들을 포함할 수 있다. 일 실시 예에 따르면, 통신 모듈(190)(예: 무선 통신 모듈(192))은 통신 방식에 적합한 안테나를 통하여 신호를 외부 전자 장치로 송신하거나, 외부 전자 장치로부터 수신할 수 있다.
상기 구성 요소들 중 일부 구성 요소들은 주변 기기들간 통신 방식(예: 버스, GPIO(general purpose input/output), SPI(serial peripheral interface), 또는 MIPI(mobile industry processor interface))를 통해 서로 연결되어 신호(예: 명령 또는 데이터)를 상호간에 교환할 수 있다.
일 실시 예에 따르면, 명령 또는 데이터는 제2 네트워크(199)에 연결된 서버(108)를 통해서 전자 장치(101)와 외부의 전자 장치(104)간에 송신 또는 수신될 수 있다. 전자 장치(102, 104) 각각은 전자 장치(101)와 동일한 또는 다른 종류의 장치일 수 있다. 일 실시 예에 따르면, 전자 장치(101)에서 실행되는 동작들의 전부 또는 일부는 다른 하나 또는 복수의 외부 전자 장치에서 실행될 수 있다. 일 실시 예에 따르면, 전자 장치(101)가 어떤 기능이나 서비스를 자동으로 또는 요청에 의하여 수행해야 할 경우에, 전자 장치(101)는 기능 또는 서비스를 자체적으로 실행시키는 대신에 또는 추가적으로, 그와 연관된 적어도 일부 기능을 외부 전자 장치에게 요청할 수 있다. 상기 요청을 수신한 외부 전자 장치는 요청된 기능 또는 추가 기능을 실행하고, 그 결과를 전자 장치(101)로 전달할 수 있다. 전자 장치(101)는 수신된 결과를 그대로 또는 추가적으로 처리하여 요청된 기능이나 서비스를 제공할 수 있다. 이를 위하여, 예를 들면, 클라우드 컴퓨팅, 분산 컴퓨팅, 또는 클라이언트-서버 컴퓨팅 기술이 이용될 수 있다.
도 2는 일 실시 예에 따른 운영 체제의 운용과 관련된 전자 장치의 구성을 설명하기 위한 도면이다.
도 2를 참조하면, 프로세서(120)는 복수 개의 코어들을 포함할 수 있다. 도시된 도면에서는, 프로세서(120)가 제1 코어(125), 제2 코어(126), 제3 코어(127), 및 제4 코어(128)을 포함한 상태를 나타내지만, 프로세서(120)는 상술한 코어들 중 적어도 하나를 생략하거나, 적어도 하나의 다른 코어를 더 포함할 수도 있다.
상술한 코어들(예: 제1 코어(125), 제2 코어(126), 제3 코어(127), 또는 제4 코어(128))은 동일한 성능을 가질 수도 있고, 서로 다른 성능을 가질 수도 있다. 여기서, 서로 다른 성능을 가지는 복수의 코어들은 서로 다른 클럭(clock) 주파수로 동작하는 코어들을 의미할 수 있다.
멀티 코어 환경에서는, 프로세스 별로 요구되는 자원에 따라 프로세스를 코어에 할당할 수 있다. 예컨대, 상대적으로 많은 자원을 요구하는 프로세스와 상대적으로 적은 자원을 요구하는 프로세스가 코어의 성능 또는 코어의 프로세스 점유 상태 등에 따라 배분되어야 한다. 여기서, 프로세스라 함은 응용 프로그램의 일부 또는 응용 프로그램의 전체를 의미할 수 있다. 또한, 코어의 성능은 프로세스를 처리하는 능력을 의미할 수 있다. 즉, 하나의 동일한 프로세스를 처리하는데 요구되는 코어의 자원이 많을수록 낮은 성능을 가지는 코어이고, 하나의 동일한 프로세스를 처리하는데 요구되는 코어의 자원이 적을수록 높은 성능을 가지는 코어일 수 있다.
상술한 코어들 중 적어도 하나는 코어들에 할당되는 프로세스 및 프로세스의 스레드를 관리하는 코어일 수 있다. 예를 들어, 도시된 도면에서와 같이, 제1 코어(125)는 다른 코어(예: 제2 코어(126), 제3 코어(127), 또는 제4 코어(128))에 할당되는 프로세스 및 스레드를 관리하는 스케줄러(125a)를 포함할 수 있다. 제1 코어(125)는 각 코어 별 프로세스의 스레드들을 모니터링하는 오류 확인 모듈(125b)을 더 포함할 수 있다.
일 실시 예에 따르면, 스케줄러(125a)는 예를 들면, 프로세스의 종류에 따라 상기 프로세스를 처리할 코어를 지정할 수 있다. 일 예로, 스케줄러(125a)는 자이고트 프로세스를 모든 코어들에서 처리될 수 있도록 지정할 수 있고, 자이코트 프로세스를 제외한 다른 프로세스들 중 중요도가 비교적 낮은 프로세스는 한정된 코어들에서만 처리될 수 있도록 지정할 수 있다. 즉, 스케줄러(125a)는 자이고트 프로세스 이외의 다른 프로세스들이 한정된 코어들에만 할당(예: CPU affinity setting)되도록 하여 자이고트 프로세스가 스케줄링을 더 많이 받을 수 있도록 할 수 있다.
일 실시 예에 따르면, 스케줄러(125a)는 프로세스에 대한 스레드의 개수를 코어들(예: 제1 코어(125), 제2 코어(126), 제3 코어(127), 또는제4 코어(128))의 프로세싱 성능에 따라 다르게 결정할 수 있다. 일 예로, 스케줄러(125a)는 상기 코어들이 동일한 프로세싱 성능을 가질 경우(예: SMP(symmetric multiprocessing)의 경우), 스레드는 전체 코어의 개수에 절반에 해당하는 개수로 결정될 수 있다. 다른 예로, 스케줄러(125a)는 상기 코어들이 서로 다른 프로세싱 성능을 가질 경우(예: HMP(heterogeneous multiprocessing)의 경우), 스레드는 고성능의 코어(예: 빅 코어(big core))의 개수에 대응되도록 결정될 수 있다.
일 실시 예에 따르면, 스케줄러(125a)는 프로세스의 스레드들을 코어들에 할당할 수 있다. 예컨대, 스케줄러(125a)는 프로세스를 처리하도록 지정된 코어들에 상기 프로세스의 스레드들을 할당할 수 있다. 이 경우, 스케줄러(125a)는 스레드를 통해 처리할 기능 또는 루틴의 연계성(또는 종속성(dependency))을 고려하여, 코어들에 스레드들을 할당할 수 있다.
일 실시 예에 따르면, 스케줄러(125a)에 의해 프로세스 및 프로세스의 스레드들에 대한 스케줄링이 완료되면, 코어별로 할당된 프로세스의 스레드들이 수행될 수 있다. 코어별로 수행되는 스레드들은 오류 확인 모듈(125b)에 의해 모니터링될 수 있다. 오류 확인 모듈(125b)은 각 코어 및 스레드 별 수행 시간을 확인하고, 스레드의 수행 시간이 지정된 시간을 초과하는 경우, 스레드에 대한 정보(예: 스레드를 통해 처리할 기능)를 메모리(130)에 기록할 수 있다. 또한, 오류 확인 모듈(125b)은 수행 시간이 상기 지정된 시간을 초과한 스레드를 종료시키고, 해당 프로세스를 재시작시킬 수 있다. 이 경우, 스케줄러(125a)는 문제를 야기시킨 기능(수행 시간이 지정된 시간을 초과한 스레드를 통해 처리할 기능)이 다른 기능들의 수행 이후 처리될 수 있도록 스케줄링할 수 있다. 어떤 실시 예에서, 스케줄러(125a)는 스레드의 수행 시간이 상기 지정된 시간을 초과하게 되면, 해당 프로세스는 싱글 스레드로 동작시킬 수도 있다.
일 실시 예에 따르면, 오류 확인 모듈(125b)은 모든 프로세스의 수행이 완료되면, 프로세스의 수행 이력 정보를 메모리(130)에 저장할 수 있다. 예를 들어, 오류 확인 모듈(125b)은 부팅과 관련하여 자이고트 프로세스의 자바 클래스 및 리소스들에 대한 프리로드 이력 정보(139)를 메모리(130)에 저장할 수 있다. 프로세스 프리로드 이력 정보(139)는 다음 부팅 시에, 스케줄러(125a)가 프로세스 및 프로세스의 스레드들을 스케줄링하는데 이용할 수 있다. 일 예로, 스케줄러(125a)는 프로세스 프리로드 이력 정보(139)에서 각 코어 및 스레드 별 수행 시간을 확인하고, 수행 시간이 긴 스레드에는 프리로드할 자바 클래스들 또는 리소스들의 개수를 줄이고, 수행 시간이 짧은 스레드에는 프리로드할 자바 클래스들 또는 리소스들의 개수를 늘릴 수 있다.
일 실시 예에 따르면, 오류 확인 모듈(125b)은 수행 시간이 지정된 시간을 초과한 스레드에 대해서는 상기 스레드를 통해 프리로드하려고 했던 자바 클래스들 또는 리소스들에 대한 오류 정보를 메모리(130)에 저장할 수 있다. 이 경우, 스케줄러(125a)는 다음 부팅 시에 메모리(130)에 저장된 상기 오류 정보를 확인하고, 해당 자바 클래스들 또는 리소스들이 다른 자바 클래스들 및 리소스들이 프리로드된 후(또는 다른 자바 클래스들 또는 리소스들의 프리로드가 수행되기 전)에 프리로드될 수 있도록 할 수 있다. 상기 오류 정보는 예를 들어, 다른 자바 클래스들 또는 리소스들의 프리로드가 완료된 후(또는 다른 자바 클래스들 또는 리소스들의 프리로드가 수행되기 전)에 프리로드되어야 하는 자바 클래스들 또는 리소스들에 대한 정보(예: 포스트 프리로드 정보(post preload information)(137))에 포함될 수 있다.
일 실시 예에 따르면, 상기 포스트 프리로드 정보(137)는 기정의되어 메모리(130)에 저장될 수 있다. 또한, 무선 펌웨어 업그레이드(firmware over the air(FOTA))를 통해 펌웨어가 업데이트되면, 상기 포스트 프리로드 정보(137)가 변경될 수도 있다.
이하에서는, 안드로이드 운영 체제가 적용된 전자 장치(예: 도 1의 전자 장치(101))에서의 프로세서(120) 기능에 대해 설명하도록 한다.
본 발명의 일 실시 예에 따른, 안드로이드 운영 체제가 적용된 전자 장치에서는, 부팅 과정 중에 이닛 프로세스(init process)가 시작된 후, 자이고트 프로세스가 시작될 수 있다. 즉, 자이고트 프로세스는 이닛 프로세스에 의해 시작이 되고, 달빅(Dalvik) 가상 머신을 초기화할 수 있다. 이후, 달빅 가상 머신의 제어 하에 어플리케이션 프레임워크 내에 있는 각종 자바 컴포넌트들이 실행되는데, 이중에서 시스템 서버들은 시스템 내에서 처음으로 수행되는 자바 컴포넌트들일 수 있다.
자이고트 프로세스가 시작되면, 자이고트 프로세스가 응용 프로그램의 사용자 프로세스에서 사용할 자바 클래스와 리소스들을 프리로드할 수 있다. 자이고트 프로세스는 프리로드할 자바 클래스들의 리스트를 지정된 파일(예: /system/etc/preloaded-classes)에서 읽어올 수 있다. 또한, 자이고트 프로세스는 프리로드할 리소스들의 리스트도 읽어올 수 있다. 이후, 자이고트 프로세스는 자바 클래스 리스트 및 리소스 리스트에 기반하여 자바 클래스와 리소스들을 각각 프리로드할 수 있다.
일 실시 예에 따르면, 자이고트 프로세스는 멀티 스레드를 통해 자바 클래스와 리소스들을 병렬적으로 프리로드할 수 있다. 자이고트 프로세스는 멀티 스레드를 통해 자바 클래스를 프리로드하고, 자바 클래스가 모두 프리로드되면, 멀티 스레드를 통해 리소스들을 프리로드할 수 있다. 즉, 자바 클래스들이 모두 프리로드된 이후에 리소스들이 프리로드될 수 있다. 이 경우, 스케줄러(125a)는 스레드들을 코어들에 할당할 수 있다.
일 실시 예에 따르면, 스케줄러(125a)는 복수의 자이고트 프로세스들이 존재하는 경우, 부팅과 직접적으로 관련된 자이고트 프로세스만 병렬화 즉, 부팅과 관련된 자이고트 프로세스에 대한 멀티 스레드를 생성하고 코어들에 멀티 스레드를 할당하여 수행시킬 수 있다.
일 실시 예에 따르면, 오류 확인 모듈(125b)은 자이고트 프로세스의 스레드들 중 어느 하나의 스레드가 지정된 시간을 초과하여 수행되는 경우, 상기 스레드를 종료시키고 해당 자이고트 프로세스를 재시작시킬 수 있다. 이 경우, 스케줄러(125a)는 문제를 야기시킨 기능 즉, 수행 시간이 지정된 시간을 초과한 스레드를 통해 프리로드할 자바 클래스 및 리소스들이 다른 자바 클래스들 및 리소스들이 프리로드된 후에 프리로드될 수 있도록 스케줄링할 수 있다. 어떤 실시 예에서, 스케줄러(125a)는 해당 자이고트 프로세스에 대해서는 싱글 스레드로 동작시킬 수 있다.
일 실시 예에 따르면, 오류 확인 모듈(125b)은 모든 자이고트 프로세스들의 수행이 완료되어 부팅 동작이 종료되면, 자이고트 프로세스의 프리로드 이력 정보(139)를 메모리(130)에 저장할 수 있다. 프로세스 프리로드 이력 정보(139)는 예를 들어, 자이고트 프로세스의 각 스레드의 수행 시간 정보 및 상기 스레드를 통해 프리로드한 자바 클래스(또는 리소스들)에 대한 정보를 포함할 수 있다.
일 실시 예에 따르면, 스케줄러(125a)는 부팅이 시작되면, 메모리(130)에 저장된 프로세스 프리로드 이력 정보(139)에 기초하여 자이고트 프로세스에 대한 멀티 스레드 생성 및 생성된 멀티 스레드의 할당 등을 결정할 수 있다.
상술한 바와 같이, 다양한 실시 예에 따르면, 전자 장치(예: 전자 장치(101))는 디스플레이(예: 표시 장치(160)), 통신 회로(예: 통신 모듈(190)), 상기 디스플레이 및 상기 통신 회로와 전기적으로 연결되고, 복수 개의 코어들을 포함하는 프로세서(예: 프로세서(120)), 상기 프로세서와 전기적으로 연결된 휘발성 메모리(예: 휘발성 메모리(132)), 및 상기 프로세서와 전기적으로 연결된 비휘발성 메모리(예: 비휘발성 메모리(134))를 포함하고, 상기 비휘발성 메모리는 적어도 하나의 어플리케이션 프로그램을 저장하도록 구성되고, 실행 시에, 상기 프로세서가, 상기 적어도 하나의 어플리케이션 프로그램을 위하여, 상기 비휘발성 메모리에, 운영 체제의 공유된 클래스들 및/또는 리소스들을 프리로드하는 프로세스를 수행하도록 하는 인스트럭션들을 저장하고, 상기 프로세스를 수행하는 동작은, 상기 클래스들 및/또는 리소스들의 다수의 그룹들을, 상기 코어들 중 두 개 이상의 코어들에 할당하는 동작, 및 상기 두 개 이상의 코어들을 이용하여, 상기 클래스들 및/또는 리소스들의 다수의 그룹들을 병렬적으로 상기 휘발성 메모리에 프리로드하는 동작을 포함할 수 있다.
다양한 실시 예에 따르면, 상기 프로세스를 수행하는 동작은, 상기 클래스들 및/또는 리소스들의 다수의 그룹들을 프리로드하는 동작이 선택된 시간 범위 내에 완료되지 않거나, 또는 오류가 생기면, 상기 클래스들 및/또는 리소스들의 다수의 그룹들을 순차적으로 프리로드하는 동작을 더 포함할 수 있다.
다양한 실시 예에 따르면, 상기 운영 체제는 안드로이드 운영 체제이고, 상기 프로세스는 자이고트 프로세스일 수 있다.
다양한 실시 예에 따르면, 상기 클래스들 및/또는 리소스들의 다수의 그룹들을 할당하는 동작은, 프리로드를 위하여, 상기 클래스들 및/또는 리소스들의 다수의 리스트들을 제공하는 동작을 더 포함할 수 있다.
다양한 실시 예에 따르면, 상기 다수의 그룹들을 할당하는 동작 전에 상기 두 개 이상의 코어들을 선택하는 동작을 더 포함할 수 있다.
다양한 실시 예에 따르면, 상기 클래스들 및/또는 리소스들의 다수의 그룹들을 할당하는 동작은, 상기 클래스들 및/또는 리소스들의 크기들 또는 종속성에 적어도 부분적으로 기반하여, 상기 클래스들 및/또는 리소스들을 그룹핑하는 동작을 포함할 수 있다.
다양한 실시 예에 따르면, 상기 자이고트 프로세스는, 프리로드 메소드를 포함하는 자이고트 메인 메소드를 포함하고, 상기 프리로드 메소드는, 상기 클래스들 및/또는 리소스들의 다수의 그룹들을 상기 두 개 이상의 코어들에 할당하는 동작, 및 상기 두 개 이상의 코어들을 이용하여, 상기 클래스들 및/또는 리소스들의 다수의 그룹들을 병렬적으로 상기 휘발성 메모리에 프리로드하는 동작을 포함할 수 있다.
상술한 바와 같이, 다양한 실시 예에 따르면, 전자 장치(예: 전자 장치(101))는 복수 개의 코어들을 포함하는 프로세서(예: 프로세서(120)), 상기 프로세서와 전기적으로 연결된 휘발성 메모리(예: 휘발성 메모리(132)), 및 상기 프로세서와 전기적으로 연결되고, 적어도 하나의 어플리케이션 프로그램을 저장하는 비휘발성 메모리(예: 비휘발성 메모리(134))를 포함하고, 상기 비휘발성 메모리는, 실행 시에, 상기 프로세서가, 상기 적어도 하나의 어플리케이션 프로그램의 클래스들 및 리소스들 중 적어도 하나를 상기 휘발성 메모리에 프리로드하기 위한 프로세스를 실행시키도록 하는 인스트럭션들을 저장하고, 상기 프로세스를 실행시키는 동작은, 상기 프로세스에 대한 복수 개의 스레드들을 생성하는 동작, 상기 코어들 중 두 개 이상의 코어들에 상기 스레드들을 할당하는 동작, 및 상기 두 개 이상의 코어들을 이용하여, 상기 스레드들을 병렬적으로 실행시키는 동작을 포함할 수 있다.
다양한 실시 예에 따르면, 상기 스레드들을 생성하는 동작은, 상기 코어들의 개수 및 상기 코어들의 성능 중 적어도 하나에 기반하여 상기 스레드들의 개수를 결정하는 동작을 더 포함할 수 있다.
다양한 실시 예에 따르면, 상기 스레드들을 생성하는 동작은, 상기 클래스들 및 리소스들 각각의 크기, 및 상기 클래스들 및 리소스들 간의 종속 관계 중 적어도 하나에 기반하여 상기 스레드들을 생성하는 동작을 포함할 수 있다.
다양한 실시 예에 따르면, 상기 프로세스를 실행시키는 동작은, 상기 스레드들 중 어느 하나의 스레드의 수행 시간이 지정된 시간을 초과하는 경우, 상기 프로세스를 재실행시키는 동작을 더 포함하고, 상기 프로세스를 재실행시키는 동작은, 상기 프로세스를 하나의 스레드를 통해 순차적으로 실행시키는 동작을 포함할 수 있다.
다양한 실시 예에 따르면, 상기 프로세스를 실행시키는 동작은, 상기 스레드들 중 어느 하나의 스레드의 수행 시간이 지정된 시간을 초과하는 경우, 상기 스레드를 통해 프리로드하려는 상기 클래스들 및 상기 리소스들 중 적어도 하나에 대한 정보를 상기 비휘발성 메모리에 저장하는 동작을 더 포함할 수 있다.
다양한 실시 예에 따르면, 상기 프로세스를 실행시키는 동작은, 상기 비휘발성 메모리에 저장된 상기 클래스들 및 상기 리소스들 중 적어도 하나에 대한 정보를 기반으로, 상기 프로세스를 순차적으로 실행할지 또는 병렬적으로 실행할지를 판단하는 동작을 더 포함할 수 있다.
다양한 실시 예에 따르면, 상기 비휘발성 메모리는, 실행 시에, 상기 프로세서가, 상기 프로세스와 다른 프로세스를 실행시키도록 하는 인스트럭션들을 더 저장하고, 상기 다른 프로세스를 실행시키는 동작은, 상기 코어들 중 지정된 적어도 하나의 코어를 제외한 다른 적어도 하나의 코어를 이용하여, 상기 다른 프로세스를 실행시키는 동작을 포함할 수 있다.
도 3은 일 실시 예에 따른 운영 체제의 운용과 관련된 전자 장치의 운용 방법을 나타낸 도면이다.
도 3을 참조하면, 전자 장치(101)의 프로세서(120)는 동작 310에서, 부팅 시 프로세스의 프리로드 기능이 병렬적으로 실행 가능한지를 판단할 수 있다. 예컨대, 프로세서(120)의 스케줄러(125a)는 자이고트 프로세스의 자바 클래스 및 리소스들의 프리로드가 병렬적으로 실행 가능한지를 판단할 수 있다. 일 실시 예에 따르면, 스케줄러(125a)는 메모리(130)에 저장된 프로세스 프리로드 이력 정보(139)를 통해, 기부팅 시에 발생한 오류 정보가 있는지를 확인할 수 있다. 스케줄러(125a)는 기부팅 시 발생한 오류 정보가 있으면, 자이고트 프로세스의 프리로드 기능이 병렬적으로 실행 가능하지 않은 것으로 결정할 수 있다. 스케줄러(125a)는 기부팅 시에 발생한 오류로 인해 자이고트 프로세스의 프리로드 기능이 병렬적으로 실행 가능하지 않는 경우, 동작 320에서, 자이고트 프로세스의 프리로드 기능을 순차적으로 실행할 수 있다. 예컨대, 스케줄러(125a)는 자이고트 프로세스를 싱글 스레드로 동작시킬 수 있다. 자이고트 프로세스의 프리로드 기능이 병렬적으로 실행 가능하지 않는 경우는, 예를 들어, 무선 펌웨어 업그레이드(firmware over the air(FOTA))를 통해 새로운 자바 클래스가 업데이트된 경우, 또는 사용자의 수정이나 외부 해킹 동작에 의해 펌웨어와 관련된 무결성(integrity) 문제가 발생한 경우 등을 포함할 수 있다.
일 실시 예에 따르면, 스케줄러(125a)는 자이고트 프로세스의 프리로드 기능이 병렬적으로 실행 가능한 경우, 동작 330에서, 자이고트 프로세스에 대한 복수 개의 스레드들을 생성할 수 있다. 일 실시 예에 따르면, 스케줄러(125a)는 자이고트 프로세스에 대한 스레드의 개수를 코어들(예: 제1 코어(125), 제2 코어(126), 제3 코어(127), 또는제4 코어(128))의 프로세싱 성능에 따라 다르게 결정할 수 있다. 일 예로, 스케줄러(125a)는 상기 코어들이 동일한 프로세싱 성능을 가질 경우, 스레드의 개수를 전체 코어의 개수에 절반에 해당하는 개수로 결정할 수 있고, 상기 코어들이 서로 다른 프로세싱 성능을 가질 경우, 스레드의 개수는 고성능의 코어의 개수에 대응되도록 결정할 수 있다. 또한, 스케줄러(125a)는 프로세스 프리로드 이력 정보(139)를 통해, 자이고트 프로세스의 각 스레드의 수행 시간 및 각 스레드를 통해 프리로드한 데이터(예: 자바 클래스 또는 리소스들)를 확인할 수 있고, 각 스레드의 수행 시간을 기초로 하여 스레드를 통해 프리로드할 자바 클래스 또는 리소스들의 개수를 결정할 수 있다. 일 예로, 스케줄러(125a)는 스레드의 수행 오류로 판단될 수 있는 지정된 시간 내에서 수행 시간이 가장 오래 걸린 스레드에 대해서는 프리로드할 자바 클래스 또는 리소스들의 개수를 줄이고, 수행 시간이 가장 잛게 걸린 스레드에 대해서는 프리로드할 자바 클래스 또는 리소스들의 개수를 늘릴 수 있다. 즉, 스케줄러(125a)는 수행 시간이 상기 지정된 시간(스레드의 수행 오류로 판단하는 기준 시간) 이내인 경우에 해당하는 스레드에 대해서, 스레드에 할당되는 클래스들 또는 리소스들을 재분배하여 다음 부팅 시에 반영할 수 있다.
동작 340에서, 스케줄러(125a)는 코어별로 스레드를 할당할 수 있다. 일 예로, 스케줄러(125a)는 자이고트 프로세스의 스레드들은 모든 코어들에 할당할 수 있다. 다른 예로, 스케줄러(125a)는 자이고트 프로세스 외의 다른 프로세스는 한정된 코어들에만 할당할 수 있다.
일 실시 예에 따르면, 스케줄러(125a)는 이전 부팅 시에 오류를 야기했던 스레드(예: 수행 시간이 지정된 시간을 초과한 스레드)를 통해 프리로드하려고 했던 자바 클래스 또는 리소스들에 대해서는 다른 자바 클래스들 및 리소스들이 프리로드된 후에 프리로드될 수 있도록 할 수 있다. 예컨대, 스케줄러(125a)는 해당 자바 클래스 또는 리소스들을 프리로드하기 위한 스레드가 다른 자바 클래스 또는 리소스들을 프리로드하기 위한 스레드가 수행된 후에 코어에 할당될 수 있도록 순서를 지정할 수 있다.
일 실시 예에 따르면, 스케줄러(125a)는 자이고트 프로세스의 스레드를 통해 프리로드할 자바 클래스 또는 리소스들의 연계성(또는 종속성)을 고려하여, 스레드들을 코어들에 할당할 수 있다. 예를 들어, 스케줄러(125a)는 자바 클래스를 프리로드하기 위한 스레드가 리소스들을 프리로드하기 위한 스레드보다 우선적으로 수행될 수 있도록 스레드의 순서를 지정할 수 있다. 다른 예를 들어, 스케줄러(125a)는 종속성이 있는 자바 클래스 또는 리소스들을 프리로드하기 위한 스레드들을 하나의 코어에 할당할 수 있다. 또 다른 예로, 스케줄러(125a)는 종속성이 있는 자바 클래스 또는 리소스들을 프리로드하기 위한 스레드들을 종속성이 없는 자바 클래스 또는 리소스들을 프리로드하기 위한 스레드의 이후에 수행할 수 있다. 상기 자바 클래스 또는 리소스들의 종속성은 예를 들면, 테스트를 통하여 확인될 수 있다. 일 실시 예에 따르면, 스케줄러(125a)는 자이고트 프로세스의 스레드를 통해 프리로드할 자바 클래스 또는 리소스들의 크기(데이터 량)를 고려하여, 스레드들을 코어들에 할당할 수 있다. 예를 들어, 스케줄러(125a)는 상대적으로 크기(또는, 데이터 량)가 큰 자바 클래스 또는 리소스들을 프리로드하기 위한 스레드를 상대적으로 성능이 우수한 코어에 할당할 수 있다. 다른 예를 들어, 스케줄러(125a)는 자바 클래스 또는 리소스들을 일정 크기 단위로 그룹화하고, 각 그룹 단위로 자바 클래스 또는 리소스들을 프리로드하기 위한 스레드를 각 코어에 할당할 수 있다.
일 실시 예에 따르면, 메모리(130)는 다른 자바 클래스의 프리로드가 완료된 후에 프리로드되어야 하는 자바 클래스들 또는 리소스들에 대한 정보 예컨대, 포스트 프리로드 정보(post preload information)(137)를 저장할 수 있다. 예컨대, 메모리(130)는 자바 클래스들 또는 리소스들에 대한 연계성(또는 종속성)에 대한 정보를 저장할 수 있다. 이 경우, 스케줄러(125a)는 자바 클래스들에 대한 연계성(또는 종속성)에 대한 정보(예: 포스트 프리로드 정보(137))를 메모리(130)로부터 수신하여, 자바 클래스들의 프리로드 순서를 지정할 수 있다. 어떤 실시 예에서, 메모리(130)는 우선적으로 프리로드되어야 하는 자바 클래스들의 리스트만을 저장할 수도 있다. 이 경우, 스케줄러(125a)는 우선적으로 프리로드되어야 하는 자바 클래스들을 우선적으로 멀티 스레드를 이용해 코어에 할당할 수 있다.
동작 350에서, 프로세서(120)의 각 코어들(예: 제1 코어(125), 제2 코어(126), 제3 코어(127), 또는 제4 코어(128))은 할당된 스레드들을 수행할 수 있다. 코어별로 수행되는 스레드들은 오류 확인 모듈(125b)에 의해 모니터링될 수 있다.
동작 360에서, 오류 확인 모듈(125b)은 각 스레드의 수행 중 오류의 발생 여부를 판단할 수 있다. 일 실시 예에 따르면, 오류 확인 모듈(125b)은 각 코어 및 스레드 별 수행 시간을 확인하고, 스레드의 수행 시간이 지정된 시간을 초과하는 경우, 스레드의 수행 오류가 발생되었다고 판단할 수 있다. 일 실시 예에 따르면, 오류 확인 모듈(125b)은 수행 오류가 발생된 스레드에 대해서는 상기 스레드를 통해 프리로드하려고 했던 자바 클래스들 또는 리소스들에 대한 정보를 메모리(130)에 저장할 수 있다. 이 경우, 스케줄러(125a)는 다음 부팅 시에 메모리(130)에 저장된 상기 자바 클래스들 또는 리소스들에 대한 정보를 확인하고, 상기 자바 클래스들 또는 리소스들이 다른 자바 클래스들 및 리소스들이 프리로드된 후에 프리로드될 수 있도록 포스트 프리로드 정보(137)에 저장하여 관리할 수 있다.
동작 370에서, 오류 확인 모듈(125b)은 스레드의 수행 오류가 발생되지 않고, 모든 자이고트 프로세스들의 스레드들이 수행이 완료되면, 스레드들의 수행 이력 정보(예: 프로세스 프리로드 이력 정보(139))을 메모리(130)에 저장할 수 있다. 예컨대, 오류 확인 모듈(125b)은 각 스레드의 수행 시간 정보 및 각 스레드를 통해 프리로드한 자바 클래스(또는 리소스들)에 대한 정보를 메모리(130)에 저장할 수 있다.
스레드의 수행 오류가 발생되면, 동작 380에서, 오류 확인 모듈(125b)은 오류 처리를 수행할 수 있다. 일 실시 예에 따르면, 오류 확인 모듈(125b)은 오류가 발생된 스레드를 종료시킬 수 있다. 다른 실시 예에 따르면, 오류 확인 모듈(125b)은 오류가 발생된 스레드에 대한 정보 예컨대, 스레드를 통해 프리로드할 자바 클래스(또는 리소스들)에 대한 정보를 메모리(130)에 저장할 수 있다.
오류 처리가 완료되면, 스케줄러(125a)는 동작 320에서, 자이고트 프로세스의 프리로드 기능을 순차적으로 실행할 수 있다. 예컨대, 스케줄러(125a)는 자이고트 프로세스를 싱글 스레드로 동작시킬 수 있다.
상술한 자이고트 프로세스의 프리로드 동작은 프리로드 메소드(예: preload())를 통해 구현될 수 있다. 다음의 표 1은 자이고트 프로세스의 메인 메소드(예: main()) 중 일부를 나타낸다.
public static void main(String argv[]){ try{ SamplingProfilerIntegration.start(); registerZygoteSocket(); EventLog.writeEvent(LOG_BOOT_PROGRESS_PRELOAD_START, SystemClock.uptimeMillis()); preload(); EventLog.writeEvent(LOG_BOOT_PROGRESS_PRELOAD_END, SystemClock.uptimeMillis()); SamplingProfilerIntegration.writeZygoteSnapshot(); ... }}
일 실시 예에 따르면, 상기 프리로드 메소드는 자바 클래스들 및 리소스들을 다수의 그룹들로 묶어 상기 코어들에 할당하는 동작을 포함할 수 있다. 또한, 상기 프리로드 메소드는 상기 코어들을 이용하여, 상기 그룹들을 병렬적으로 프리로드하는 동작을 포함할 수 있다.
상술한 바와 같이, 다양한 실시 예에 따르면, 복수 개의 코어들을 포함하는 프로세서(예: 프로세서(120))를 구비한 전자 장치(예: 전자 장치(101))의 운영 체제의 운용 방법은, 비휘발성 메모리에 저장된 적어도 하나의 어플리케이션 프로그램의 클래스들 및 리소스들 중 적어도 하나를 휘발성 메모리에 프리로드하기 위한 프로세스를 실행시키는 동작을 포함하고, 상기 프로세스를 실행시키는 동작은, 상기 프로세스에 대한 복수 개의 스레드들을 생성하는 동작, 상기 코어들 중 두 개 이상의 코어들에 상기 스레드들을 할당하는 동작, 및 상기 두 개 이상의 코어들을 이용하여, 상기 스레드들을 병렬적으로 실행시키는 동작을 포함할 수 있다.
다양한 실시 예에 따르면, 상기 스레드들을 생성하는 동작은, 상기 코어들의 개수 및 상기 코어들의 성능 중 적어도 하나에 기반하여 상기 스레드들의 개수를 결정하는 동작을 더 포함할 수 있다.
다양한 실시 예에 따르면, 상기 스레드들을 생성하는 동작은, 상기 클래스들 및 리소스들 각각의 크기, 및 상기 클래스들 및 리소스들 간의 종속 관계 중 적어도 하나에 기반하여 상기 스레드들을 생성하는 동작을 포함할 수 있다.
다양한 실시 예에 따르면, 상기 프로세스를 실행시키는 동작은, 상기 스레드들 중 어느 하나의 스레드의 수행 시간이 지정된 시간을 초과하는 경우, 상기 프로세스를 재실행시키는 동작을 더 포함하고, 상기 프로세스를 재실행시키는 동작은, 상기 프로세스를 하나의 스레드를 통해 순차적으로 실행시키는 동작을 포함할 수 있다.
다양한 실시 예에 따르면, 상기 프로세스를 실행시키는 동작은, 상기 스레드들 중 어느 하나의 스레드의 수행 시간이 지정된 시간을 초과하는 경우, 상기 스레드를 통해 프리로드하려는 상기 클래스들 및 상기 리소스들 중 적어도 하나에 대한 정보를 상기 비휘발성 메모리에 저장하는 동작, 및 상기 비휘발성 메모리에 저장된 상기 클래스들 및 상기 리소스들 중 적어도 하나에 대한 정보를 기반으로, 상기 프로세스를 순차적으로 실행할지 또는 병렬적으로 실행할지를 판단하는 동작을 더 포함할 수 있다.
다양한 실시 예에 따르면, 운영 체제의 운용 방법은 상기 프로세스와 다른 프로세스를 실행시키는 동작을 더 포함하고, 상기 다른 프로세스를 실행시키는 동작은, 상기 코어들 중 지정된 적어도 하나의 코어를 제외한 다른 적어도 하나의 코어를 이용하여, 상기 다른 프로세스를 실행시키는 동작을 포함할 수 있다.
도 4는 일 실시 예에 따른 운영 체제의 운용에 따른 코어별 태스크의 할당 상태를 설명하기 위한 도면이다.
도 4를 참조하면, 전자 장치(101)의 프로세서(120)는 복수 개의 코어들(예: 제1 코어(411), 제2 코어(412), 제3 코어(413), 제4 코어(414), 제5 코어(415), 제6 코어(416), 제7 코어(417), 또는 제8 코어(418))을 포함할 수 있다.
도 4를 보면, 프로세스를 처리할 코어를 한정하는 경우 부팅 시간이 단축될 수 있음을 확인할 수 있다. 예컨대, 도 4의 상단 그래프는 프로세스를 처리할 코어를 한정하지 않은 경우, 코어별 태스크(또는 프로세스)의 할당 상태를 나타내고, 도 4의 하단 그래프는 자이고트 프로세스(431)를 제외한 나머지 프로세스를 처리할 코어(예: 저성능 코어(또는 리틀 코어(little core)))를 한정한 경우, 코어별 태스크의 할당 상태를 나타낸다.
도 4의 하단 그래프를 보면, 자이고트 프로세스(431)는 모든 코어들에서 수행되는 반면에, 다른 프로세스들(예: 제1 프로세스(432), 제2 프로세스(433), 제3 프로세스(434), 제4 프로세스(435), 제5 프로세스(436), 제6 프로세스(437), 및 제7 프로세스(438))은 한정된 코어에서만 실행됨을 확인할 수 있다.
도 4에 도시된 바와 같이, 자이고트 프로세스(431)를 제외한 나머지 프로세스를 처리할 코어를 한정한 경우, 자이고트 프로세스(431)의 수행 완료 시간이 단축되어 결과적으로 부팅 시간이 단축될 수 있음을 확인할 수 있다.
도 5는 일 실시 예에 따른 운영 체제 운용 방법의 흐름도를 나타낸다.
도 5를 참조하면, 동작 510에서, 프로세서(예: 도 1의 프로세서(120))는 비휘발성 메모리(예: 도 1의 비휘발성 메모리(134))에 저장된 적어도 하나의 어플리케이션 프로그램의 클래스들 및 리소스들 중 적어도 하나를 휘발성 메모리(예: 도 1의 휘발성 메모리(132))에 프리로드하기 위한 프로세스 실행할 수 있다. 상기 프로세스는 예를 들면, 자이코트 프로세스일 수 있다.
동작 520에서, 프로세서(120)는 실행되는 프로세스에 대한 복수 개의 스레드를 생성할 수 있다.
동작 530에서, 프로세서(120)는 두 개 이상의 코어들에 복수 개의 스레드를 할당할 수 있다.
동작 540에서, 프로세서(120)는 두 개 이상의 코어들을 이용하여 복수 개의 스레드들을 병렬적으로 실행할 수 있다.
본 문서에 개시된 다양한 실시 예들에 따른 전자 장치는 다양한 형태의 장치가 될 수 있다. 전자 장치는, 예를 들면, 휴대용 통신 장치 (예: 스마트폰), 컴퓨터 장치, 휴대용 멀티미디어 장치, 휴대용 의료 기기, 카메라, 웨어러블 장치, 또는 가전 장치 중 적어도 하나를 포함할 수 있다. 본 문서의 실시 예에 따른 전자 장치는 전술한 기기들에 한정되지 않는다.
본 문서의 다양한 실시 예들 및 이에 사용된 용어들은 본 문서에 기재된 기술을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 해당 실시예의 다양한 변경, 균등물, 및/또는 대체물을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 구성 요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함할 수 있다. 본 문서에서, "A 또는 B", "A 및/또는 B 중 적어도 하나", "A, B 또는 C" 또는 "A, B 및/또는 C 중 적어도 하나" 등의 표현은 함께 나열된 항목들의 모든 가능한 조합을 포함할 수 있다. "제1", "제2", "첫째" 또는 "둘째" 등의 표현들은 해당 구성 요소들을, 순서 또는 중요도에 상관없이 수식할 수 있고, 한 구성 요소를 다른 구성 요소와 구분하기 위해 사용될 뿐 해당 구성 요소들을 한정하지 않는다. 어떤(예: 제1) 구성 요소가 다른(예: 제2) 구성 요소에 "(기능적으로 또는 통신적으로) 연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 상기 어떤 구성 요소가 상기 다른 구성 요소에 직접적으로 연결되거나, 다른 구성 요소(예: 제3 구성 요소)를 통하여 연결될 수 있다.
본 문서에서 사용된 용어 "모듈"은 하드웨어, 소프트웨어 또는 펌웨어로 구성된 유닛을 포함하며, 예를 들면, 로직, 논리 블록, 부품, 또는 회로 등의 용어와 상호 호환적으로 사용될 수 있다. 모듈은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는 최소 단위 또는 그 일부가 될 수 있다. 예를 들면, 모듈은 ASIC(application-specific integrated circuit)으로 구성될 수 있다.
본 문서의 다양한 실시 예들은 기기(machine)(예: 컴퓨터)로 읽을 수 있는 저장 매체(machine-readable storage media)(예: 내장 메모리(136) 또는 외장 메모리(138))에 저장된 명령어를 포함하는 소프트웨어(예: 프로그램(140))로 구현될 수 있다. 기기는, 저장 매체로부터 저장된 명령어를 호출하고, 호출된 명령어에 따라 동작이 가능한 장치로서, 개시된 실시 예들에 따른 전자 장치(예: 전자 장치(101))를 포함할 수 있다. 상기 명령이 프로세서(예: 프로세서(120))에 의해 실행될 경우, 프로세서가 직접, 또는 상기 프로세서의 제어 하에 다른 구성 요소들을 이용하여 상기 명령에 해당하는 기능을 수행할 수 있다. 명령은 컴파일러 또는 인터프리터에 의해 생성 또는 실행되는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장 매체는, 비일시적(non-transitory) 저장 매체의 형태로 제공될 수 있다. 여기서, '비일시적'은 저장 매체가 신호(signal)를 포함하지 않으며 실재(tangible)한다는 것을 의미할 뿐 데이터가 저장 매체에 반영구적 또는 임시적으로 저장됨을 구분하지 않는다.
일 실시 예에 따르면, 본 문서에 개시된 다양한 실시 예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory (CD-ROM))의 형태로, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 온라인으로 배포될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.
다양한 실시 예들에 따른 구성 요소(예: 모듈 또는 프로그램) 각각은 단수 또는 복수의 개체로 구성될 수 있으며, 전술한 해당 서브 구성 요소들 중 일부 서브 구성 요소가 생략되거나, 또는 다른 서브 구성 요소가 다양한 실시 예에 더 포함될 수 있다. 대체적으로 또는 추가적으로, 일부 구성 요소들(예: 모듈 또는 프로그램)은 하나의 개체로 통합되어, 통합되기 이전의 각각의 해당 구성 요소에 의해 수행되는 기능을 동일 또는 유사하게 수행할 수 있다. 다양한 실시 예들에 따른, 모듈, 프로그램 또는 다른 구성 요소에 의해 수행되는 동작들은 순차적, 병렬적, 반복적 또는 휴리스틱하게 실행되거나, 적어도 일부 동작이 다른 순서로 실행되거나, 생략되거나, 또는 다른 동작이 추가될 수 있다.

Claims (15)

  1. 전자 장치에 있어서,
    디스플레이;
    통신 회로;
    상기 디스플레이 및 상기 통신 회로와 전기적으로 연결되고, 복수 개의 코어들을 포함하는 프로세서;
    상기 프로세서와 전기적으로 연결된 휘발성 메모리; 및
    상기 프로세서와 전기적으로 연결된 비휘발성 메모리를 포함하고,
    상기 비휘발성 메모리는 적어도 하나의 어플리케이션 프로그램을 저장하도록 구성되고, 실행 시에, 상기 프로세서가,
    상기 적어도 하나의 어플리케이션 프로그램을 위하여, 상기 비휘발성 메모리에, 운영 체제의 공유된 클래스들 및/또는 리소스들을 프리로드(preload)하는 프로세스를 수행하도록 하는 인스트럭션들을 저장하고,
    상기 프로세스를 수행하는 동작은,
    상기 클래스들 및/또는 리소스들의 다수의 그룹들을, 상기 코어들 중 두 개 이상의 코어들에 할당하는 동작; 및
    상기 두 개 이상의 코어들을 이용하여, 상기 클래스들 및/또는 리소스들의 다수의 그룹들을 병렬적으로 상기 휘발성 메모리에 프리로드하는 동작을 포함하는 것을 특징으로 하는 전자 장치.
  2. 청구항 1에 있어서,
    상기 프로세스를 수행하는 동작은,
    상기 클래스들 및/또는 리소스들의 다수의 그룹들을 프리로드하는 동작이 선택된 시간 범위 내에 완료되지 않거나, 또는 오류가 생기면, 상기 클래스들 및/또는 리소스들의 다수의 그룹들을 순차적으로 프리로드하는 동작을 더 포함하는 것을 특징으로 하는 전자 장치.
  3. 청구항 1에 있어서,
    상기 운영 체제는 안드로이드 운영 체제이고,
    상기 프로세스는 자이고트(Zygote) 프로세스인 것을 특징으로 하는 전자 장치.
  4. 청구항 1에 있어서,
    상기 클래스들 및/또는 리소스들의 다수의 그룹들을 할당하는 동작은,
    프리로드를 위하여, 상기 클래스들 및/또는 리소스들의 다수의 리스트들을 제공하는 동작을 더 포함하는 것을 특징으로 하는 전자 장치.
  5. 청구항 4에 있어서,
    상기 다수의 그룹들을 할당하는 동작 전에 상기 두 개 이상의 코어들을 선택하는 동작을 더 포함하는 것을 특징으로 하는 전자 장치.
  6. 청구항 4에 있어서,
    상기 클래스들 및/또는 리소스들의 다수의 그룹들을 할당하는 동작은,
    상기 클래스들 및/또는 리소스들의 크기들 또는 종속성에 적어도 부분적으로 기반하여, 상기 클래스들 및/또는 리소스들을 그룹핑하는 동작을 포함하는 것을 특징으로 하는 전자 장치.
  7. 청구항 3에 있어서,
    상기 자이고트 프로세스는,
    프리로드 메소드(method)를 포함하는 자이고트 메인 메소드를 포함하고,
    상기 프리로드 메소드는,
    상기 클래스들 및/또는 리소스들의 다수의 그룹들을 상기 두 개 이상의 코어들에 할당하는 동작; 및
    상기 두 개 이상의 코어들을 이용하여, 상기 클래스들 및/또는 리소스들의 다수의 그룹들을 병렬적으로 상기 휘발성 메모리에 프리로드하는 동작을 포함하는 것을 특징으로 하는 전자 장치.
  8. 전자 장치에 있어서,
    복수 개의 코어들을 포함하는 프로세서;
    상기 프로세서와 전기적으로 연결된 휘발성 메모리; 및
    상기 프로세서와 전기적으로 연결되고, 적어도 하나의 어플리케이션 프로그램을 저장하는 비휘발성 메모리를 포함하고,
    상기 비휘발성 메모리는, 실행 시에, 상기 프로세서가,
    상기 적어도 하나의 어플리케이션 프로그램의 클래스들 및 리소스들 중 적어도 하나를 상기 휘발성 메모리에 프리로드하기 위한 프로세스를 실행시키도록 하는 인스트럭션들을 저장하고,
    상기 프로세스를 실행시키는 동작은,
    상기 프로세스에 대한 복수 개의 스레드들을 생성하는 동작;
    상기 코어들 중 두 개 이상의 코어들에 상기 스레드들을 할당하는 동작; 및
    상기 두 개 이상의 코어들을 이용하여, 상기 스레드들을 병렬적으로 실행시키는 동작을 포함하는 것을 특징으로 하는 전자 장치.
  9. 청구항 8에 있어서,
    상기 스레드들을 생성하는 동작은,
    상기 코어들의 개수 및 상기 코어들의 성능 중 적어도 하나에 기반하여 상기 스레드들의 개수를 결정하는 동작을 더 포함하는 것을 특징으로 하는 전자 장치.
  10. 청구항 8에 있어서,
    상기 스레드들을 생성하는 동작은,
    상기 클래스들 및 리소스들 각각의 크기, 및 상기 클래스들 및 리소스들 간의 종속 관계 중 적어도 하나에 기반하여 상기 스레드들을 생성하는 동작을 포함하는 것을 특징으로 하는 전자 장치.
  11. 청구항 8에 있어서,
    상기 프로세스를 실행시키는 동작은,
    상기 스레드들 중 어느 하나의 스레드의 수행 시간이 지정된 시간을 초과하는 경우, 상기 프로세스를 재실행시키는 동작을 더 포함하고,
    상기 프로세스를 재실행시키는 동작은,
    상기 프로세스를 하나의 스레드를 통해 순차적으로 실행시키는 동작을 포함하는 것을 특징으로 하는 전자 장치.
  12. 청구항 11에 있어서,
    상기 프로세스를 실행시키는 동작은,
    상기 스레드들 중 어느 하나의 스레드의 수행 시간이 상기 지정된 시간을 초과하는 경우, 상기 스레드를 통해 프리로드하려는 상기 클래스들 및 상기 리소스들 중 적어도 하나에 대한 정보를 상기 비휘발성 메모리에 저장하는 동작을 더 포함하는 것을 특징으로 하는 전자 장치.
  13. 청구항 12에 있어서,
    상기 프로세스를 실행시키는 동작은,
    상기 비휘발성 메모리에 저장된 상기 클래스들 및 상기 리소스들 중 적어도 하나에 대한 정보를 기반으로, 상기 프로세스를 순차적으로 실행할지 또는 병렬적으로 실행할지를 판단하는 동작을 더 포함하는 것을 특징으로 하는 전자 장치.
  14. 청구항 8에 있어서,
    상기 비휘발성 메모리는, 실행 시에, 상기 프로세서가,
    상기 프로세스와 다른 프로세스를 실행시키도록 하는 인스트럭션들을 더 저장하고,
    상기 다른 프로세스를 실행시키는 동작은,
    상기 코어들 중 지정된 적어도 하나의 코어를 제외한 다른 적어도 하나의 코어를 이용하여, 상기 다른 프로세스를 실행시키는 동작을 포함하는 것을 특징으로 하는 전자 장치.
  15. 복수 개의 코어들을 포함하는 프로세서를 구비한 전자 장치의 운영 체제의 운용 방법은,
    비휘발성 메모리에 저장된 적어도 하나의 어플리케이션 프로그램의 클래스들 및 리소스들 중 적어도 하나를 휘발성 메모리에 프리로드하기 위한 프로세스를 실행시키는 동작을 포함하고,
    상기 프로세스를 실행시키는 동작은,
    상기 프로세스에 대한 복수 개의 스레드들을 생성하는 동작;
    상기 코어들 중 두 개 이상의 코어들에 상기 스레드들을 할당하는 동작; 및
    상기 두 개 이상의 코어들을 이용하여, 상기 스레드들을 병렬적으로 실행시키는 동작을 포함하는 것을 특징으로 하는 운영 체제의 운용 방법.
PCT/KR2018/008162 2017-08-23 2018-07-19 운영 체제의 운용 방법 및 이를 지원하는 전자 장치 WO2019039741A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/641,177 US20200225992A1 (en) 2017-08-23 2018-07-19 Operating method of operating system and electronic device supporting same

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2017-0106852 2017-08-23
KR1020170106852A KR102372644B1 (ko) 2017-08-23 2017-08-23 운영 체제의 운용 방법 및 이를 지원하는 전자 장치

Publications (1)

Publication Number Publication Date
WO2019039741A1 true WO2019039741A1 (ko) 2019-02-28

Family

ID=65439515

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2018/008162 WO2019039741A1 (ko) 2017-08-23 2018-07-19 운영 체제의 운용 방법 및 이를 지원하는 전자 장치

Country Status (3)

Country Link
US (1) US20200225992A1 (ko)
KR (1) KR102372644B1 (ko)
WO (1) WO2019039741A1 (ko)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110688102A (zh) * 2019-09-29 2020-01-14 北京浪潮数据技术有限公司 捕获异步接口执行结果的方法、系统、装置及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102485935B1 (ko) 2018-02-23 2023-01-10 삼성전자주식회사 전자 장치 및 그의 동작 방법
KR20220109093A (ko) * 2021-01-28 2022-08-04 삼성전자주식회사 전자 장치 및 이의 제어 방법

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488495A (zh) * 2013-08-13 2014-01-01 广东欧珀移动通信有限公司 一种通过动态调整开机预加载资源加速开机的方法
CN104598254A (zh) * 2015-02-17 2015-05-06 福州瑞芯微电子有限公司 一种安卓系统快速开机的方法及装置
KR20170028930A (ko) * 2014-07-10 2017-03-14 하만인터내셔날인더스트리스인코포레이티드 운영 체제 스타트업 가속
KR20170032283A (ko) * 2014-07-10 2017-03-22 하만인터내셔날인더스트리스인코포레이티드 운영 체제 스타트업 가속
US20170132026A1 (en) * 2016-06-07 2017-05-11 Hisense Electric Co., Ltd. Apparatus and method for optimizing startup of embedded system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8296773B2 (en) * 2008-06-30 2012-10-23 International Business Machines Corporation Systems and methods for thread assignment and core turn-off for integrated circuit energy efficiency and high-performance
EP2813949B1 (en) * 2013-06-11 2019-08-07 ABB Schweiz AG Multicore processor fault detection for safety critical software applications
CN107783833B (zh) * 2016-08-25 2020-04-28 华为技术有限公司 一种终端后台应用程序的管理方法及装置
JP6903953B2 (ja) * 2017-03-02 2021-07-14 富士フイルムビジネスイノベーション株式会社 情報処理装置及びプログラム

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488495A (zh) * 2013-08-13 2014-01-01 广东欧珀移动通信有限公司 一种通过动态调整开机预加载资源加速开机的方法
KR20170028930A (ko) * 2014-07-10 2017-03-14 하만인터내셔날인더스트리스인코포레이티드 운영 체제 스타트업 가속
KR20170032283A (ko) * 2014-07-10 2017-03-22 하만인터내셔날인더스트리스인코포레이티드 운영 체제 스타트업 가속
CN104598254A (zh) * 2015-02-17 2015-05-06 福州瑞芯微电子有限公司 一种安卓系统快速开机的方法及装置
US20170132026A1 (en) * 2016-06-07 2017-05-11 Hisense Electric Co., Ltd. Apparatus and method for optimizing startup of embedded system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110688102A (zh) * 2019-09-29 2020-01-14 北京浪潮数据技术有限公司 捕获异步接口执行结果的方法、系统、装置及存储介质
CN110688102B (zh) * 2019-09-29 2022-03-22 北京浪潮数据技术有限公司 捕获异步接口执行结果的方法、系统、装置及存储介质

Also Published As

Publication number Publication date
KR102372644B1 (ko) 2022-03-17
KR20190021726A (ko) 2019-03-06
US20200225992A1 (en) 2020-07-16

Similar Documents

Publication Publication Date Title
WO2015115852A1 (en) Task scheduling method and apparatus
WO2021060836A1 (ko) 어플리케이션 실행 방법 및 장치
WO2019164205A1 (ko) 전자 장치 및 그의 동작 방법
WO2019039741A1 (ko) 운영 체제의 운용 방법 및 이를 지원하는 전자 장치
WO2021045428A1 (en) Method and apparatus for improving runtime performance after application update in electronic device
WO2019182335A1 (ko) 전자 장치 및 전자 장치의 업데이트 제어 방법
WO2020166894A1 (en) Electronic device and method for recommending word in same
WO2020162715A1 (en) Electronic device, storage medium, and method for process scheduling
WO2019045255A1 (ko) 어플리케이션 시작 방법 및 이를 구현하는 전자 장치
WO2020153817A1 (en) Method for controlling display and electronic device thereof
EP4018303A2 (en) Method for preloading application and electronic device supporting same
WO2015034246A1 (en) Electronic device and method of processing user input by electronic device
WO2021006574A1 (en) Method and apparatus for managing application
WO2018128413A1 (en) Methods and systems for managing application installation
WO2021020711A1 (ko) 불량을 예측하는 전자 장치 및 그 전자 장치의 제어 방법
WO2019039706A1 (ko) 전자 장치 및 그의 데이터 운용 방법
WO2019160323A1 (ko) 어플리케이션과 관련된 데이터를 관리하기 위한 방법 및 그 전자 장치
WO2020116750A1 (en) Method and electronic device for initializing storage
WO2019172659A1 (ko) 부팅을 수행하는 전자 장치와 이의 동작 방법
WO2021157837A1 (en) Electronic device for scheduling based on heterogeneous multi-processor and operating method
WO2021206374A1 (ko) 전자 장치 및 이를 이용한 태스크 스케쥴링 방법
WO2022149771A1 (ko) 전자 장치 및 이를 이용한 메모리 관리 방법
WO2022154414A1 (ko) 전자 장치 및 전자 장치의 스토리지 운영 방법
WO2021162439A1 (en) Electronic device performing restoration on basis of comparison of constant value and control method thereof
WO2020209561A1 (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: 18848186

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

Country of ref document: EP

Kind code of ref document: A1