Electronic device and method for communicating between plurality of processes, and storage medium
A control process optimizes data transmission between multiple processes by identifying and prioritizing associated processes, reducing repetitive operations and processor load, thus improving electronic device performance.
Patent Information
- Application Number
- PCT/KR2025/004812
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-13
- Filing Date
- 2025-04-09
- Publication Date
- 2026-01-22
AI Technical Summary
Existing technologies face inefficiencies in data transmission between multiple processes due to repetitive operations, increased processor load, and prolonged transmission times, particularly in scenarios where data is transmitted to processes with associated processes, leading to degraded performance.
Implementing a control process that identifies associated processes and sets a data transmission order based on these associations, minimizing repetitive operations by directly communicating with the control process and optimizing data transmission through linked lists and hash maps.
This approach reduces unnecessary operations, lowers processor load, and shortens data transmission times, thereby enhancing the overall performance of electronic devices by streamlining communication between multiple processes.
Smart Images

Figure KR2025004812_22012026_PF_FP_ABST
Abstract
Description
Electronic devices, methods, and storage media for communicating between multiple processes
[0001] Embodiments of the present document relate to electronic devices, methods and storage media, and for example, to electronic devices, methods and storage media for communicating between a plurality of processes included in an electronic device.
[0002] Within electronic devices, processes can communicate with each other using RPC (remote procedure call). RPC can be optimized for one-to-one interprocess communication. For example, a specific routine can call a stub in process A, which in turn calls the stub in process B. Furthermore, the specific routine can pass a message to process B as an argument to the stub function. For example, a stub can be a piece of code for interprocess communication in RPC. The stub can handle the process call and return process. Using a stub can hide the complexity of RPC, allowing programmers to call RPCs as if they were local procedures.
[0003] The above information may be provided solely as background information to aid in understanding the present disclosure. None of the above-described matters are claimed as prior art related to the present disclosure or can be used in determining prior art.
[0004] An electronic device according to various embodiments of the present document may include at least one processor and a memory storing instructions executed by the at least one processor. The instructions stored in the memory may be configured to cause the electronic device to transmit data and information of a plurality of receiving processes to a control process. The instructions stored in the memory may be configured to cause the electronic device to cause the control process to identify an associated process of each of the plurality of receiving processes. The instructions stored in the memory may be configured to cause the electronic device to set a data transmission order of the plurality of receiving processes based on the associated process, if at least one receiving process includes the associated process. The instructions stored in the memory may be configured to cause the electronic device to sequentially transmit the data to the plurality of receiving processes based on the set data transmission order.
[0005] A method for communicating between multiple processes in an electronic device according to various embodiments of the present document may include an operation in which a first process transmits data and information about multiple receiving processes to a control process. The method may include an operation in which the control process identifies an associated process of each of the multiple receiving processes. The method may include an operation in which, if at least one receiving process includes the associated process, a data transmission order of the multiple receiving processes is set based on the associated process. The method may include an operation in which the data is sequentially transmitted to the multiple receiving processes based on the set data transmission order.
[0006] A non-transitory computer-readable storage medium having recorded thereon a program for performing a method for communicating between multiple processes in an electronic device according to various embodiments of the present document may include an operation in which a first process transmits data and information of multiple receiving processes to a control process. The storage medium may include an operation in which the control process identifies an associated process of each of the multiple receiving processes. The storage medium may include an operation in which, if at least one receiving process includes the associated process, a data transmission order of the multiple receiving processes is set based on the associated process. The storage medium may include an operation in which the data is sequentially transmitted to the multiple receiving processes based on the set data transmission order.
[0007] In connection with the description of the drawings, the same or similar reference numerals may be used for the same or similar components.
[0008] FIG. 1 is a block diagram of an electronic device within a network environment according to various embodiments.
[0009] FIG. 2 is a block diagram illustrating the configuration of an electronic device according to various embodiments.
[0010] FIG. 3 is a diagram illustrating an operation of transmitting data to multiple processes according to various embodiments.
[0011] FIGS. 4A, 4B, and 4C are diagrams illustrating data stored in a control process according to various embodiments.
[0012] FIG. 5 is a diagram illustrating an operation of transmitting data to a process that requested data according to various embodiments.
[0013] FIGS. 6A, 6B, 6C, and 6D are diagrams illustrating data transmission operations considering associated processes according to various embodiments.
[0014] FIGS. 7A, 7B, and 7C are diagrams illustrating data transmission operations of some processes of FIGS. 6B and 6C according to various embodiments.
[0015] FIGS. 8A, 8B, 8C, and 8D are flowcharts illustrating operations for transmitting data to multiple processes according to various embodiments.
[0016] FIG. 9 is a flowchart illustrating an operation of transmitting data to a process that requested data according to various embodiments.
[0017] FIG. 10 is a flowchart illustrating a method for communicating between multiple processes according to various embodiments.
[0018] 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.
[0019] FIG. 1 is a block diagram of an electronic device (101) within a network environment (100) according to various embodiments.
[0020] 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)).
[0021] 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.
[0022] 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.
[0023] The memory (130) can store various data used by at least one component (e.g., the processor (120) or the sensor module (176)) of the electronic device (101). The data can include, for example, software (e.g., the program (140)) and input data or output data for commands related thereto. The memory (130) can include a volatile memory (132) or a nonvolatile memory (134). The nonvolatile memory (134) can include at least one internal memory (136) and an external memory (138).
[0024] 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).
[0025] 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).
[0026] 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.
[0027] 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.
[0028] 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).
[0029] 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.
[0030] 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.
[0031] 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).
[0032] 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.
[0033] 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.
[0034] 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).
[0035] 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.
[0036] 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).
[0037] 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.
[0038] 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).
[0039] 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.
[0040] 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)).
[0041] 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 one embodiment, the external electronic device (104) may include an Internet of Things (IoT) device. The server (108) may be an intelligent server using 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.
[0042] 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.
[0043] FIG. 2 is a block diagram illustrating the configuration of an electronic device according to various embodiments.
[0044] Referring to FIG. 2, the electronic device (200) may include a processor (210) and a memory (220).
[0045] The memory (220) (e.g., the memory (130) of FIG. 1) can store data, algorithms, programs, instructions, etc. that perform functions of the electronic device (200) (e.g., the electronic device (101) of FIG. 1). Instructions stored in the memory (220) can be loaded into the processor (210) and executed by the processor (210). For example, the memory (220) can store data transmitted from at least one process to a control process and information of a receiving process. As an example, the data can include information of a plurality of receiving processes (or information of a receiver), a task (or an identifier (ID)), and information of a task (or data or values of a task). For example, if the process is a system process, the data transmitted by the process may include network information of the electronic device (200) (e.g., whether the connected network is Wi-Fi or data communication) and / or status information (e.g., BATTERY_LOW, MEDIA_MOUNTED, SCREEN_ON, POWER_CONNECTED). For example, the task may be stored in a first area of the memory (220). The first area may include a linked list area. Information about the task and information about a plurality of receiving processes may be stored in an area linked to the task in the memory (220). The area linked to the task may include a hashmap area. For example, the linked list may be a data structure that stores a certain number of processed tasks (or IDs) and performs an operation of removing the most recently processed task. The hashmap may be a data structure that stores the most recent data of each task and a list of recipients.
[0046] As an example, a processor (210) (e.g., processor (120) of FIG. 1) may control each component of an electronic device (200). The electronic device (200) may include one or more processors (210). For example, the processor (210) may correspond to a plurality of processors that collectively perform a plurality of functions by dividing them among the processors.
[0047] For example, the processor (210) may control a first process to transmit data including information about a plurality of receiving processes to the control process. As an example, the process may be a program that is continuously running in the electronic device (200). The program may refer to an executable code stored in the memory (220), and the process may refer to a unit of work (task) that is executed by the operation of the program. The process may include one or more tasks and may include an instance of a program that is running in the electronic device (200). The processor (210) may control the control process to identify an associated process of each of the plurality of receiving processes. If at least one receiving process includes (or is related to) an associated process, the processor (210) may control the control process to set a data transmission order of the plurality of receiving processes based on the associated process. The processor (210) may control the control process to sequentially transmit data to the plurality of receiving processes based on the set data transmission order. As an example, the first process may include an application process (or an application program module) and / or a system process (or a system program module). The control process may include a daemon process (or daemon program module).
[0048] For example, the processor (210) may control a control process to set at least one receiving process, including an associated process, among a plurality of receiving processes, as a priority. The processor (210) may control the control process to sequentially transmit data to the remaining processes after transmitting data to at least one receiving process set as a priority.
[0049] For example, a plurality of receiving processes may include at least one associated process. The processor (210) may control the control process to determine the number of data transmission operations based on the number of the plurality of receiving processes and at least one associated process. The processor (210) may control the control process to sort at least one associated process that includes a plurality of operation counts among the determined number of data transmission operations. As an example, the number of operations in which the control process transmits data to one receiving process may be one. If one receiving process includes one associated process, the number of operations in which the data is transmitted may be two. If one receiving process includes two associated processes, the number of operations in which the data is transmitted may be three. In other words, the number of receiving processes and associated processes may be substantially the same as the number of data transmission operations. The processor (210) may control the control process to exclude an associated process with a single operation count from the sorting and to sort associated processes with a plurality of operation counts.
[0050] For example, if process A is included in a receiving process and also in an associated process, the number of processes A is 2 or more, and thus the number of operations of process A may be 2 or more. The processor (210) may control the control process to sort process A. If process B is included in only one receiving process or only one associated process, the number of processes B is 1, and thus the number of operations of process B may be 1. The processor (210) may control the control process to exclude process B from sorting. The processor (210) may control the control process to set the data transmission order of a plurality of receiving processes related to the sorted associated processes based on the sorted order.
[0051] For example, if the number of operations of the first associated process is n times and the number of operations of the second associated process is m times less than the n times, the processor (210) may control the control process to sort the first associated process and the second associated process in that order. The processor (210) may control the control process to set the plurality of receiving processes of the first group including the first associated process to the first priority and to set the plurality of receiving processes of the second group including the second associated process to the second priority. The processor (210) may control the control process to sequentially transmit data to the plurality of receiving processes of the first group and then sequentially transmit data to the plurality of receiving processes of the second group.
[0052] For example, a second process may request data from the first process as a control process. As an example, the second process may include an application process and / or a system process. When the second process requests data transmission, the processor (210) may control the control process to check data stored in the memory (220). If the data requested by the second process matches the data stored in the memory (220), the processor (210) may control the control process to transmit the data stored in the memory (220) to the second process without requesting data from the first process.
[0053] In the case of related technologies, when process A transmits the same data to processes B, C, and D through the RPC method, process A can transmit the data to process B in the RPC operation method. Then, process A can transmit data to process C in the RPC operation method. Finally, process A can transmit data to process D in the RPC operation method. At this time, since the data transmitted to processes B, C, and D is the same data, unnecessary operations may be repeated. Due to the repeated unnecessary operations, the data transmission time may be long, and the load on the processor (210) may be increased. If process E is a process associated with processes B and D, when process B operates, process E may be loaded into memory (220), and when process C operates, process E may be retrieved from memory (220). Then, when process D operates, process E may be loaded into memory (220) again, so the performance of the processor (210) may be degraded due to unnecessary memory loading and retrieval operations.
[0054] The electronic device, method and storage medium for communicating between multiple processes of this document can improve the performance of the electronic device (200) by minimizing repetitive operations of data transmission and reception, memory loading and / or retrieval operations using a control process.
[0055] The effects of the present disclosure are not limited to the effects mentioned above, and other effects not mentioned will be clearly understood by those skilled in the art from the description below.
[0056] FIG. 3 is a diagram illustrating an operation of transmitting data to multiple processes according to various embodiments.
[0057] Referring to FIG. 3, according to an example, a plurality of processes (21, 22, 23, 24, 25) and a control process (11) are illustrated. For example, the plurality of processes (21, 22, 23, 24, 25) may be included in a user area, and the control process (11) may be included in a kernel area. As an example, the plurality of processes (21, 22, 23, 24, 25) may include a system process and / or an application process, and the control process (11) may include a daemon process.
[0058] As an example, a single process may transmit data to multiple processes. For example, process A (21) may be a sending process transmitting data, while processes B (22), C (23), and D (24) may be receiving processes. Process E (25) may be an associated process included in processes B (22) and D (24).
[0059] As an example, process A (21) may transmit a recipient list and data to the control process (11) to transmit data to process B (22), process C (23), and process D (24). For example, the recipient list may include information of a plurality of processes that will receive the data. As an example, the recipient list may include process B (22), process C (23), and process D (24). The data may include network information, status information, tasks, and / or task information of the electronic device (200). The control process (11) may store the data received from process A (21) and the recipient list in the memory (220). As an example, the control process (11) may store a task (or ID) in a first area of the memory (220), and store information of the task (or the value of the ID) and the recipient list in an area linked to the task in the memory (220).
[0060] As an example, the control process (11) can identify the associated process of a plurality of processes included in the receiver list. As an example, the control process (11) can identify that the associated process of process B (22) and process D (24) is process E (25). If an associated process exists, the control process (11) can set the data transmission order of the plurality of processes based on the associated process. For example, the control process (11) can set a receiving process including the associated process as a priority. As an example, the control process (11) can set process B (22) and process D (24) including process E (25), which is an associated process, as a priority.
[0061] As an example, the control process (11) can sequentially transmit data to the processes in the receiver list based on the set data transmission order. As an example, the control process (11) can sequentially transmit data to process B (22) and process D (24) set as priorities and then sequentially transmit data to process C (24). As an example, since there is no priority between process B (22) and process D (24), the control process (11) can sequentially transmit data to process D (24) and process B (22) and then transmit data to process C (23).
[0062] As an example, when the control process (11) communicates with multiple processes (e.g., process A (21), process B (22), process B (23), process D (24)), the control process (11) can process messages (e.g., data) in the kernel area to optimize performance. For example, a sending process (e.g., process A (21)) can transmit a recipient list and data to the control process (11), and the control process (11) can transmit the transmitted data to a receiving process (e.g., process B (22), process B (23), process D (24)) included in the recipient list. Accordingly, the electronic device, method, and storage medium for communicating between multiple processes of the present document can simplify repetitive operations between the sending process and the kernel area, thereby reducing the total transmission time and lowering the load on the processor (210), thereby improving performance.
[0063] FIGS. 4A, 4B, and 4C are diagrams illustrating data stored in a control process according to various embodiments.
[0064] Referring to FIG. 4a, the structure of data and a recipient list received by a control process (11 of FIG. 3) according to an example is illustrated. As an example, a linked list is included in the first area of memory (220) and can store tasks. A hash map is included in the area linked to the task and can store task information and a recipient list. The number of data that the linked list can store may vary depending on the set size.
[0065] As an example, a linked list can store a preset number of lists (e.g., 3), and process A (21 in FIG. 3) can sequentially transmit data for BATTERY_LOW, MEDIA_MOUNTED, and SCREEN_ON to process B (22 in FIG. 3), process C (23 in FIG. 3), and / or process D (24 in FIG. 3) via a control process (11 in FIG. 3). BATTERY_LOW, MEDIA_MOUNTED, and SCREEN_ON can be task or state information.
[0066] For example, process A (21 in FIG. 3) can transmit data of BATTERY_LOW and a list of recipients to a control process (11 in FIG. 3) so that the data of BATTERY_LOW can be transmitted to process B (22 in FIG. 3), process C (23 in FIG. 3), and process D (24 in FIG. 3). The control process (11 in FIG. 3) can store BATTERY_LOW in a linked list, and store (401) information (e.g., value) of BATTERY_LOW and a list of recipients (e.g., process B (22 in FIG. 3), process C (23 in FIG. 3), and process D (24 in FIG. 3)) in a hash map. As an example, the control process (11 in FIG. 3) may store (401) information (e.g., value) of BATTERY_LOW and a list of recipients (e.g., process B (22 in FIG. 3), process C (23 in FIG. 3), and process D (24 in FIG. 3)) in an area of a hash map linked to the task based on information obtained from the task (e.g., BATTERY_LOW). According to an example, the control processor (11 in FIG. 3) may check an associated process (e.g., process E (25 in FIG. 3)) and set a data transmission order based on the checked associated process. The control process (11 in FIG. 3) may sequentially transmit data to the processes in the receiver list according to the set data transmission order. As an example, a control process (11 in FIG. 3) can sequentially transmit data to process B (22 in FIG. 3) and process D (24 in FIG. 3), which include process E (25 in FIG. 3), which is an associated process, and then transmit data to process C (23 in FIG. 3), which does not include an associated process.
[0067] For example, process A (21 in FIG. 3) can request the control process (11 in FIG. 3) to transmit data of MEDIA_MOUNTED to process B (22 in FIG. 3) and process C (23 in FIG. 3). The control process (11 in FIG. 3) can store MEDIA_MOUNTED in a linked list and store (402) information of MEDIA_MOUNTED and a list of recipients (e.g., process B (22 in FIG. 3) and process C (23 in FIG. 3)) in a hash map. As an example, the control process (11 in FIG. 3) can store (402) the information of MEDIA_MOUNTED and the list of recipients (e.g., process B (22 in FIG. 3) and process C (23 in FIG. 3)) in the area of the hash map linked to the task based on the information obtained from the task (e.g., MEDIA_MOUNTED). The control processor (11 in FIG. 3) can identify an associated process (e.g., process E (25 in FIG. 3)) and set the data transmission order based on the identified associated process. For example, if the number of the same plurality of receiving processes and associated processes is plural, the control process (11 in FIG. 3) can set the data transmission order based on the associated process. As an example, if the number of the same plurality of receiving processes and associated processes is 1, the control process (11 in FIG. 3) can set the data transmission order without considering the associated process. As an example, multiple receiving processes included in the receiver list may include process B (22 in FIG. 3) and process C (23 in FIG. 3), and the associated process may include process E (25 in FIG. 3). Considering the number of the same multiple receiving processes and the associated processes, the number of process E (25 in FIG. 3), which is an associated process, is 1, so the control process (11 in FIG. 3) can transmit data to the processes in the receiver list without considering the associated process.As an example, the control process (11 in FIG. 3) can transmit data (e.g., data of MEDIA_MOUNTED) in the order of process B (22 in FIG. 3) and process C (23 in FIG. 3), and can transmit data in the order of process C (23 in FIG. 3) and process B (22 in FIG. 3).
[0068] For example, process A (21 in FIG. 3) can request the control process (11 in FIG. 3) to transmit data of SCREEN_ON to a specific recipient (e.g., process D (24 in FIG. 3)). The control process (11 in FIG. 3) can store SCREEN_ON in a linked list and store (403) information of SCREEN_ON and a list of recipients (e.g., process D (24 in FIG. 3)) in a hash map. As an example, the control process (11 in FIG. 3) can store (403) information of SCREEN_ON and a list of recipients (e.g., process D (24 in FIG. 3)) in an area of a hash map linked to a task based on information obtained from the task (e.g., SCREEN_ON). The control process (11 in FIG. 3) can transmit data (e.g., data of SCREEN_ON) to process D (24 in FIG. 3).
[0069] Referring to FIG. 4b, the structure of the data and recipient list is illustrated when, according to an example, process A (21 of FIG. 3) requests transmission of data of BATTERY_LOW. As an example, process A (21 of FIG. 3) can request the control process (11 of FIG. 3) to transmit data of BATTERY_LOW to process B (22 of FIG. 3), process C (23 of FIG. 3), and process D (24 of FIG. 3). The control process (11 in FIG. 3) can update the linked list as shown in FIG. 4b and transmit the data of BATTERY_LOW to the order of process B (22 in FIG. 3), process D (24 in FIG. 3), and process C (23 in FIG. 3) (or, the order of process D (24 in FIG. 3), process B (22 in FIG. 3), and process C (23 in FIG. 3)).
[0070] Referring to FIG. 4c, the structure of the data and recipient list is illustrated when, according to an example, process A (21 of FIG. 3) requests transmission of data of POWER_CONNECTED. As an example, process A (21 of FIG. 3) can request the control process (11 of FIG. 3) to transmit data of POWER_CONNECTED to process B (22 of FIG. 3), process C (23 of FIG. 3), and process D (24 of FIG. 3). The control process (11 of FIG. 3) can update the linked list and hash map as illustrated in FIG. 4c. For example, since a linked list can store a specific number of lists (e.g., 3), the control process (11 in FIG. 3) can delete (404) information related to MEDIA_MOUNTED, which is the last (or oldest processed) list in the linked list, from the linked list and the hash map. The control process (11 in FIG. 3) can transmit data of POWER_CONNECTED to process B (22 in FIG. 3), process D (24 in FIG. 3), and process C (23 in FIG. 3) in that order (or process D (24 in FIG. 3), process B (22 in FIG. 3), and process C (23 in FIG. 3) in that order).
[0071] FIG. 5 is a diagram illustrating an operation of transmitting data to a process that requested data according to various embodiments.
[0072] Referring to FIG. 5, a process requesting information from another process and a control process (11) according to an example are illustrated. As an example, process F (26) can request data transmission (or transmit a reception readiness complete message) to process A (21) through the control process (11) using the RPC method. In other words, process F (26) can request (501) data from process A (21) to the control process (11). The control process (11) can search the linked list and check whether the data requested by process F (26) exists. If the requested data exists in the linked list, the control process (11) can transmit (502) data stored in the memory (220) to process F (26) without communicating with process A (21). In this case, since no communication operation is performed between the control process (11) and process A (21), the communication time and the load on the processor (210) can be reduced. In other words, the control process (11) can improve performance by reducing communication time because it communicates directly with process F (26) using RPC without performing communication operations with process A (21).
[0073] FIGS. 6A, 6B, 6C, and 6D are diagrams illustrating data transmission operations considering associated processes according to various embodiments.
[0074] Referring to FIG. 6A, as an example, the plurality of receiving processes may include process A, process B, process C, process D, process E, process F, process G, process H, process I, and process J. Process E may be an associated process included in processes B, D, G, and H. Process F may be an associated process of process E. Process J may be an associated process of processes G and H. Process L may be an associated process of process J, process M may be an associated process of process I, and process K may be an associated process of process G. At this time, it is assumed that there is no order or priority among the plurality of receiving processes.
[0075] For example, if a plurality of receiving processes include different associated processes, the control process (11) can determine the number of data transmission operations based on the number of the plurality of receiving processes and the different associated processes, and sort the different associated processes. As an example, if the determined number of operations is plural, the control process (11) can sort the associated processes including the multiple number of operations. If the determined number of operations is 1, the control process (11) can exclude the associated process including the number of operations 1 from the sorting.
[0076] As illustrated in FIG. 6A, as an example, the number of operations of process E (e.g., the number of multiple receiving processes and associated processes) may be 5, the number of operations of process F may be 2, and the number of operations of process J may be 3. The number of operations of the remaining processes may be 1. The control process (11) may sort processes E, F, and J having multiple numbers of operations. For example, the control process (11) may sort the associated processes in descending or ascending order. As an example, when the control process (11) sorts the associated processes in descending order, the control process (11) may store the associated processes in the stack in the order of process E, process J, and process F. When the control process (11) loads the associated processes stored in the stack into the memory (220) (e.g., random access memory (RAM)), the level of the associated processes may be adjusted according to the set priority.
[0077] Referring to FIGS. 6B and 6C, as an example, the control process (11) can pop a process stored in the stack and transmit data to a related process. For example, the control process (11) can check a receiving process, transmit data, and then delete (exclude) the receiving process that transmitted the data from the receiver list. As an example, the control process (11) can check a process F stored in the stack and load the process F into the memory (220) (e.g., RAM). The control process (11) can transmit data to the process F and the process associated with the process F. As an example, the control process (11) can transmit data to the process F. The processor E can operate together with the process F as a process associated with the process F. At this time, the control process (11) can set the priority of the memory reclamation operation of the process F to a low level. As an example, in the case of Android, the adj value can be adjusted. In other words, when the electronic device (200) finds a target process to be unloaded (recovered) from the memory (220) due to insufficient memory (220) (e.g., RAM) during subsequent operations, the electronic device (200) can unload processes in the order of priority of the memory recovery operation. Since process F has a lower priority of the memory recovery operation than other processes and is less likely to be unloaded, it may be more likely that processes associated with process F will remain loaded in the memory (220) while processing data. When the data transfer is completed, the control process (11) can adjust the priority of the memory recovery operation of process F to be equal to that of other processes. When the priority of process F is adjusted, the electronic device (200) can unload process F from the memory (220) if necessary.
[0078] For example, when the operation related to process F is completed, the control process (11) can check the process J stored in the stack and load the process J into the memory (220) (e.g., RAM). The control process (11) can transmit data to the process J and the processes associated with the process J. For example, the control process (11) can transmit data to the process J, the process G, and the process H. At this time, the control process can set the priority of the memory reclamation operation of the process J to be low. For example, in the case of Android, the adj value can be adjusted. In other words, when the memory (220) (e.g., RAM) is insufficient during the subsequent operation and the electronic device (200) searches for a target process to be unloaded (reclaimed) from the memory (220), the electronic device (200) can unload the processes in the order of high priority of the memory reclamation operation. Process J has a lower priority for memory reclamation operations compared to other processes, making it less likely to be unloaded. Therefore, it may be more likely to remain loaded in memory (220) while associated processes (e.g., Process J, Process G, and Process H) process data. Once data transfer is complete, the control process (11) may adjust the priority of the memory reclamation operations of Process J to be equal to that of other processes.
[0079] For example, when an operation related to process J is completed, the control process (11) can check the process E stored in the stack and load the process E into the memory (220) (e.g., RAM). The control process (11) can transmit data to process E and processes associated with process E. According to an example, the processes associated with process E may include process B, process D, process E, process G, and process H. The control process (11) can transmit data to process G and process H in the operation related to process J and delete them from the recipient list. The control process (11) can transmit data to process B, process D, and process E remaining in the recipient list.
[0080] For example, the control process (11) can transfer data to process E, process B, and process D. At this time, the control process can set the priority of the memory reclamation operation of process E to low. For example, in the case of Android, the adj value can be adjusted. In other words, when the electronic device (200) searches for a target process to be unloaded (reclaimed) from the memory (220) due to insufficient memory (220) (e.g., RAM) during subsequent operations, the electronic device (200) can unload the processes in the order of high to low priorities of the memory reclamation operation. Since process E has a lower priority of the memory reclamation operation than other processes and is less likely to be unloaded, it may be more likely to remain loaded in the memory (220) while the associated processes (e.g., process B, process D) process data. When the data transfer is complete, the control process (11) can adjust the priority of the memory reclamation operation of process E to be equal to that of other processes.
[0081] Referring to FIG. 6d, as an example, the control process (11) can transmit data to the remaining receiving processes. The stack may be empty through the above-described process. The control process (11) can transmit data to the remaining receiving processes. As an example, the control process (11) can transmit data to process A, process C, and process I. Process A, process C, and process I may have the same priority. Once the control process (11) transmits data to all receiving processes, the data transmission task can be terminated.
[0082] FIGS. 7A, 7B, and 7C are diagrams illustrating data transmission operations of some processes of FIGS. 6B and 6C according to various embodiments.
[0083] Referring to FIG. 7a, as an example, the plurality of receiving processes may include process B, process C, and process D, and the associated process may include process E. The control process (11) may store process E on the stack.
[0084] Referring to FIG. 7b, as an example, the control process (11) can pop the process E stored in the stack and load it into the memory (220) (e.g., random access memory (RAM)). The control process (11) can transmit data to a process associated with the process E. As an example, the control process (11) can transmit data to the processes B and D. The processes B and D may have the same priority.
[0085] Referring to Figure 7c, as an example, the control process (11) can transmit data to the remaining receiving processes. The stack may be empty through the above-described process. The control process (11) can transmit data to the remaining receiving processes. As an example, the control process (11) can transmit data to process C.
[0086] FIGS. 8A, 8B, 8C, and 8D are flowcharts illustrating operations for transmitting data to multiple processes according to various embodiments.
[0087] In the following examples, the operations may be performed sequentially, but are not necessarily sequential. For example, the order of the operations may be changed, and at least two operations may be performed in parallel.
[0088] As an example, steps 805 to 895 may be understood to be performed in a processor (e.g., processor (210) of FIG. 2) of an electronic device (e.g., electronic device (200) of FIG. 2).
[0089] Referring to FIGS. 8A, 8B, 8C, and 8D, as an example, a control process of an electronic device (200) may receive data and a recipient list (805). As an example, the data may include an ID (or a task) and information about the ID (or a value of the ID, task information), and the recipient list may include multiple processes. For example, the control process may store the ID of the data in a linked list, and store the information about the ID and the recipient list in a hash map. As an example, the control process may search for whether an ID exists in the linked list (810).
[0090] For example, if the ID does not exist in the linked list (810-NO), the control process can add the ID to the front of the linked list and add data (e.g., information about the ID, the value of the ID, or task information) and a list of recipients to the hash map (815). As an example, the control process can determine whether the number of linked lists to which the ID has been added exceeds a maximum value (820).
[0091] For example, if the number of linked linked lists with added IDs exceeds the maximum value (820-YES), the control process can delete the last item of the linked list (825). For example, the linked list can be stored in order from the most recently processed ID to the last processed ID within a range that does not exceed the maximum value. The control process can search for related processes and count the number of operations for each process. The control process can sort the number of operations of the processes in descending order. As an example, the control process can move the index to the beginning of the process list (835).
[0092] As an example, if the number of linked lists with added IDs does not exceed the maximum (820-NO), the control process may perform operations such as searching for associated processes, counting the number of operations per process, sorting the number of operations of the processes in descending order, and moving the index to the beginning of the process list (835).
[0093] For example, if the ID exists in the linked list (810-YES), the control process can move the ID to the front of the linked list and update the data in the hash map (e.g., information about the ID, the value of the ID, or task information) and the recipient list (830). For example, the control process can perform operations such as searching for related processes, counting the number of operations per process, sorting the number of operations of the processes in descending order, and moving the index to the beginning of the process list (835).
[0094] As an example, the control process can determine whether the number of operations of a process is 1 (840). For example, the control process can store only processes whose number of operations is 2 or more on the stack in descending order. According to an example, if the number of operations of a process is not considered, when the control process transmits data to multiple receiving processes, a process that is repeatedly operated more than twice may be repeatedly loaded and unloaded from the memory (220). The control process can minimize the loading and unloading operations of a process that is repeatedly operated more than twice by storing the information of the process on a separate stack to make the unloading operation of the process that is repeatedly operated more than twice difficult. According to an example, the control process can request the memory management module to adjust the memory reclamation level of the process to lower the priority of the memory reclamation operation compared to other processes.
[0095] If the number of times the process operates is 2 or more (840-NO), the control process may store the process information of the current index in the stack and request a change in the priority of the memory level (e.g., the priority of unloading from memory) when the process operates (845). The electronic device (200) of this document is intended to minimize the process of repeatedly loading / unloading the process on the memory (220) when transmitting data to multiple processes. For example, the control process may store the process in a separate stack. The control process may lower the priority of the unloading operation of the process by requesting the memory management process to adjust the memory level of the process to make it difficult to unload from memory. As an example, the control process may move the index to the next process in the process list sorted in descending order (850).
[0096] For example, if the number of operations of the process is less than 2 (840-YES), the control process can move the index to the next process in the process list sorted in descending order (850). As an example, the control process can determine whether the current index is the last in the process list (855). As an example, if the current index is not the last in the process list (855-NO), the control process can repeat operations 840 to 850. As an example, if the current index is the last in the process list (855-YES), the control process can pop process information from the stack and move the index to the beginning of the receiver list (860). For example, the control process can pop the process that was entered most recently from the stack.
[0097] As an example, the control process can determine whether the recipient of the current index is associated with the current process information (865). For example, the control process can search the process information associated with the recipient list and determine whether it matches the process popped from the stack.
[0098] For example, if the recipient of the current index is associated with current process information (865-YES), the control process may transmit data to the recipient of the current index (870). For example, the control process may move the index to the next process in the recipient list (875).
[0099] For example, if the recipient of the current index is not associated with the current process information (865-NO), the control process can move the index to the next process in the recipient list (875).
[0100] As an example, the control process may determine whether the current index is the last in the recipient list (880). As an example, if the current index is not the last in the recipient list (880-NO), the control process may repeat operations 865 to 875.
[0101] For example, if the current index is the last in the recipient list (880-NO), the controlling process can cancel the memory level change request (885). For example, once all processes included in the recipient list have been verified, the controlling process can cancel the memory level adjustment request of the process popped from the stack. For example, since there will be no subsequent operations related to the same process popped from the stack, there may be no need to lower the unloading priority of the process. Therefore, the controlling process can cancel the memory level change of the process.
[0102] For example, the control process can determine whether the stack is empty (890). If the stack is not empty (890—NO), the control process can repeat operations 860 to 885. If the stack is empty (890—YES), the control process can transmit data to the remaining processes in the recipient list (895). Once data has been transmitted to all processes in the recipient list, the control process can complete the data transmission operation.
[0103] FIG. 9 is a flowchart illustrating an operation of transmitting data to a process that requested data according to various embodiments.
[0104] In the following examples, the operations may be performed sequentially, but are not necessarily sequential. For example, the order of the operations may be changed, and at least two operations may be performed in parallel.
[0105] As an example, steps 910 to 940 may be understood to be performed in a processor (e.g., processor (210) of FIG. 2) of an electronic device (e.g., electronic device (200) of FIG. 2).
[0106] Referring to FIG. 9, as an example, a specific process of an electronic device (200) may request data of a specific ID from a control process (910). For example, the specific process may be an application process and / or a system process. The specific process may request data from a designated process through the control process. As an example, the specific process may transmit a message indicating readiness to receive data from the designated process to the control process.
[0107] For example, the control process can process a process request by checking the processing history and remaining data of the requested ID. The control process can determine whether a specific ID exists in the linked list (920). As an example, if a second process requests data from the first process from the control process, the control process can check the data stored in memory (220) (e.g., the linked list).
[0108] For example, if a specific ID does not exist (920-NO), the control process may request data from a process containing data of the specific ID requested by the specific process (930). For example, if a specific ID exists (920-YES), the control process may transmit data of the specific ID requested by the specific process (940). For example, if the data requested by the second process matches the data stored in the memory (220), the control process may transmit the data stored in the memory (220) to the second process without requesting data from the first process.
[0109] FIG. 10 is a flowchart illustrating a method for communicating between multiple processes according to various embodiments.
[0110] In the following examples, the operations may be performed sequentially, but are not necessarily sequential. For example, the order of the operations may be changed, and at least two operations may be performed in parallel.
[0111] As an example, steps 1010 to 1040 may be understood to be performed in a processor (e.g., processor (210) of FIG. 2) of an electronic device (e.g., electronic device (200) of FIG. 2).
[0112] Referring to FIG. 10, as an example, a first process of an electronic device (200) may transmit data and information of a plurality of receiving processes (1010). For example, the first process may transmit data and information of a plurality of receiving processes to a control process. The first process may include a system process and / or an application process. The control process may include a daemon process. The data may include tasks and information of the tasks. As an example, if the first process is a system process, the data may include network information of the electronic device (200) (e.g., whether the connected network is Wi-Fi or data communication) and / or status information (e.g., BATTERY_LOW, MEDIA_MOUNTED, SCREEN_ON, POWER_CONNECTED).
[0113] As an example, the control process can identify an associated process (1020). For example, the control process can identify an associated process of each of the plurality of receiving processes. The control process can determine the number of data transmission operations based on the number of the plurality of receiving processes and each associated process. The control process can sort the associated processes that include a plurality of operation counts among the determined number of data transmission operations. For example, the control process can sort the associated processes that have a plurality of operation counts, excluding an associated process that has one operation count from the sorting. As an example, the number of operations of the first associated process may be n times, and the number of operations of the second associated process may be m times, which is less than the n times. As an example, the control process can sort the plurality of associated processes in descending order. The control process can sort the first associated process and the second associated process in that order. If the control process sorts the plurality of associated processes in ascending order, the sorting can be performed in the order of the second associated process and the first associated process.
[0114] As an example, the control process may set the data transmission order of the plurality of receiving processes based on the associated process (1030). If at least one receiving process includes an associated process, the control process may set the data transmission order of the plurality of receiving processes based on the associated process. For example, the control process may set the at least one receiving process including the associated process as a priority. For example, if the control process arranges the data transmission order in the order of the first associated process and the second associated process, the data transmission order may be set for the plurality of receiving processes of the first group including the first associated process as a first priority and the plurality of receiving processes of the second group including the second associated process as a second priority.
[0115] As an example, a control process may transmit data to a receiving process (1040). For example, the control process may sequentially transmit data to multiple receiving processes based on a set data transmission order. For example, the control process may transmit data to a process including an associated process and then sequentially transmit data to the remaining processes.
[0116] For example, the control process can store data received from the first process and information about multiple receiving processes. For example, the control process can store tasks (or IDs) in a linked list, and store task information (or ID data, ID values) and information about multiple recipients in a hash map.
[0117] For example, if a second process requests data from a control process, the control process can check the stored data. If the data requested by the second process does not match the stored data (or the data requested by the second process does not exist), the control process can request data from the first process and transmit the data received from the first process to the second process. If the data requested by the second process matches the stored data (or the data requested by the second process exists), the control process can transmit the stored data to the second process without requesting data from the first process.
[0118] In FIG. 10, as an example, a method for inter-process communication within an electronic device (200) is described, but the electronic device, method, and storage medium for inter-process communication of the present document can also be applied to data processing between processes of the electronic device (200) and processes of an external device. For example, when performing a data transmission operation between a process of the electronic device (200) and a process of an external device, a control process located in the kernel of the electronic device (200) and a control process located in the kernel of the external device can process the data to improve communication performance. According to an example, a device including a plurality of receiving processes (e.g., the electronic device (200) and an external device) can improve performance by controlling the transmission order of data.
[0119] As an example, the electronic device (200) may include at least one processor (210) and a memory (220) that stores instructions executed by the at least one processor (210). The instructions stored in the memory (220) may be configured to cause the electronic device (200) to cause a first process to transmit data and information of a plurality of receiving processes to a control process. The instructions stored in the memory (220) may be configured to cause the electronic device (200) to cause the control process to identify an associated process of each of the plurality of receiving processes. The instructions stored in the memory (220) may be configured to cause the electronic device (200) to set a data transmission order of the plurality of receiving processes based on the associated process, if at least one receiving process includes the associated process. The instructions stored in the memory (220) may be configured to cause the electronic device (200) to sequentially transmit the data to the plurality of receiving processes based on the set data transmission order.
[0120] As an example, the command stored in the memory (220) may be configured to cause the electronic device (200) to set the control process to prioritize the at least one receiving process including the associated process. The command stored in the memory (220) may be configured to cause the electronic device (200) to transmit the data to the at least one receiving process and then sequentially transmit the data to the remaining processes.
[0121] As an example, the command stored in the memory (220) may be configured to cause the electronic device (200) to determine the number of operations of data transmission based on the number of the plurality of receiving processes and at least one associated process. The command stored in the memory (220) may be configured to cause the electronic device (200) to sort the at least one associated process including the plurality of operation counts. The command stored in the memory (220) may be configured to cause the electronic device (200) to set the data transmission order of the plurality of receiving processes related to the sorted at least one associated process based on the sorted order.
[0122] As an example, the command stored in the memory (220) may be configured to cause the electronic device (200) to exclude from sorting at least one associated process whose number of operations is 1.
[0123] As an example, the command stored in the memory (220) may be configured to cause the electronic device (200) to sort the first associated process and the second associated process in that order if the number of operations of the first associated process is n-th times and the number of operations of the second associated process is m-th times less than the n-th times. The command stored in the memory (220) may be configured to cause the electronic device (200) to set the plurality of receiving processes of the first group related to the first associated process as the first priority and the plurality of receiving processes of the second group related to the second associated process as the second priority. The command stored in the memory (220) may be configured to cause the electronic device (200) to sequentially transmit the data to the plurality of receiving processes of the first group and then sequentially transmit the data to the plurality of receiving processes of the second group.
[0124] As an example, the command stored in the memory (220) may be configured to cause the electronic device (200) to store the data received from the first process and information of the plurality of receiving processes in the memory (220). The command stored in the memory (220) may be configured to cause the electronic device (200) to, when a second process requests data of the first process to the control process, check the data stored in the memory (220). The command stored in the memory (220) may be configured to cause the electronic device (200) to transmit the data stored in the memory (220) to the second process without requesting the data from the first process if the data requested by the second process matches the data stored in the memory.
[0125] As an example, the second process may include an application process.
[0126] As an example, the control process may include a daemon process.
[0127] As an example, the first process may include a system process. The data may include at least one of network information and status information of the electronic device (200).
[0128] As an example, the data may include a task, information about the task. The command stored in the memory (220) may be configured to cause the electronic device (200) to store the task in a first area of the memory (220). The command stored in the memory (220) may be configured to cause the electronic device (200) to store information about the task and information about the plurality of receiving processes in an area of the memory (220) linked to the task.
[0129] As an example, a method for communicating between multiple processes in an electronic device (200) may include an operation in which a first process transmits data and information of multiple receiving processes to a control process. The method may include an operation in which the control process identifies an associated process of each of the multiple receiving processes. The method may include an operation in which, if at least one receiving process includes the associated process, the method sets a data transmission order of the multiple receiving processes based on the associated process. The method may include an operation in which the data is sequentially transmitted to the multiple receiving processes based on the set data transmission order.
[0130] As an example, the operation of setting the data transmission order may include the control process setting the at least one receiving process including the associated process as a priority. The operation of transmitting the data may include transmitting the data to the at least one receiving process and then sequentially transmitting the data to the remaining processes.
[0131] As an example, the method may include an operation of determining the number of data transmission operations based on the number of the plurality of receiving processes and at least one associated process. The method may include an operation of sorting the at least one associated process including the plurality of operation counts. The operation of setting the data transmission order may set the data transmission order of the plurality of receiving processes associated with the sorted at least one associated process based on the sorted order.
[0132] As an example, the method may include an operation of excluding from the sorting at least one associated process where the number of operations is one.
[0133] As an example, the operation of aligning the plurality of different associated processes may be such that, if the number of times the first associated process operates is n-th times and the number of times the second associated process operates is m-th times less than the n-th times, the first associated process and the second associated process may be aligned in that order. The operation of setting the data transmission order may be such that the plurality of receiving processes of the first group associated with the first associated process may be set to a first priority and the plurality of receiving processes of the second group associated with the second associated process may be set to a second priority. The operation of transmitting the data may be such that the data is sequentially transmitted to the plurality of receiving processes of the first group and then the data is sequentially transmitted to the plurality of receiving processes of the second group.
[0134] As an example, the method may include an operation in which the control process stores the data received from the first process and information about the plurality of receiving processes. The method may include an operation in which, when a second process requests data of the first process from the control process, the control process checks the stored data. The method may include an operation in which, if the data requested by the second process matches the stored data, the stored data is transmitted to the second process without requesting the data from the first process.
[0135] As an example, the second process may include an application process.
[0136] As an example, the control process may include a daemon process.
[0137] As an example, the first process may include a system process. The data may include at least one of network information and status information of the electronic device.
[0138] As an example, a non-transitory computer-readable storage medium having recorded thereon a program for performing a method for performing communication between a plurality of processes in an electronic device (200) may include an operation in which a first process transmits data and information of a plurality of receiving processes to a control process. The storage medium may include an operation in which the control process identifies an associated process of each of the plurality of receiving processes. The storage medium may include an operation in which, if at least one receiving process includes the associated process, the storage medium sets a data transmission order of the plurality of receiving processes based on the associated process. The storage medium may include an operation in which the data is sequentially transmitted to the plurality of receiving processes based on the set data transmission order.
[0139] The various embodiments of this document and the terminology used therein 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. In connection with the description of the drawings, similar reference numerals may be used for similar or related components. The singular form of a noun corresponding to an item may include one or more of the items, unless the context clearly indicates otherwise. In this document, each of the phrases "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 include any one of the items listed together in the corresponding phrase among those phrases, or all possible combinations thereof. Terms such as "first," "second," or "first" or "second" may be used merely to distinguish one component from another, and do not limit the components in any other respect (e.g., importance or order). When a component (e.g., a first component) is referred to as "coupled" or "connected" to another component (e.g., a second component), with or without the terms "functionally" or "communicatively," it means that the component can be connected to the other component directly (e.g., wired), wirelessly, or through a third component.
[0140] The term "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. A module may be an integral component, or a minimum unit or part of such a component that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application-specific integrated circuit (ASIC).
[0141] Various embodiments of the present document may be implemented as software (e.g., a program (140)) including one or more instructions stored in a storage medium (e.g., an internal memory (136) or an external memory (138)) readable by a machine (e.g., an electronic device (101)). For example, a processor (e.g., a processor (120)) of the machine (e.g., an electronic device (101)) may call at least one instruction among the one or more instructions stored from the storage medium and execute it. This enables the machine to operate to perform at least one function according to the at least one called instruction. The one or more instructions may include code generated by a compiler or code executable by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory' simply means that the storage medium is a tangible device and does not contain signals (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently or temporarily on the storage medium.
[0142] According to one embodiment, the method according to various embodiments disclosed in this document may be provided as a computer program product. The computer program product may be traded between sellers and buyers as a product. The computer program product may be distributed in the form of a device-readable storage medium (e.g., compact disc read-only memory (CD-ROM)) or may be provided through an application store (e.g., Play Store). TM ) or directly between two user devices (e.g., smart phones), online distribution (e.g., downloading or uploading). In the case of online distribution, at least a portion of the computer program product may be at least temporarily stored or temporarily created in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.
[0143] 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 separately arranged 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.
[0144] The effects of this document are not limited to the effects mentioned above, and other effects not mentioned will be clearly understood by those skilled in the art from the above description.
Claims
1. In electronic devices, at least one processor; and a memory storing instructions executed by at least one processor; The instructions stored in the above memory cause the electronic device to: The first process transmits data and information to multiple receiving processes to the control process, The above control process checks the associated process of each of the plurality of receiving processes, If at least one receiving process includes the associated process, the data transmission order of the plurality of receiving processes is set based on the associated process, An electronic device configured to sequentially transmit the data to the plurality of receiving processes based on the data transmission order set above.
2. In paragraph 1, The instructions stored in the above memory cause the electronic device to: The control process sets the at least one receiving process including the associated process as a priority, An electronic device configured to sequentially transmit the data to the remaining processes after transmitting the data to at least one receiving process.
3. In paragraph 1, The instructions stored in the above memory cause the electronic device to: An electronic device configured to determine the number of operations of data transmission based on the number of the plurality of receiving processes and at least one associated process, sort the at least one associated process including the plurality of operation numbers, and set the data transmission order of the plurality of receiving processes related to the sorted at least one associated process based on the sorted order.
4. In paragraph 3, The instructions stored in the above memory cause the electronic device to: An electronic device configured to exclude from sorting at least one associated process having a number of operations of 1.
5. In paragraph 3, The instructions stored in the above memory cause the electronic device to: An electronic device configured to sequentially transmit the data to the plurality of receiving processes of the first group and the second group, if the number of operations of the first associated process is n times and the number of operations of the second associated process is m times less than the n times, and then to arrange the first associated process and the second associated process in that order, set the plurality of receiving processes of the first group associated with the first associated process to a first priority and the plurality of receiving processes of the second group associated with the second associated process to a second priority, and then to sequentially transmit the data to the plurality of receiving processes of the first group.
6. In paragraph 1, The instructions stored in the above memory cause the electronic device to: An electronic device in which the control process stores the data received from the first process and information of the plurality of receiving processes in the memory, and when a second process requests data of the first process to the control process, the control process checks the data stored in the memory, and when the data requested by the second process matches the data stored in the memory, the control process transmits the data stored in the memory to the second process without requesting the data from the first process.
7. In paragraph 6, The second process above is, An electronic device containing an application process.
8. In paragraph 1, The above control process is, An electronic device that contains a daemon process.
9. In paragraph 1, The above first process includes a system process, An electronic device wherein the data includes at least one of network information and status information of the electronic device.
10. In paragraph 1, The above data includes information about tasks, tasks, The instructions stored in the above memory cause the electronic device to: An electronic device wherein the control process is configured to store the task in a first area of the memory and to store information of the task and information of the plurality of receiving processes in an area of the memory linked to the task.
11. A method for communicating between multiple processes in an electronic device, An operation in which a first process transmits data and information to multiple receiving processes to a control process; An operation in which the above control process checks the associated process of each of the plurality of receiving processes; If at least one receiving process includes the associated process, an operation of setting the data transmission order of the plurality of receiving processes based on the associated process; and A method comprising: an operation of sequentially transmitting the data to the plurality of receiving processes based on the set data transmission order.
12. In paragraph 11, The action of setting the above data transmission order is: The control process sets the at least one receiving process including the associated process as a priority, The action of transmitting the above data is: A method of sequentially transmitting the data to the remaining processes after transmitting the data to at least one receiving process.
13. In paragraph 11, An operation for determining the number of data transmission operations based on the number of the plurality of receiving processes and at least one associated process; and further comprising an operation of aligning at least one associated process comprising a plurality of operation counts; The action of setting the above data transmission order is: A method for setting the data transmission order of the plurality of receiving processes associated with the at least one sorted associated process based on the sorted order.
14. In paragraph 13, A method further comprising: an operation of excluding from sorting at least one associated process, the number of operations of which is 1.
15. A non-transitory computer-readable storage medium having recorded thereon a program for performing a method of communicating between multiple processes in an electronic device, An operation in which a first process transmits data and information to multiple receiving processes to a control process; An operation in which the above control process checks the associated process of each of the plurality of receiving processes; If at least one receiving process includes the associated process, an operation of setting the data transmission order of the plurality of receiving processes based on the associated process; and A non-transitory computer-readable storage medium having recorded thereon a program for performing a method including: sequentially transmitting the data to the plurality of receiving processes based on the set data transmission order.
Citation Information
Patent Citations
Method and device for computer operation analysis and display, and computer program
JP2003157185A
Parallel processor, parallel processing method, and program
JP2017162266A
Data dependency analysis device, information processing device, data dependency analysis method, and program
JP5387584B2
Multi-process interactive systems and methods
KR1020110079839A
Apparatus for displaying images and driving method thereof, method for processing information related to cloud infrastructure, method for setting relation between cloud infrastructure resources and computer-readable recording medium
KR1020150074411A