Electronic device and operating method thereof

By determining task priorities using a Cgroup module and monitoring system load in electronic devices, the method addresses inefficiencies in managing system load, enhancing resource usage efficiency and application performance.

WO2025116345A1PCT designated stage expired Publication Date: 2025-06-05SAMSUNG ELECTRONICS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2024/017432
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-30
Filing Date
2024-11-06
Publication Date
2025-06-05

AI Technical Summary

Technical Problem

Existing electronic devices face challenges in efficiently managing system load, particularly when executing applications with high resource requirements, leading to slow application entry speeds and increased background load issues.

Method used

An electronic device and method that determine the priority of tasks using a Cgroup module and monitor system load caused by processing of high-priority tasks, minimizing the load required for monitoring by allocating resources effectively.

Benefits of technology

This approach enhances the efficiency of system resource usage by minimizing the load needed for monitoring system load, thereby improving application entry speeds and overall system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2024017432_05062025_PF_FP_ABST
    Figure KR2024017432_05062025_PF_FP_ABST
Patent Text Reader

Abstract

An electronic device for monitoring a system load, according to embodiments of the present disclosure, may comprise: a memory for storing at least one instruction; and at least one processor for executing the at least one instruction. The at least one processor can: determine the priority of at least one task; determine whether to monitor the system load on the basis of the priority of the at least one task; and output monitoring data. The system load can include at least one from among CPU contention, IO wait, wake-up delay and system resource usage.
Need to check novelty before this filing date? Find Prior Art

Description

Electronic device and method of operation thereof

[0001] Various embodiments of the present disclosure relate to an electronic device for monitoring system load and a method of operating the same.

[0002] As electronic devices like smartphones become increasingly powerful, a variety of services are being offered through them. For example, applications that utilize AI (artificial intelligence) technology, such as Bixby and the Internet of Things (IoT), are increasingly being adopted. Applications used on these smart platforms can be called "applications."

[0003] Recently, as the performance of electronic devices has improved, application execution performance has also improved. However, in some cases, running resource-intensive applications can result in slower application launch times. Furthermore, application launch times can increase in proportion to the amount of time the device is used, and depending on the system's circumstances, high background loads can lead to slower application launch times. To address this issue, various optimization efforts have been recently implemented in the framework and kernel domains, one of which is scheduling. Scheduling, here, refers to the program function that determines when and how much limited system resources should be allocated to various tasks.

[0004] Various embodiments of the present disclosure can provide an electronic device and an operating method thereof that minimize the load required for monitoring system load by determining the priority of at least one task based on a Cgroup and monitoring the system load generated by processing at least one task with a high priority.

[0005] An electronic device for monitoring system load according to embodiments of the present disclosure may include a memory storing at least one command, and at least one processor executing the at least one command. The at least one processor may determine a priority of at least one task, determine whether to monitor system load based on the priority of the at least one task, and output monitoring data. The system load may include at least one of CPU contention, IO wait, wake-up delay, or usage of system resources.

[0006] In one embodiment, the at least one processor may determine, in the kernel area, whether the priority of the at least one task is higher than a preset reference priority using a Cgroup module, and, if the priority of the at least one task is higher than the reference priority, may generate monitoring data for the system load using a system monitoring module.

[0007] In one embodiment, the at least one processor may use the Cgroup module to determine the priorities of the first task and the second task, and, if the priority of at least one of the first task or the second task is higher than the reference priority, monitor the CPU contention between the first task and the second task.

[0008] In one embodiment, the at least one processor can identify a start of CPU contention when the second task preempts the head of a run queue where the first task that has maintained a running state is located, identify a termination of CPU contention when the first task is again located at the head of the run queue, and output CPU contention monitoring data including at least one of the start of CPU contention, the termination of CPU contention, the priority of the first task, or the priority of the second task.

[0009] In one embodiment, the at least one processor can determine the priority of the first task based on the first task generating a block IO request, and monitor the IO wait for the first task if the priority of the first task is higher than the reference priority.

[0010] In one embodiment, the at least one processor may identify an IO wait start when inserting the block IO request of the first task into an IO queue, transition the first task to a sleep state when there is a block IO request of a second task in the IO queue, transition the first task to a wake up state when the block IO request of the first task in the IO queue is processed, and identify an IO wait end when the first task is located at the head of a run queue, and output IO wait monitoring data including at least one of the IO wait start, the IO wait end, the priority of the first task, or the block IO request of the first task.

[0011] In one embodiment, the at least one processor may determine the priority of the first task based on a wake-up request of the first task in a sleep state, and monitor the wake-up delay for the first task if the priority of the first task is higher than or equal to the reference priority.

[0012] In one embodiment, the at least one processor can transition the first task to a wake up state, identify a wake up delay start when the first task is inserted into a run queue, identify a wake up delay end when the first task is located at the head of the run queue, and output wake up delay monitoring data including at least one of the wake up delay start, the wake up delay end, or the priority of the first task.

[0013] In one embodiment, the at least one processor may monitor the usage of the system resources corresponding to the at least one task when the priority of the at least one task is higher than the reference priority, and output system resource usage data including CPU usage within a predetermined time after system booting.

[0014] In one embodiment, the at least one processor may sort the system resources in order of highest usage using a red-black tree (RB tree).

[0015] In one embodiment, the at least one processor stores command information of the at least one task in a radix tree, updates the usage of the system resource at predetermined intervals, and, when a usage inquiry request for the system resource is made, searches the system resource usage data corresponding to the command information using the radix tree.

[0016] In one embodiment, the at least one processor can filter the monitoring data based on at least one of a type of the at least one task, the priority of the at least one task, a Cgroup to which the at least one task belongs, or the size of the system load, and output the filtered monitoring data based on a user input.

[0017] A method for monitoring system load according to embodiments of the present disclosure may include an operation of determining a priority of at least one task, an operation of determining whether to monitor system load based on the priority of the at least one task, and an operation of outputting monitoring data. The system load may include at least one of CPU contention, IO wait, wake-up delay, or usage of system resources.

[0018] In one embodiment, the operation of determining the priority of the at least one task may be performed in the kernel area, using the Cgroup module, to determine whether the priority of the at least one task is higher than a preset reference priority. The operation of determining whether to monitor the system load may be performed by using the system monitoring module to generate monitoring data on the system load if the priority of the at least one task is higher than the reference priority.

[0019] In one embodiment, the operation of determining the priority of the at least one task may include the operation of determining the priorities of the first task and the second task using the Cgroup module. The operation of determining whether to monitor the system load may include the operation of monitoring the CPU contention between the first task and the second task when the priority of at least one of the first task or the second task is higher than or equal to the reference priority. The operation of monitoring the CPU contention may include the operation of identifying the start of CPU contention when the second task preempts the head of a run queue where the first task that has maintained a running state is located, the operation of identifying the end of CPU contention when the first task is located at the head of the run queue again, and the operation of generating CPU contention monitoring data including at least one of the start of CPU contention, the end of CPU contention, the priority of the first task, or the priority of the second task.

[0020] In one embodiment, the operation of determining the priority of the at least one task may include the operation of determining the priority of the first task based on the first task generating a block IO request. The operation of determining whether to monitor the system load may include the operation of monitoring the IO wait for the first task if the priority of the first task is greater than or equal to the reference priority. The operation of monitoring the IO wait may include an operation of identifying an IO wait start when inserting the block IO request of the first task into an IO queue, an operation of transitioning the first task to a sleep state when there is a block IO request of a second task in the IO queue, an operation of transitioning the first task to a wake up state when the block IO request of the first task in the IO queue is processed, an operation of identifying an IO wait end when the first task is located at the head of a run queue, and an operation of generating IO wait monitoring data including at least one of the IO wait start, the IO wait end, the priority of the first task, or the block IO request of the first task.

[0021] In one embodiment, the operation of determining the priority of the at least one task may include the operation of determining the priority of the first task based on a wake-up request of the first task in a sleep state. The operation of determining whether to monitor the system load may include the operation of monitoring the wake-up delay for the first task when the priority of the first task is equal to or greater than the reference priority. The operation of monitoring the wake-up delay may include the operation of transitioning the first task to a wake-up state, the operation of identifying the start of a wake-up delay when the first task is inserted into a run queue, the operation of identifying the end of a wake-up delay when the first task is located at the head of the run queue, and the operation of generating wake-up delay monitoring data including at least one of the start of the wake-up delay, the end of the wake-up delay, or the priority of the first task.

[0022] In one embodiment, the operation of determining whether to monitor the system load may include an operation of monitoring the usage of the system resources corresponding to the at least one task if the priority of the at least one task is higher than the reference priority. The operation of monitoring the usage of the system resources may include an operation of generating system resource usage data including CPU usage within a predetermined time period after system booting.

[0023] In one embodiment, the operation of monitoring the usage of the system resources may use an RB tree to sort the system resources in order of highest usage.

[0024] In one embodiment, the operation of monitoring the usage of the system resource may include storing command information of the at least one task in a radix tree, updating the usage of the system resource at predetermined intervals, and, when a usage inquiry request for the system resource is made, using the radix tree, inquiring about the system resource usage data corresponding to the command information.

[0025] According to various embodiments of the present disclosure, an electronic device for monitoring system load and a method of operating the same can determine the priority of at least one task based on a Cgroup and monitor the system load generated by processing at least one task with a high priority.

[0026] Therefore, an electronic device for monitoring system load and a method of operating the same can increase the efficiency of system resource use by minimizing the load required for monitoring system load.

[0027] The effects that can be obtained from the exemplary embodiments of the present disclosure are not limited to the effects mentioned above, and other effects not mentioned can be clearly derived and understood by those skilled in the art to which the exemplary embodiments of the present disclosure pertain from the following description. In other words, unintended effects resulting from implementing the exemplary embodiments of the present disclosure can also be derived by those skilled in the art from the exemplary embodiments of the present disclosure.

[0028] FIG. 1 illustrates a block configuration of an electronic device within a network environment according to one embodiment.

[0029] FIG. 2 illustrates a block diagram of an electronic device according to one embodiment.

[0030] FIG. 3 illustrates a block configuration of at least one processor according to one embodiment.

[0031] Figure 4 illustrates an operation sequence of an electronic device according to one embodiment.

[0032] FIG. 5 illustrates a CPU contention monitoring process of an electronic device according to one embodiment.

[0033] FIG. 6 illustrates a CPU contention monitoring operation sequence of an electronic device according to one embodiment.

[0034] FIG. 7 illustrates an IO weight monitoring process of an electronic device according to one embodiment.

[0035] FIG. 8 illustrates an IO weight monitoring operation sequence of an electronic device according to one embodiment.

[0036] FIG. 9 illustrates a wake-up delay monitoring process of an electronic device according to one embodiment.

[0037] FIG. 10 illustrates a wake-up delay monitoring operation sequence of an electronic device according to one embodiment.

[0038] FIG. 11 illustrates a process for monitoring the usage of system resources of an electronic device according to one embodiment.

[0039] FIG. 12 illustrates a sequence of operations for monitoring the usage of system resources of an electronic device according to one embodiment.

[0040] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings so that those skilled in the art can easily implement the present disclosure. However, the present disclosure may be implemented in various different forms and is not limited to the embodiments described herein. In connection with the description of the drawings, the same or similar reference numerals may be used for identical or similar components. Furthermore, in the drawings and related descriptions, descriptions of well-known functions and configurations may be omitted for clarity and conciseness.

[0041] FIG. 1 illustrates a block configuration of an electronic device (101) within a network environment (100) according to one embodiment.

[0042] Referring to FIG. 1, in a network environment (100), an electronic device (101) may communicate with an electronic device (102) via a first network (198) (e.g., a short-range wireless communication network), or may communicate with at least one of an electronic device (104) or a server (108) via a second network (199) (e.g., a long-range wireless communication network). According to one embodiment, the electronic device (101) may communicate with the electronic device (104) via the server (108). According to one embodiment, the electronic device (101) may include a processor (120), a memory (130), an input module (150), an audio output module (155), a display module (160), an audio module (170), a sensor module (176), an interface (177), a connection terminal (178), a haptic module (179), a camera module (180), a power management module (188), a battery (189), a communication module (190), a subscriber identification module (196), or an antenna module (197). In some embodiments, the electronic device (101) may omit at least one of these components (e.g., the connection terminal (178)), or may have one or more other components added. In some embodiments, some of these components (e.g., the sensor module (176), the camera module (180), or the antenna module (197)) may be integrated into one component (e.g., the display module (160)).

[0043] The processor (120) may, for example, execute software (e.g., a program (140)) to control at least one other component (e.g., a hardware or software component) of the electronic device (101) connected to the processor (120) and perform various data processing or calculations. According to one embodiment, as at least a part of the data processing or calculations, the processor (120) may store commands or data received from other components (e.g., a sensor module (176) or a communication module (190)) in a volatile memory (132), process the commands or data stored in the volatile memory (132), and store result data in a non-volatile memory (134). According to one embodiment, the processor (120) may include a main processor (121) (e.g., a central processing unit or an application processor) or a secondary processor (123) (e.g., a graphics processing unit, a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor)) that can operate independently or together therewith. For example, if the electronic device (101) includes a main processor (121) and a secondary processor (123), the secondary processor (123) may be configured to use less power than the main processor (121) or to be specialized for a specified function. The secondary processor (123) may be implemented separately from the main processor (121) or as a part thereof.

[0044] The auxiliary processor (123) may control at least a portion of functions or states associated with at least one component (e.g., a display module (160), a sensor module (176), or a communication module (190)) of the electronic device (101), for example, on behalf of the main processor (121) while the main processor (121) is in an inactive (e.g., sleep) state, or together with the main processor (121) while the main processor (121) is in an active (e.g., application execution) state. In one embodiment, the auxiliary processor (123) (e.g., an image signal processor or a communication processor) may be implemented as a part of another functionally related component (e.g., a camera module (180) or a communication module (190)). In one embodiment, the auxiliary processor (123) (e.g., a neural network processing unit) may include a hardware structure specialized for processing artificial intelligence models. The artificial intelligence models may be generated through machine learning. This learning can be performed, for example, on the electronic device (101) itself where the artificial intelligence model is executed, or can be performed through a separate server (e.g., server (108)). The learning algorithm can include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but is not limited to the examples described above. The artificial intelligence model can include multiple artificial neural network layers.The artificial neural network may be one of a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), a deep Q-network, or a combination of two or more of the above, but is not limited to the examples described above. In addition to, or alternatively to, a hardware structure, an artificial intelligence model may include a software structure.

[0045] The memory (130) can store various data used by at least one component (e.g., processor (120) or sensor module (176)) of the electronic device (101). The data can include, for example, software (e.g., program (140)) and input data or output data for commands related thereto. The memory (130) can include volatile memory (132) or non-volatile memory (134).

[0046] The program (140) may be stored as software in the memory (130) and may include, for example, an operating system (142), middleware (144), or an application (146).

[0047] The input module (150) can receive commands or data to be used in a component of the electronic device (101) (e.g., a processor (120)) from an external source (e.g., a user) of the electronic device (101). The input module (150) can include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen).

[0048] The audio output module (155) can output audio signals to the outside of the electronic device (101). The audio output module (155) can include, for example, a speaker or a receiver. The speaker can be used for general purposes, such as multimedia playback or recording playback. The receiver can be used to receive incoming calls. In one embodiment, the receiver can be implemented separately from the speaker or as part of the speaker.

[0049] The display module (160) can visually provide information to an external party (e.g., a user) of the electronic device (101). The display module (160) may include, for example, a display, a holographic device, or a projector and a control circuit for controlling the device. In one embodiment, the display module (160) may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of a force generated by the touch.

[0050] The audio module (170) can convert sound into an electrical signal, or vice versa, convert an electrical signal into sound. According to one embodiment, the audio module (170) can acquire sound through the input module (150), output sound through the sound output module (155), or an external electronic device (e.g., electronic device (102)) (e.g., speaker or headphone) directly or wirelessly connected to the electronic device (101).

[0051] The sensor module (176) can detect the operating status (e.g., power or temperature) of the electronic device (101) or the external environmental status (e.g., user status) and generate an electrical signal or data value corresponding to the detected status. According to one embodiment, the sensor module (176) can include, for example, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor.

[0052] The interface (177) may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device (101) with an external electronic device (e.g., the electronic device (102)). In one embodiment, the interface (177) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.

[0053] The connection terminal (178) may include a connector through which the electronic device (101) may be physically connected to an external electronic device (e.g., electronic device (102)). According to one embodiment, the connection terminal (178) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).

[0054] A haptic module (179) can convert electrical signals into mechanical stimuli (e.g., vibration or movement) or electrical stimuli that a user can perceive through tactile or kinesthetic sensations. In one embodiment, the haptic module (179) can include, for example, a motor, a piezoelectric element, or an electrical stimulation device.

[0055] The camera module (180) can capture still images and videos. According to one embodiment, the camera module (180) may include one or more lenses, image sensors, image signal processors, or flashes.

[0056] The power management module (188) can manage power supplied to the electronic device (101). According to one embodiment, the power management module (188) can be implemented, for example, as at least a part of a power management integrated circuit (PMIC).

[0057] A battery (189) may power at least one component of the electronic device (101). In one embodiment, the battery (189) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.

[0058] The communication module (190) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device (101) and an external electronic device (e.g., electronic device (102), electronic device (104), or server (108)), and the performance of communication through the established communication channel. The communication module (190) may operate independently from the processor (120) (e.g., application processor) and may include one or more communication processors that support direct (e.g., wired) communication or wireless communication. According to one embodiment, 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). Among these communication modules, the corresponding communication module can communicate with an external electronic device (104) via a first network (198) (e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network (199) (e.g., a long-range communication network such as a legacy cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., a LAN or WAN)). These various types of communication modules can be integrated into a single component (e.g., a single chip) or implemented as multiple separate components (e.g., multiple chips). The wireless communication module (192) can verify or authenticate the electronic device (101) within a communication network such as the first network (198) or the second network (199) by using subscriber information (e.g., an international mobile subscriber identity (IMSI)) stored in the subscriber identification module (196).

[0059] The wireless communication module (192) can support 5G networks and next-generation communication technologies following the 4G network, such as NR access technology (new radio access technology). The NR access technology can support high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimization of terminal power and connection of multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low-latency communications)). The wireless communication module (192) can support, for example, a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate. The wireless communication module (192) can support various technologies for securing performance in a high-frequency band, such as beamforming, massive multiple-input and multiple-output (MIMO), full dimensional MIMO (FD-MIMO), array antenna, analog beam-forming, or large scale antenna. The wireless communication module (192) can support various requirements specified in the electronic device (101), an external electronic device (e.g., the electronic device (104)), or a network system (e.g., the second network (199)). According to one embodiment, the wireless communication module (192) can support a peak data rate (e.g., 20 Gbps or more) for eMBB realization, a loss coverage (e.g., 164 dB or less) for mMTC realization, or a U-plane latency (e.g., 0.5 ms or less for downlink (DL) and uplink (UL), or 1 ms or less for round trip) for URLLC realization.

[0060] The antenna module (197) can transmit or receive signals or power to or from an external device (e.g., an external electronic device). In one embodiment, the antenna module (197) may include an antenna including a radiator formed of a conductor or a conductive pattern formed on a substrate (e.g., a PCB). In one embodiment, the antenna module (197) may include a plurality of antennas (e.g., an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network, such as the first network (198) or the second network (199), may be selected from the plurality of antennas by, for example, the communication module (190). A signal or power may be transmitted or received between the communication module (190) and an external electronic device through the selected at least one antenna. In some embodiments, in addition to the radiator, another component (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as a part of the antenna module (197).

[0061] According to various embodiments, the antenna module (197) may form a mmWave antenna module. According to one embodiment, the mmWave antenna module may include a printed circuit board, an RFIC disposed on or adjacent a first side (e.g., a bottom side) of the printed circuit board and capable of supporting a designated high frequency band (e.g., a mmWave band), and a plurality of antennas (e.g., an array antenna) disposed on or adjacent a second side (e.g., a top side or a side side) of the printed circuit board and capable of transmitting or receiving signals in the designated high frequency band.

[0062] At least some of the above components can be interconnected and exchange signals (e.g., commands or data) with each other via a communication method between peripheral devices (e.g., a bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)).

[0063] According to one embodiment, commands or data may be transmitted or received between the electronic device (101) and an external electronic device (104) via a server (108) connected to a second network (199). Each of the external electronic devices (102 or 104) may be the same or a different type of device as the electronic device (101). According to one embodiment, all or part of the operations executed in the electronic device (101) may be executed in one or more of the external electronic devices (102, 104, or 108). For example, when the electronic device (101) is to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device (101) may, instead of or in addition to executing the function or service itself, request one or more external electronic devices to perform the function or at least a part of the service. One or more external electronic devices that receive the request may execute at least a portion of the requested function or service, or an additional function or service related to the request, and transmit the result of the execution to the electronic device (101). The electronic device (101) may process the result as is or additionally and provide it as at least a portion of a response to the request. For this purpose, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used, for example. The electronic device (101) may provide an ultra-low latency service by using distributed computing or mobile edge computing, for example. In another embodiment, the external electronic device (104) may include an Internet of Things (IoT) device. The server (108) may be an intelligent server utilizing machine learning and / or a neural network. According to one embodiment, the external electronic device (104) or the server (108) may be included in the second network (199).The electronic device (101) can be applied to intelligent services (e.g., smart home, smart city, smart car, or healthcare) based on 5G communication technology and IoT-related technology.

[0064] FIG. 2 illustrates a block configuration of an electronic device (200) according to one embodiment.

[0065] The electronic device (200) of the present disclosure may be implemented as a display device capable of displaying an image. For example, the electronic device (200) may include at least one of a TV, a computer, a smart phone, a tablet, a portable media player, a wearable device, a video wall, and an electronic picture frame. In addition, the electronic device may be implemented as various types of devices, such as an image processing device such as a set-top box without a display, a home appliance such as a refrigerator or a washing machine, and an information processing device such as a computer main body. For the convenience of explanation, the following description assumes that the electronic device is implemented as a TV; however, the electronic device of the present invention is not limited thereto, and may be applied to various electronic devices other than a TV, such as a set-top box.

[0066] Referring to FIG. 2, an electronic device (200) according to one embodiment of the present invention may include a memory (210) and a processor (220). The memory (210) may store data while power is supplied. The memory (210) may be a volatile storage component in which data is lost when power is not supplied. For example, the memory (210) may include at least one of a buffer or a random access memory (RAM).

[0067] The memory (100) of the present disclosure may include physical memory and virtual memory. When a program is executed, predetermined data may be loaded into the memory (210) for each task of a process corresponding to the program. The memory (210) may load data or software to be executed by the processor (220) from among data or software stored in storage.

[0068] Memory (210) may include a general memory area to which general processes are allocated, and a kernel memory area to which kernels such as operating systems are allocated. Each area of ​​general memory and kernel memory may be concentrated or distributed in a storage space of memory (210). In one embodiment, the processor (220) may allocate general processes to a free portion of kernel memory excluding the portion allocated to the operating system.

[0069] A process corresponding to a program may be allocated to memory (210) and operated. Meanwhile, the process may share some of the allocated memory with other processes. Therefore, even if one process is deleted, the shared memory may not be secured. Even if the program's execution is terminated, the process allocated to memory (210) may remain until it is deleted from memory (210).

[0070] Meanwhile, the memory (210) according to one embodiment of the present invention may be provided as an integral unit, may be different memories, and is not limited to either one.

[0071] The processor (220) can execute a program stored in storage. The processor (220) is implemented as at least one processor that loads at least a portion of a program from the storage where the program is stored into the memory (210) and executes the program loaded into the memory (210). If the processor (220) of the present embodiment is implemented in multiple units, these processors may be separated from each other or implemented in the form of multiple modules within a single IC.

[0072] For example, the processor (220) may include at least one of a CPU (Central Processing Unit), an AP (Application Processor), or a microprocessor. When the processor (220) executes a program stored in storage, predetermined data corresponding to each task of the corresponding process may be loaded into the memory (210), thereby causing the corresponding process to occupy a specific area of ​​the memory (210). The processor (220) may first load data related to the process into the memory (210) and execute the process based on the data loaded into the memory (210). For example, the process may be a work unit executed based on data or an application loaded into the memory (210). That is, one or more processes may be performed by the processor (220) processing data loaded into the memory (210) or executing an application loaded into the memory (210). In order for a process to be executed, data corresponding to the process may have to be loaded into the memory (210). For example, multitasking can be performed by having the processor (220) execute data for each process loaded into the memory (210) while data corresponding to multiple processes is loaded into the memory (210).

[0073] A processor (220) according to an embodiment of the present invention may be implemented by executing a software program including one or more commands stored in a storage medium that can be read by a machine (machine), such as an electronic device (200). For example, the processor (220) of the electronic device may call at least one command among the one or more commands stored from the storage medium and execute it. The one or more commands may include code generated by a compiler or code that can be executed by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory' only means that the storage medium is a tangible device and does not include a signal (e.g., electromagnetic wave), and this term does not distinguish between cases where data is stored semi-permanently and cases where it is stored temporarily in the storage medium.

[0074] As an example, the program executed by the processor (220) may be implemented as a computer program stored in a computer program product provided separately from the electronic device (200). In this case, the computer program product may include a memory storing instructions corresponding to the computer program and a processor. Accordingly, the electronic device may download and execute the computer program stored in the separate computer program product to perform the operations of the processor (220).

[0075] Additionally, as an example, the operations of the processor (220) may be implemented as a computer-readable program stored on a recording medium. The program, i.e., data stored on the recording medium, may be directly accessed and executed by the processor (220), or may be downloaded to an electronic device via a transmission medium implemented through a wired or wireless network interconnecting computer systems and executed, thereby performing the operations.

[0076] According to one embodiment of the present disclosure, the processor (220) may determine the priority of at least one task based on a Cgroup and monitor system load based on the priority. For example, the processor (220) may determine the priority of at least one task, monitor the system load generated by the processing of at least one task with a high priority based on the priority of the at least one task, and output monitoring data. Hereinafter, a specific process for monitoring system load by an electronic device of the present disclosure will be described with reference to FIGS. 3 to 12 .

[0077] FIG. 3 illustrates a block configuration of at least one processor (300) according to one embodiment, and FIG. 4 illustrates an operation sequence of an electronic device according to one embodiment.

[0078] Referring to FIGS. 3 and 4, the electronic device may determine a priority of at least one task (operation 410), determine whether to monitor a system load based on the priority of the at least one task (operation 420), and output monitoring data (MD) (operation 430). Processes and threads processed by the processor (300) may be scheduled as at least one task within the scheduler. For example, the at least one task may mean one scheduling unit of a predetermined process. The system load may include at least one of CPU contention, IO wait, wake-up delay, or usage of system resources. For example, the electronic device may monitor at least one of CPU contention, IO wait, wake-up delay, or usage of system resources based on the priority of the at least one task.

[0079] In one embodiment, the processor (300) may include at least one of a Cgroup module (310), a scheduler (320), a system monitoring module (330), or a data output module (340).

[0080] The Cgroup module (310) can provide a system resource allocation function. For example, the Cgroup module (310) can group at least one task and manage the use of system resources by group of at least one task. For example, the Cgroup module (310) can determine the priority of at least one task.

[0081] In one embodiment, the Cgroup module (310) can group at least one task into multiple control groups and allocate system resources to the multiple control groups. For example, the multiple control groups can include a foreground control group and a background control group. For example, the foreground control group can include applications running in the foreground. For example, the background control group can include applications or services running in the background. The foreground control group can be allocated a greater amount of CPU resources than the background control group. Therefore, while foreground applications can run smoothly, background applications or services may lack CPU resources and thus face limitations in running smoothly.

[0082] The scheduler (320) can allocate the processor's (300) time to at least one task. For example, the scheduler (320) can schedule a task to be processed based on the priority and execution readiness status of at least one task. For example, the scheduler (320) can include at least one of an RT scheduler or a CFS scheduler.

[0083] In one embodiment, the RT scheduler may be a scheduler that utilizes a Real-Time scheduling scheme to preempt CPU resources based on priority. Real-Time scheduling may be used for real-time tasks with the highest priority. Real-Time scheduling may utilize a FIFO (first in, first out) policy, which allocates CPU resources to the processes that are ready first, or a round-robin policy, which allows processes to use CPU resources in order.

[0084] In one embodiment, the CFS scheduler may be a scheduler that utilizes the CFS scheduling scheme to fairly allocate CPU resources. The CFS scheduling scheme may be used for tasks with lower priorities than real-time tasks. The CFS scheduling scheme may be used to allocate CPU resources to tasks (e.g., processes and threads) within each control group (Cgroup) based on CPU resource usage determined for each control group (Cgroup). The CFS scheduling scheme may utilize a round-robin policy.

[0085] The system monitoring module (330) can monitor the system load generated by the processing of at least one task. The system monitoring module (330) can generate monitoring data (MD). For example, the monitoring data (MD) can include at least one of CPU contention monitoring data, IO wait monitoring data, wake-up delay monitoring data, or system resource usage data. The system monitoring module (330) can transmit the monitoring data (MD) to the data output module (340).

[0086] The data output module (340) can output monitoring data (MD) to at least one of a user interface, a log file, or a database. For example, the data output module (340) can filter the monitoring data (MD) and output the filtered monitoring data (MD) based on user input.

[0087] For example, in operation 410, the electronic device may determine the priority of at least one task. The Cgroup module (310) included in the processor (300) may provide a distribution function of system resources. For example, the Cgroup module (310) may determine the priority of at least one of a predetermined process, a predetermined thread, or a predetermined task. The priority of the at least one task may include the importance of the at least one task and the interest of the at least one task. For example, in the kernel area, the Cgroup module (310) may determine whether the priority of the at least one task is higher than a preset reference priority. Here, the reference priority may be settable by a user input.

[0088] The Cgroup module (310) can group at least one task into multiple control groups and distribute system resources to the multiple control groups. For example, as shown in [Table 1] below, the multiple control groups can include at least one of a first control group, a second control group, a third control group, or a fourth control group.

[0089] [Table 1]

[0090]

[0091] The first control group may be a service control group. The second control group may be a foreground control group. The third control group may be a normal control group. The fourth control group may be a background control group. The priorities associated with system resource allocation (e.g., CPU resource allocation) may be higher for the second control group, the first control group, the third control group, and the fourth control group in that order. In one example, a higher priority may lead to a higher system resource allocation ratio (e.g., CPU resource allocation ratio). For example, a task included in the first control group may be allocated system resources at a lower rate than a task included in the second control group running in the foreground, but may be allocated system resources at a higher rate than a task included in the fourth control group running in the background.

[0092] The Cgroup module (310) can transmit priority data (PD) including the priority of at least one task to the scheduler (320). The Cgroup module (310) can transmit priority data (PD) including the priority of at least one task to the system monitoring module (330).

[0093] In one example, at operation 420, the electronic device may determine whether to monitor the system load based on the priority of at least one task. The system monitoring module (330) included in the processor (300) may receive priority data (PD) including the priority of at least one task from the Cgroup module (310). The system monitoring module (330) may receive load data (LD) required for processing at least one task from the scheduler (320). The system monitoring module (330) may determine whether to monitor the system load based on the priority of at least one task and the load data (LD). For example, the system monitoring module (330) may monitor the system load if the priority of at least one task is higher than a reference priority. In one embodiment, the reference priority may be a second priority. For example, if the reference priority is 2, the system monitoring module (330) can monitor the system load if at least one task is included in at least one of the first control group (e.g., service control group) or the second control group (e.g., foreground control group). For example, if the reference priority is 2, the system monitoring module (330) can not monitor the system load if at least one task is included in at least one of the third control group (e.g., normal control group) or the fourth control group (e.g., background control group). The system monitoring module (330) can monitor at least one of CPU contention, IO wait, wake-up delay, or system resource usage based on the priority of at least one task. The system monitoring module (330) can generate monitoring data (MD) including at least one of CPU contention monitoring data, IO wait monitoring data, wake-up delay monitoring data, or system resource usage data.The system monitoring module (330) can transmit monitoring data (MD) to the data output module (340).

[0094] According to an example, in operation 430, the electronic device may output monitoring data (MD). The data output module (340) included in the processor (300) may receive the monitoring data (MD) from the system monitoring module (330). The data output module (340) may output the monitoring data (MD) to at least one of a user interface, a log file, or a database. The data output module (340) may data filter the monitoring data (MD). For example, the data output module (340) may data filter the monitoring data (MD) based on at least one of the type of the at least one task, the priority of the at least one task, the Cgroup to which the at least one task belongs, or the size of the system load. For example, the monitoring data (MD) may be data filtered based on whether the at least one task is a process or a thread. For example, the monitoring data (MD) may be data filtered based on the type of the scheduler (320) of the scheduler (320) (e.g., RT scheduler, CFS scheduler). For example, the monitoring data (MD) may be data filtered based on a delay time according to the system load. The data output module (340) may output the filtered monitoring data (MD) based on a user input. For example, the data output module (340) may output the filtered monitoring data (MD) based on the user input to at least one of a user interface, a log file, or a database.

[0095] In this way, an electronic device according to one embodiment of the present disclosure can determine the priority of at least one task based on a Cgroup, monitor the system load generated by the processing of at least one high-priority task, and output monitoring data (MD). Accordingly, the electronic device according to the present disclosure can increase the efficiency of system resource utilization by minimizing the burden required to monitor the system load.

[0096] FIG. 5 illustrates a CPU contention monitoring process of an electronic device according to one embodiment, and FIG. 6 illustrates a CPU contention monitoring operation sequence of an electronic device according to one embodiment.

[0097] Referring to FIGS. 5 and 6, the electronic device may determine the priorities of the first task and the second task using the Cgroup module (operation 610), and if the priority of at least one of the first task or the second task is higher than the reference priority, monitor the CPU contention between the first task and the second task (operations 620 to 640), and output CPU contention monitoring data (operation 650).

[0098] According to an example, in operation 610, the electronic device may determine the priorities of the first task and the second task using the Cgroup module (e.g., the Cgroup module (310) of FIG. 3). The scheduler (520) may include a plurality of run queues corresponding to a plurality of cores. For example, the scheduler (520) may include an N-th run queue corresponding to an N-th core. Based on the scheduling of the scheduler (520), a plurality of tasks may be sequentially positioned in the N-th run queue. For example, the first task (e.g., Task 31 (503)) may be positioned at the head of the N-th run queue, thereby preempting the N-th core. Here, CPU contention may occur between the first task (e.g., Task 31 (503)) and the second task (e.g., Task X (504)). CPU contention may refer to system resource competition in which multiple tasks (e.g., processes or threads) compete to occupy system resources (e.g., CPU resources). The Cgroup module included in the processor (300) may determine the priorities of a first task (e.g., Task 31 (503)) and a second task (e.g., Task X (504)) that are targets of CPU contention. The priorities may include the importance and interest of the first task (e.g., Task 31 (503)) and the second task (e.g., Task X (504)).

[0099] For example, in operation 620, the electronic device may determine whether the priorities of the first task (e.g., Task 31 (503)) and the second task (e.g., Task X (504)) are higher than or equal to a preset reference priority. For example, in the kernel area, the Cgroup module may determine whether the priorities of the first task (e.g., Task 31 (503)) and the second task (e.g., Task X (504)) are higher than or equal to a preset reference priority. Here, the reference priority may be settable by a user input. The Cgroup module may transmit priority data (PD) including the priorities of the first task (e.g., Task 31 (503)) and the second task (e.g., Task X (504)) to the scheduler (520). The Cgroup module can transmit priority data (PD) including priorities of a first task (e.g., Task 31 (503)) and a second task (e.g., Task X (504)) to the system monitoring module (530). The system monitoring module (530) can monitor CPU contention between the first task (e.g., Task 31 (503)) and the second task (e.g., Task X (504)) when the priorities of the first task (e.g., Task 31 (503)) and the second task (e.g., Task X (504)) are higher than a preset reference priority.

[0100] For example, in operation 630, the electronic device may identify the start of CPU contention when the second task (e.g., Task X (504)) preempts the Nth core (501). For example, the system monitoring module (530) may identify the start of CPU contention when the second task (e.g., Task X (504)) preempts the head of the run queue (502) where the first task (e.g., Task 31 (503)) that has maintained a running state is located. For example, the system monitoring module (530) may generate CPU contention monitoring data including the start of CPU contention.

[0101] In one example, at operation 640, the electronic device may identify the end of contention when the first task (e.g., Task 31 (503)) preempts the Nth core (501) again. For example, the system monitoring module (530) may monitor the movement of multiple tasks within the run queue (502) and identify the end of CPU contention when the first task (e.g., Task 31 (503)) is again positioned at the head of the run queue (502). For example, the system monitoring module (530) may generate CPU contention monitoring data including the end of CPU contention.

[0102] In one example, at operation 650, the electronic device may output CPU contention monitoring data. For example, a data output module (e.g., data output module (340) of FIG. 3) may output CPU contention monitoring data including at least one of the CPU contention start, the CPU contention end, the priority of the first task, or the priority of the second task. For example, the data output module may filter the CPU contention monitoring data based on at least one of the type of the at least one task, the priority of the at least one task, the Cgroup to which the at least one task belongs, or the size of the system load. For example, the data output module may output the filtered CPU contention monitoring data to at least one of a user interface, a log file, or a database based on a user input.

[0103] FIG. 7 illustrates an IO weight monitoring process of an electronic device according to one embodiment, and FIG. 8 illustrates an IO weight monitoring operation sequence of an electronic device according to one embodiment.

[0104] Referring to FIGS. 7 and 8, the electronic device determines the priority of the first task (operation 810) based on the first task generating a block IO request (702), and if the priority of the first task is equal to or higher than the reference priority, monitors the IO wait for the first task (operations 820 to 860), and outputs IO wait monitoring data (operation 870).

[0105] For example, in operation 810, the electronic device may determine the priority of the first task based on the first task generating a block IO request (702). The first task may generate the block IO request (702) based on the file system (701). In the process of processing the block IO request (702), IO wait may occur depending on the difference between the processing speed of the disk (704) and the processing speed of the CPU. The Cgroup module included in the processor (300) may determine the priority of the first task that generated the block IO request (702). The priority may include the importance and interest of the first task.

[0106] For example, in operation 820, the electronic device may determine whether the priority of the first task is higher than or equal to a preset reference priority. For example, in the kernel area, the Cgroup module may determine whether the priority of the first task is higher than or equal to a preset reference priority. Here, the reference priority may be settable by a user input. The Cgroup module may transmit priority data (PD) including the priority of the first task to the scheduler (720). The Cgroup module may transmit priority data (PD) including the priority of the first task to the system monitoring module (730). If the priority of the first task is higher than or equal to the preset reference priority, the system monitoring module (730) may monitor the IO wait for the first task.

[0107] In one example, in operation 830, the electronic device may identify an IO wait start when inserting the block IO request (702) of the first task into the IO queue (703). For example, the system monitoring module (730) may identify an IO wait start when the block IO request (702) of the first task is inserted into the IO queue (703). For example, the system monitoring module (730) may generate IO wait monitoring data including an IO wait start.

[0108] For example, in operation 840, if there is a block IO request (702) of a second task in the IO queue (703), the electronic device may transition the first task to a sleep state. For example, the block IO request (702) of the second task may have already been inserted into the IO queue (703) before the block IO request (702) of the first task. In this case, the IO queue (703) may transmit a sleep request for the first task to the scheduler (720). The scheduler (720) may transition the first task to a sleep state based on the sleep request for the first task.

[0109] In one example, at operation 850, when the electronic device processes the block IO request (702) of the first task of the IO queue (703), the electronic device may transition the first task to a wake-up state. For example, when the IO queue (703) processes the block IO request (702) of the first task, the IO queue (703) may transmit a wake-up request for the first task to the scheduler (720). The scheduler (720) may transition the first task to the wake-up state based on the wake-up request for the first task.

[0110] For example, in operation 860, the electronic device may identify an IO wait termination when the first task occupies the core to which the first task belongs. For example, the system monitoring module (730) may identify an IO wait termination when it is located at the head of a run queue. For example, the system monitoring module (730) may generate IO wait monitoring data including an IO wait termination.

[0111] In one example, at operation 870, the electronic device may output IO wait monitoring data. For example, a data output module (e.g., data output module (340) of FIG. 3) may output IO wait monitoring data including at least one of the IO wait termination, the priority of the first task, or the block IO request (702) of the first task. For example, the data output module may filter the IO wait monitoring data based on at least one of the type of the at least one task, the priority of the at least one task, the Cgroup to which the at least one task belongs, or the size of the system load. For example, the data output module may output the filtered IO wait monitoring data to at least one of a user interface, a log file, or a database based on a user input.

[0112] FIG. 9 illustrates a wake-up delay monitoring process of an electronic device according to one embodiment, and FIG. 10 illustrates a wake-up delay monitoring operation sequence of an electronic device according to one embodiment.

[0113] Referring to FIGS. 9 and 10, the electronic device may determine the priority of a first task in a sleep state based on a wake-up request of the first task (operation 1010), and if the priority of the first task is equal to or higher than the reference priority, monitor the wake-up delay for the first task (operations 1020 to 1050), and output wake-up delay monitoring data (operation 1060). The wake-up delay may refer to a time delay occurring during a task switching process. For example, the wake-up delay may refer to a time delay from when a wake-up request for at least one task occurs until a context switch is completed.

[0114] For example, in operation 1010, the electronic device may determine the priority of a first task in a sleep state based on a wake-up request of the first task. When the first task is in a sleep state, the scheduler (921) may receive a wake-up request for the first task based on a scheduling request (e.g., signal input, event occurrence, unlock) of a second task. The Cgroup module included in the processor (300) may determine the priority of the first task in a sleep state. The priority may include the importance and interest of the first task.

[0115] For example, in operation 1020, the electronic device may determine whether the priority of the first task is higher than or equal to a preset reference priority. For example, in the kernel area, the Cgroup module may determine whether the priority of the first task is higher than or equal to a preset reference priority. Here, the reference priority may be settable by a user input. The Cgroup module may transmit priority data (PD) including the priority of the first task to the scheduler (921). The Cgroup module may transmit priority data (PD) including the priority of the first task to a system monitoring module (e.g., the system monitoring module (330) of FIG. 3). If the priority of the first task is higher than or equal to the preset reference priority, the system monitoring module may monitor the wake-up delay for the first task.

[0116] According to an example, in operations 1030 and 1040, the electronic device may transition the first task to a wake-up state, and identify the start of a wake-up delay when the first task is inserted into a run queue. For example, the scheduler (921) may transition the first task to a wake-up state based on a wake-up request. The first task transitioned to the wake-up state may be inserted into a run queue. The system monitoring module may identify the start of a wake-up delay when the first task is inserted into the run queue (e.g., t1). For example, the system monitoring module may generate wake-up delay monitoring data including the start of a wake-up delay.

[0117] In one example, at operation 1050, the electronic device may identify the end of the wake-up delay when the first task occupies the core to which the first task belongs. For example, the system monitoring module may identify the end of the wake-up delay when the first task is located at the head of the run queue. For example, when the first task is located at the head of the run queue and occupies the core (e.g., t2), a switch of at least one task may occur in the scheduler (922). For example, the system monitoring module may generate wake-up delay monitoring data including the end of the wake-up delay.

[0118] In one example, at operation 1060, the electronic device may output wake-up delay monitoring data. For example, a data output module (e.g., data output module (340) of FIG. 3) may output wake-up delay monitoring data including at least one of the wake-up delay start, the wake-up delay end, or the priority of the first task. For example, the data output module may filter the wake-up delay monitoring data based on at least one of the type of the at least one task, the priority of the at least one task, the Cgroup to which the at least one task belongs, or the size of the system load. For example, the data output module may output the filtered wake-up delay monitoring data to at least one of a user interface, a log file, or a database based on a user input.

[0119] FIG. 11 illustrates a process for monitoring the usage of system resources of an electronic device according to one embodiment, and FIG. 12 illustrates an operation sequence for monitoring the usage of system resources of an electronic device according to one embodiment.

[0120] Referring to FIGS. 11 and 12, the electronic device can determine the priority of at least one task (operation 1210), and if the priority of the at least one task is higher than the reference priority, monitor the usage of the system resource corresponding to the at least one task (operations 1220 and 1230), and output system resource data (operation 1240).

[0121] According to an example, in operation 1210, the electronic device may determine the priority of at least one task using the Cgroup module (1110). For example, the Cgroup module (1110) included in the processor (300) may determine the priority of at least one of a predetermined process, a predetermined thread, or a predetermined task. The priority of the at least one task may include the importance of the at least one task and the interest of the at least one task. For example, in the kernel area, the Cgroup module (1110) may determine whether the priority of the at least one task is higher than or equal to a preset reference priority. Here, the reference priority may be settable by a user input. The Cgroup module (1110) may transmit priority data (PD) including the priority of the at least one task to a scheduler (e.g., the scheduler (320) of FIG. 3).

[0122] For example, in operation 1220, the electronic device may determine whether the priority of at least one task is higher than a preset reference priority. For example, in the kernel area, the Cgroup module (1110) may determine whether the priority of at least one task is higher than a preset reference priority. Here, the reference priority may be settable by a user input. The Cgroup module (1110) may transmit priority data (PD) including the priority of at least one task to the scheduler. The Cgroup module (1110) may transmit priority data (PD) including the priority of at least one task to the system monitoring module (1130).

[0123] For example, in operation 1230, the electronic device may monitor the usage of the system resources corresponding to the at least one task if the priority of the at least one task is higher than the reference priority. For example, the system monitoring module (1130) may monitor the CPU usage corresponding to the at least one task if the priority of the at least one task is higher than the reference priority. For example, the structure entity (1150) included in the processor (300) may store the CPU usage by the at least one task in a predetermined time unit.

[0124] In one embodiment, the processor (300) may sort the system resources in order of highest usage using an RB tree (Red Black Tree). For example, the structure entity (1150) may sort CPU usage in order of highest usage using an RB tree.

[0125] In one embodiment, the processor (300) may use a radix tree to query system resource usage data. For example, the structure entity (1150) may store command information (COMMAND) of the at least one task in the radix tree. The system monitoring module (1130) may use the structure entity (1150) to update the CPU usage at predetermined intervals. When a request for querying CPU usage for the system resource is made, the structure entity (1150) may use the radix tree to query the system resource usage data (e.g., CPU usage data) corresponding to the command information. For example, the structure entity (1150) may query the CPU usage within a predetermined time after system booting (e.g., cold boot CPU usage).

[0126] In one example, at operation 1240, the electronic device may output system resource usage data. For example, a data output module (e.g., data output module (340) of FIG. 3) may output system resource usage data including CPU usage within a predetermined time period after system booting. For example, the data output module may output the system resource usage data to at least one of a user interface, a log file, or a database.

[0127] In this way, an electronic device according to one embodiment of the present disclosure can determine the priority of at least one task based on a Cgroup, monitor the system load generated by the processing of at least one high-priority task, and output monitoring data. Accordingly, the electronic device according to the present disclosure can increase the efficiency of system resource utilization by minimizing the burden required to monitor system load.

[0128] However, since this has been described above, a duplicate explanation will be omitted.

[0129] Electronic devices according to the various embodiments disclosed in this document may take various forms. Electronic devices may include, for example, portable communication devices (e.g., smartphones), computer devices, portable multimedia devices, portable medical devices, cameras, wearable devices, or home appliances. Electronic devices according to the embodiments of this document are not limited to the aforementioned devices.

[0130] The various embodiments of this document and the terminology used herein are not intended to limit the technical features described in this document to specific embodiments, but should be understood to include various modifications, equivalents, or substitutes of the embodiments. For example, a component expressed in the singular should be understood to include plural components unless the context clearly indicates only the singular. It should be understood that the term "and / or" used herein encompasses any and all possible combinations of one or more of the listed items. The terms "comprise," "have," "consist of," and the like used herein are intended to specify that a feature, component, part, or combination thereof described in this disclosure exists, and the use of such terms does not exclude the possibility of the presence or addition of one or more other features, components, parts, or combinations thereof. In this document, phrases such as "A or B", "at least one of A and B", "at least one of A or B", "A, B, or C", "at least one of A, B, and C", and "at least one of A, B, or C" can each include any one of the items listed together in that phrase, or all possible combinations thereof. Terms such as "first", "second", or "first" or "second" may be used merely to distinguish the corresponding component from other corresponding components and do not limit the corresponding components in any other respect (e.g., importance or order).

[0131] The term "part" or "module" used in various embodiments of this document may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit, for example. The "part" or "module" may be an integrally configured component or a minimum unit or part of the component that performs one or more functions. For example, according to one embodiment, the "part" or "module" may be implemented in the form of an application-specific integrated circuit (ASIC).

[0132] The term “if” as used in various embodiments of this document may be interpreted to mean “when”, “when”, “in response to determining”, or “in response to detecting”, depending on the context. Similarly, “if it is determined that” or “if ~ is detected” may be interpreted to mean “upon determining”, “in response to determining”, or “upon detecting”, or “in response to detecting”, depending on the context.

[0133] The program executed by the electronic device (200) described in this document may be implemented as hardware components, software components, and / or a combination of hardware components and software components. The program may be executed by any system capable of executing computer-readable instructions.

[0134] Software may include a computer program, code, instructions, or a combination of one or more of these, which can configure a processing device to perform a desired operation or command the processing device, either independently or collectively. Software may be implemented as a computer program including instructions stored on a computer-readable storage medium. Examples of the computer-readable storage medium include magnetic storage media (e.g., read-only memory (ROM), random-access memory (RAM), floppy disks, hard disks, etc.) and optical reading media (e.g., CD-ROMs, digital versatile discs (DVDs)). The computer-readable storage medium may be distributed across network-connected computer systems so that the computer-readable code can be stored and executed in a distributed manner. Computer programs can be distributed online (e.g., by download or upload) through an application store (e.g., Play Store™) or directly between two user devices (e.g., smartphones). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily created on a device-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.

[0135] According to various embodiments, each component (e.g., a module or a program) of the above-described components may include one or more entities, and some of the entities may be separated and placed in other components. According to various embodiments, one or more components or operations of the aforementioned components may be omitted, or one or more other components or operations may be added. Alternatively or additionally, a plurality of components (e.g., a module or a program) may be integrated into a single component. In such a case, the integrated component may perform one or more functions of each of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to the integration. According to various embodiments, the operations performed by a module, program, or other component may be executed sequentially, in parallel, iteratively, or heuristically, or one or more of the operations may be executed in a different order, omitted, or one or more other operations may be added.

Claims

1. In an electronic device for monitoring system load, a memory storing at least one instruction; and comprising at least one processor executing at least one instruction; At least one processor of the above, Determine the priority of at least one task, determining whether to monitor system load based on the priority of at least one task; Output monitoring data, The above system load is, Including at least one of CPU contention, IO wait, wake up delay, or system resource usage. Electronic devices.

2. In paragraph 1, At least one processor of the above, In the kernel area, the Cgroup module is used to determine whether the priority of at least one task is higher than a preset reference priority, If the priority of at least one task is higher than the reference priority, monitoring data for the system load is generated using the system monitoring module. Electronic devices.

3. In paragraph 2, At least one processor of the above, Using the above Cgroup module, the priorities of the first and second tasks are determined, If the priority of at least one of the first task or the second task is higher than the reference priority, monitoring the CPU contention between the first task and the second task. Electronic devices.

4. In paragraph 3, At least one processor of the above, When the second task preempts the head of the run queue where the first task that has maintained the running state is located, the start of CPU contention is identified, If the first task is again located at the head of the run queue, the CPU contention is identified as terminated, Outputting CPU contention monitoring data including at least one of the CPU contention start, the CPU contention end, the priority of the first task, or the priority of the second task. Electronic devices.

5. In paragraph 2, At least one processor of the above, Based on the first task generating a block IO request, the priority of the first task is determined, If the priority of the first task is higher than or equal to the reference priority, the IO wait for the first task is monitored. Electronic devices.

6. In paragraph 5, At least one processor of the above, When inserting the block IO request of the first task into the IO queue, identify the start of the IO wait, If there is a block IO request of the second task in the above IO queue, the first task is switched to a sleep state, When the block IO request of the first task of the above IO queue is processed, the first task is switched to a wake up state, If the first task above is located at the head of the run queue, identify the IO wait termination, Outputting IO wait monitoring data including at least one of the IO wait start, the IO wait end, the priority of the first task, or the block IO request of the first task. Electronic devices.

7. In paragraph 2, At least one processor of the above, The priority of the first task is determined based on a wake-up request of the first task in a sleep state, If the priority of the first task is higher than or equal to the reference priority, monitoring the wake-up delay for the first task. Electronic devices.

8. In paragraph 7, At least one processor of the above, Transition the above first task to the wake up state, When the above first task is inserted into the run queue, the wake-up delay start is identified, If the first task is located at the head of the run queue, the end of the wake-up delay is identified, Outputting wakeup delay monitoring data including at least one of the wakeup delay start, the wakeup delay end, or the priority of the first task; Electronic devices.

9. In any one of paragraphs 2 to 8, At least one processor of the above, If the priority of the at least one task is higher than the reference priority, the usage of the system resource corresponding to the at least one task is monitored, Outputs system resource usage data, including CPU usage within a given amount of time since system boot. Electronic devices.

10. In paragraph 9, At least one processor of the above, Using the RB tree, the above system resources are sorted in order of highest usage. Electronic devices.

11. In paragraph 9, At least one processor of the above, Store command information of at least one of the above tasks in a radix tree, Update the usage of the above system resources at regular intervals, When requesting usage inquiry for the above system resources, the system resource usage data corresponding to the command information is retrieved using the above radix tree. Electronic devices.

12. In any one of paragraphs 1 to 11, At least one processor of the above, Filtering the monitoring data based on at least one of the type of the at least one task, the priority of the at least one task, the Cgroup to which the at least one task belongs, or the size of the system load; Outputting the above filtered monitoring data based on user input, Electronic devices.

13. A method for monitoring system load, An action that determines the priority of at least one task; An operation for determining whether to monitor system load based on the priority of at least one task; and Contains actions that output monitoring data, The above system load is, Including at least one of CPU contention, IO wait, wake up delay, or system resource usage. method.

14. In paragraph 13, The operation of determining the priority of at least one of the above tasks comprises: In the kernel area, the Cgroup module is used to determine whether the priority of at least one task is higher than a preset reference priority, The action that determines whether to monitor the above system load is: If the priority of at least one task is higher than the reference priority, monitoring data for the system load is generated using the system monitoring module. method.

15. In paragraph 14, The operation of determining the priority of at least one of the above tasks comprises: Including an operation of determining the priorities of the first task and the second task using the Cgroup module, The action that determines whether to monitor the above system load is: An operation of monitoring the CPU contention between the first task and the second task, if the priority of at least one of the first task or the second task is higher than the reference priority, The above CPU contention monitoring operation is: An operation for identifying the start of CPU contention when the second task preempts the head of the run queue where the first task, which has maintained a running state, is located; An operation for identifying the termination of CPU contention when the first task is again positioned at the head of the run queue; and An operation comprising generating CPU contention monitoring data including at least one of the CPU contention start, the CPU contention end, the priority of the first task, or the priority of the second task. method.

Citation Information

Patent Citations

  • Method of configuring Linux kernel for supporting realtime performance and test method for supporting realtime performance

    KR1020060062305A

  • Computing system and method

    KR1020110080735A

  • electronic apparatus for processing task, method thereof, and computer-readable medium

    KR102520596B1

  • Load control and overload protection for a real-time communication system

    US6438551B1

  • Consolidation and reduction of usage data

    US6996807B1