Inter-process communication method and device, storage medium and electronic equipment
By establishing target mapping in the microkernel operating system, the message buffer area of the sending process is dynamically mapped to the virtual address space of the receiving process, which solves the problems of low inter-process communication efficiency and complex memory management, realizes fast synchronous communication and improves efficiency. System performance.
Patent Information
- Application Number
- CN202410779050.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-10-15
AI Technical Summary
Inter-process communication methods in microkernel operating systems have problems such as high overhead, low efficiency, or complex memory management. Especially when there are multiple sending and receiving processes, memory partitioning and synchronization mechanisms need to be carefully managed, leading to performance degradation and security issues. .
By establishing a target mapping in the kernel, the message buffer of the sending process is dynamically mapped to the virtual address space of the receiving process, and the receiving process is awakened to directly access the physical address space to achieve fast synchronous communication between processes.
It improves communication efficiency, reduces memory management complexity, avoids the need for data replication and synchronization mechanisms, and enhances system performance and security.
Smart Images

Figure CN118779126A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of operating system technology, and in particular to an inter-process communication method, device, storage medium and electronic device. Background Art
[0002] In a microkernel operating system, different processes have their own independent virtual address spaces, and microkernel processes send / receive messages through IPC (inter-process communication). There are usually two ways to implement IPC in a microkernel system: (1) message replication, where the kernel copies the data in the message buffer of the sending process to the message buffer of the receiving process; (2) memory sharing: the sending process and the receiving process map the same physical memory to their respective virtual address spaces, and messages can be directly transmitted through shared memory.
[0003] The former requires data copying in the kernel space for each communication, and has many steps in data transmission, resulting in high overhead and slow speed for inter-process communication. The latter allows processes to directly read and write shared memory areas without the need for data copying, thereby improving communication efficiency. However, when there are multiple sending and receiving processes, the memory partitioning and synchronization mechanism need to be carefully managed, which increases the complexity of memory management. Otherwise, it may cause performance degradation, deadlock, security issues, etc. Summary of the invention
[0004] In order to solve the technical problems of high overhead, low efficiency or complex memory management in the IPC implementation method in the above-mentioned microkernel operating system, the present disclosure proposes an inter-process communication method, device, storage medium and electronic device, which can realize fast synchronous communication between processes.
[0005] In one aspect, the present disclosure provides an inter-process communication method, which is applied to a kernel module and includes:
[0006] In the case of obtaining a sending request of a first process and a receiving request of a second process, determining a first buffer area and a physical address space of the first buffer area, wherein the first buffer area is an area in a virtual address space of the first process for storing target data, and the target data is data that the first process needs to transfer to the second process;
[0007] determining a first virtual address space of the second process;
[0008] Establishing a target mapping, wherein the target mapping is used to define a dynamic mapping between a physical address space of the first cache area and the first virtual address space;
[0009] The second process is controlled to run so that the second process accesses the physical address space of the first cache area according to the target mapping to achieve communication with the first process.
[0010] In a further embodiment, the method further comprises:
[0011] When a sending request of the first process is obtained and a receiving request of the second process is not obtained, the first process is put into a sleep state; and when a receiving request of the second process is obtained and a sending request of the first process is not obtained, the second process is put into a sleep state.
[0012] In a further embodiment, the method further comprises:
[0013] When a sending request of the first process and a receiving request of the second process are obtained, waking up the first process so that the first process starts running;
[0014] Controlling the second process to run includes:
[0015] Waking up the second process so that the second process is in a ready state;
[0016] The running first process is switched to the second process.
[0017] In a further embodiment, before establishing the target mapping, the method further includes:
[0018] A second cache area is allocated based on the physical address space of the first cache area, the second cache area is a free area in the first virtual address space, and the second cache area is used to establish the target mapping with the physical address space of the first cache area.
[0019] In a further embodiment, said establishing a target mapping comprises:
[0020] Obtaining a page table of the second process, where the page table is used to store mapping information from virtual addresses to physical addresses;
[0021] The target mapping information is created in the page table to complete the establishment of the target mapping, wherein the target mapping information is used to specify the corresponding relationship between the physical address space of the second cache area and the first cache area.
[0022] In a further embodiment, after controlling the second process to run, the method further includes:
[0023] In response to the reply request of the second process, releasing the target mapping;
[0024] Control the operation of the first process so that the first process accesses the physical address space corresponding to the first cache area to obtain a processing result, wherein the processing result is obtained by the second process accessing the physical address space of the first cache area, reading and processing the target data according to a preset logic.
[0025] In a further embodiment, the kernel module includes a first system call interface and a second system call interface;
[0026] The sending request of the first process is a message sending request sent by the first process to the kernel module by calling the first system call interface;
[0027] The receiving request of the second process is a receiving message request sent by the second process to the kernel module by calling the second system call interface.
[0028] On the other hand, the present disclosure further provides an inter-process communication device, the device comprising:
[0029] The memory management unit is used to perform the following operations:
[0030] In the case of obtaining a sending request of a first process and a receiving request of a second process, determining a first buffer area and a physical address space of the first buffer area, wherein the first buffer area is an area in a virtual address space of the first process for storing target data, and the target data is data that the first process needs to transfer to the second process;
[0031] determining a first virtual address space of the second process;
[0032] Establishing a target mapping, wherein the target mapping is used to define a dynamic mapping between a physical address space of the first cache area and the first virtual address space;
[0033] A process control module is used to control the operation of the second process so that the second process accesses the physical address space of the first cache area according to the target mapping to achieve communication with the first process.
[0034] On the other hand, the present disclosure also provides a computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the above-mentioned inter-process communication method.
[0035] On the other hand, the present disclosure also provides an electronic device, comprising at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements the above-mentioned inter-process communication method by executing the instructions stored in the memory.
[0036] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
[0037] The implementation of this disclosure has the following beneficial effects:
[0038] The present disclosure wakes up the receiving process after the kernel dynamically maps the message buffer area of the sending process to the virtual address space of the receiving process, so that the receiving process starts running directly. The receiving process can access the physical address like accessing its own virtual address, read and process the target data from the physical address, without copying the message in the kernel, thereby improving the communication efficiency, and directly wakes up the receiving process to run after establishing the dynamic mapping, without waiting for the scheduler to select the executable program, further improving the communication efficiency between processes. When there are multiple sending processes sending messages, each time the receiving process receives a message from a sending process, the message is passed to the receiving process through temporary dynamic mapping, without the need to divide the physical memory for each process and set the synchronization mechanism, reducing the complexity of memory management.
[0039] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions and advantages in the embodiments of this specification or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 A schematic diagram of an IPC-based inter-process communication architecture according to an embodiment of the present disclosure is shown;
[0042] Figure 2 A schematic diagram showing a flow chart of an inter-process communication method according to an embodiment of the present disclosure;
[0043] Figure 3 A mapping schematic diagram showing an inter-process communication method according to an embodiment of the present disclosure;
[0044] Figure 4A structural block diagram of an inter-process communication device according to an embodiment of the present disclosure is shown;
[0045] Figure 5 A schematic diagram of an electronic device according to an embodiment of the present disclosure is shown.
[0046] Among them, 110 is a memory management unit; 120 is a process control module. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0049] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0050] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0051] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0052] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0053] A microkernel is an operating system kernel design concept that moves most of the operating system's services and functions to user space, while retaining only the most basic core functions in kernel space. These basic functions typically include process management, interrupt handling, memory management, and the like. In a microkernel architecture, services and drivers are implemented as independent processes, each of which runs in its own virtual address space. These processes interact with the microkernel through an inter-process communication (IPC) mechanism to request services provided by the kernel. The inter-process communication method provided in the disclosed embodiment is designed for a microkernel architecture. Figure 1 FIG. 4 shows a schematic diagram of an IPC-based inter-process communication architecture provided by an embodiment of the present disclosure, such as Figure 1 As shown, the implementation of the inter-process communication method in the embodiment of the present disclosure relies on the IPC mechanism.
[0054] Figure 2 A flow chart of an inter-process communication method according to an embodiment of the present disclosure is shown. The method is applied to a kernel module, and the kernel module includes an inter-process communication (IPC) module. The IPC module provides a series of communication mechanisms and interfaces, so that different processes can exchange data and information safely and efficiently. The method is a specific communication means implemented based on the interface provided by the IPC module, such as Figure 2 As shown, the above method includes:
[0055] S101, when a sending request of a first process and a receiving request of a second process are obtained, determining a first cache area and a physical address space of the first cache area, wherein the first cache area is an area in a virtual address space of the first process for storing target data, and the target data is data that the first process needs to transfer to the second process;
[0056] In the disclosed embodiment, the first process is the sending process, which is recorded as process A, and the second process is the receiving process, which is recorded as process B. The virtual address space of the process includes a code area (Text), a data area (Data) and a buffer area (Buffer). The IPC module in the kernel module provides a first system call interface and a second system call interface. The system call interface is a set of interfaces provided by the operating system to the process, allowing the process to request services provided by the kernel. These services include file operations, process management, network communication, memory management, etc. The system call is the main interaction method between the process and the operating system kernel, which provides a controlled way for the process to access hardware resources and operating system functions.
[0057] The sending request of the first process is a message sending request issued by the first process to the kernel module by calling the first system call interface. Specifically, the first process initiates an IPC operation, i.e., a data sending request, by calling the first system call interface provided by the operating system. For example, if it is in a UNIX or UNIX-like system, the first process can call a system call such as send() or write() to send a message to the second process. In this process, the first process needs to specify the identifier of the second process, the message content, and other necessary parameters.
[0058] The receiving request of the second process is a receiving message request sent by the second process to the kernel module by calling the second system call interface, which means that the second process is waiting for data or messages from the first process. The second system call interface usually involved in this process may be read(), recv(), msgrcv(), etc. These interfaces allow the second process to specify a buffer to receive data sent by the first process through the IPC mechanism.
[0059] For example, the first process issues a send request by calling the first system call interface and enters the kernel space. If the second process is waiting for a message at this time, that is, the second process has called the second system call interface to issue a receive request, the operating system kernel determines the first cache area and the physical address space of the first cache area through the memory management unit (MMU). The first cache area is an area in the virtual address space of the first process for storing target data, and the target data is data that the first process needs to pass to the second process.
[0060] S102, determining a first virtual address space of the second process;
[0061] For example, in the Linux kernel, the virtual address space of a process is managed by the mm_struct structure, and each process has an mm_struct instance. This structure contains various information about the virtual address space of the process, such as the page global directory (PGD), the list and tree of virtual memory areas (VMA), etc. The kernel can determine the virtual address space of the second process through the mm_struct structure. This structure contains information such as the starting address, the ending address, and the address of the page global directory table of the virtual address space. The kernel also maintains a red-black tree of virtual memory areas for quickly locating specific virtual memory areas.
[0062] S103: Establish a target mapping, where the target mapping is used to define a dynamic mapping between the physical address space of the first cache area and the first virtual address space. Figure 3 A mapping diagram of an inter-process communication method according to an embodiment of the present disclosure is shown. Figure 3 As shown, the embodiment of the present disclosure establishes a dynamic mapping between the A Buffer in the physical address space corresponding to the A Buffer of the A process and the B Buffer of the B process, so that the B process can access the A Buffer to achieve data sharing.
[0063] Specifically, a page table of the second process is obtained, where the page table is used to store mapping information from virtual addresses to physical addresses. The page table is a key data structure in computer memory management, which is used to implement mapping from virtual addresses to physical addresses in a virtual memory system. The mapping information refers to the correspondence between specific virtual addresses and physical addresses recorded in the page table, as well as related access permissions and other attributes.
[0064] Specifically, each process has a corresponding process control block (or task structure) in the kernel, which contains all information related to the process, including a pointer to the page table. When the kernel needs to obtain the page table of a process, it can access the process's PCB through a system call or in response to a hardware interrupt to obtain the address of the page table.
[0065] The target mapping information is created in the page table to complete the establishment of the target mapping, wherein the target mapping information is used to specify the corresponding relationship between the physical address space of the second cache area and the first cache area.
[0066] Specifically, the kernel usually provides a series of page table management functions for creating, updating, and deleting page table entries. The kernel traverses the page table through the page table management function and finds the appropriate page table entry (PTE) to fill in the new mapping information. For the second cache area to be mapped, the kernel sets the physical address, access rights, and other flags. It should be noted that after setting the page table entry, the kernel may need to notify the processor to update its address translation lookaside buffer (TLB) so that the processor can start using the new mapping. This usually involves a hardware operation, such as refreshing the TLB or using specific instructions to make the new page table effective.
[0067] S104: Control the second process to run, so that the second process accesses the physical address space of the first cache area according to the target mapping, and realizes communication with the first process.
[0068] The disclosed embodiment wakes up the receiving process after the kernel dynamically maps the message buffer area of the sending process to the virtual address space of the receiving process, so that the receiving process starts running directly. The receiving process can access the physical address as if it accesses its own virtual address, read and process the target data from the physical address, without copying the message in the kernel, thereby improving communication efficiency. After the dynamic mapping is established, the receiving process is directly woken up to run without waiting for the scheduler to select an executable program, thereby further improving the communication efficiency between processes and realizing fast synchronous communication between processes.
[0069] In the embodiment of the present disclosure, when the sending request of the first process is obtained and the receiving request of the second process is not obtained, the first process is put into a sleep state, and when the receiving request of the second process is obtained and the sending request of the first process is not obtained, the second process is put into a sleep state. That is to say, when any process is not ready during the communication process, the process waiting for communication is put into a sleep state until both parties are ready to communicate. The process does not occupy CPU resources while waiting, which can reduce the system load and improve the overall efficiency.
[0070] When a sending request of a first process and a receiving request of a second process are obtained, the first process is awakened so that the first process starts running. The process is activated only when needed, thereby avoiding unnecessary CPU occupation and optimizing resource utilization;
[0071] Controlling the second process to run includes:
[0072] Waking up the second process so that the second process is in a ready state. In a multi-process environment, accurately waking up related processes can ensure synchronization and coordination between processes and avoid data inconsistency or race conditions.
[0073] The first process being run is switched to the second process. After the dynamic mapping is established, the second process is directly run without using a scheduler for scheduling, thereby enabling fast synchronous communication between processes and improving communication efficiency.
[0074] In the embodiment of the present disclosure, before establishing the target mapping, the method further includes:
[0075] A second cache area is allocated based on the physical address space of the first cache area, the second cache area is an idle area in the first virtual address space, and the second cache area is used to establish the target mapping with the physical address space of the first cache area. Before establishing the target mapping, sufficient space is reserved in the second process for establishing a mapping with the physical address of the first cache area, which reduces the time for searching for available virtual space, thereby improving the efficiency of memory management.
[0076] In the embodiment of the present disclosure, after controlling the second process to run, the method further includes:
[0077] In response to the reply request of the second process, the target mapping is released. When the message processing is completed, the mapping is immediately revoked to release resources and avoid long-term occupation of resources. This is particularly important for systems with limited memory and CPU resources, and can improve resource utilization.
[0078] The first process is controlled to run so that the first process accesses the physical address space corresponding to the first buffer area to obtain a processing result, which is obtained by the second process accessing the physical address space of the first buffer area, reading and processing the target data according to a preset logic. When there are multiple first processes sending messages, each time the second process receives a message from a first process, it passes the message to the second process through temporary dynamic mapping, and the second process reads the message and processes it. The second process puts the processing result or error into the message buffer area of the first process, and enters the kernel through a reply operation. The kernel releases the temporary dynamic mapping of the physical address space corresponding to the message buffer area in the second process, wakes up the first process, and enables the first process to run and process the result or error. Dynamic mapping allows the system to adjust resource allocation according to actual communication needs during operation, rather than relying on static configuration. The system can dynamically optimize message routing according to load conditions and network status to improve overall performance. Through temporary dynamic mapping, communication can be carried out without the need to permanently store mapping information, reducing the need to maintain long-term mapping tables. This reduces the complexity of the system and may reduce errors caused by outdated mapping information. In summary, message passing through temporary dynamic mapping is an efficient, flexible and secure communication method suitable for modern complex computing environments, especially those scenarios that require high concurrent processing and good scalability.
[0079] Figure 4 A structural block diagram of an inter-process communication device according to an embodiment of the present disclosure is shown as follows: Figure 4 As shown, the embodiment of the present disclosure also provides an inter-process communication device, the device comprising:
[0080] The memory management unit (110) is used to perform the following operations:
[0081] In the case of obtaining a sending request of a first process and a receiving request of a second process, determining a first buffer area and a physical address space of the first buffer area, wherein the first buffer area is an area in a virtual address space of the first process for storing target data, and the target data is data that the first process needs to transfer to the second process;
[0082] determining a first virtual address space of the second process;
[0083] Establishing a target mapping, wherein the target mapping is used to define a dynamic mapping between a physical address space of the first cache area and the first virtual address space;
[0084] A process control module (120) is used to control the operation of the second process so that the second process accesses the physical address space of the first cache area according to the target mapping to achieve communication with the first process.
[0085] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0086] The embodiment of the present disclosure also provides a computer-readable storage medium, wherein at least one instruction or at least one program is stored in the computer-readable storage medium, and the at least one instruction or at least one program is loaded and executed by a processor to implement the above-mentioned inter-process communication method. The computer-readable storage medium may be a non-volatile computer-readable storage medium.
[0087] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure is shown in FIG. Figure 5 As shown, an embodiment of the present disclosure further provides an electronic device, the electronic device includes at least one processor, and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements the above-mentioned inter-process communication method by executing the instructions stored in the memory. The electronic device can be provided as a terminal, a server, or other forms of devices.
[0088] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the above-mentioned module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the standard function in the square box can also occur in a sequence different from the standard in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a special hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0089] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for inter-process communication, It is characterized in that The method is applied to a kernel module, and the method comprises: In the case of obtaining a sending request of a first process and a receiving request of a second process, determining a first buffer area and a physical address space of the first buffer area, wherein the first buffer area is an area in a virtual address space of the first process for storing target data, and the target data is data that the first process needs to transfer to the second process; determining a first virtual address space of the second process; Establishing a target mapping, wherein the target mapping is used to define a dynamic mapping between a physical address space of the first cache area and the first virtual address space; The second process is controlled to run so that the second process accesses the physical address space of the first cache area according to the target mapping to achieve communication with the first process.
2. The inter-process communication method according to claim 1, It is characterized in that The method further comprises: When a sending request of the first process is obtained and a receiving request of the second process is not obtained, the first process is put into a sleep state; and when a receiving request of the second process is obtained and a sending request of the first process is not obtained, the second process is put into a sleep state.
3. The inter-process communication method according to claim 2, It is characterized in that The method further comprises: When a sending request of the first process and a receiving request of the second process are obtained, waking up the first process so that the first process starts running; The controlling the second process to run includes: Waking up the second process so that the second process is in a ready state; The running first process is switched to the second process.
4. The inter-process communication method according to any one of claims 1 to 3, It is characterized in that Before establishing the target mapping, the method further includes: A second cache area is allocated based on the physical address space of the first cache area, the second cache area is a free area in the first virtual address space, and the second cache area is used to establish the target mapping with the physical address space of the first cache area.
5. The inter-process communication method according to claim 4, It is characterized in that The establishing of target mapping comprises: Obtaining a page table of the second process, where the page table is used to store mapping information from virtual addresses to physical addresses; The target mapping information is created in the page table to complete the establishment of the target mapping, wherein the target mapping information is used to specify the corresponding relationship between the physical address space of the second cache area and the first cache area.
6. The inter-process communication method according to any one of claim 5, It is characterized in that After controlling the second process to run, the method further includes: In response to the reply request of the second process, releasing the target mapping; Control the operation of the first process so that the first process accesses the physical address space corresponding to the first cache area to obtain a processing result, wherein the processing result is obtained by the second process accessing the physical address space of the first cache area, reading and processing the target data according to a preset logic.
7. The inter-process communication method according to claim 6, wherein the kernel module comprises a first system call interface and a second system call interface; The sending request of the first process is a message sending request sent by the first process to the kernel module by calling the first system call interface; The receiving request of the second process is a receiving message request sent by the second process to the kernel module by calling the second system call interface.
8. An inter-process communication device, It is characterized in that The device comprises: The memory management unit is used to perform the following operations: In the case of obtaining a sending request of a first process and a receiving request of a second process, determining a first buffer area and a physical address space of the first buffer area, wherein the first buffer area is an area in a virtual address space of the first process for storing target data, and the target data is data that the first process needs to transfer to the second process; determining a first virtual address space of the second process; Establishing a target mapping, wherein the target mapping is used to define a dynamic mapping between a physical address space of the first cache area and the first virtual address space; A process control module is used to control the operation of the second process so that the second process accesses the physical address space of the first cache area according to the target mapping to achieve communication with the first process.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the inter-process communication method as described in any one of claims 1 to 7.
10. An electronic device, It is characterized in that It includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements the inter-process communication method as described in any one of claims 1 to 7 by executing the instructions stored in the memory.
Citation Information
Cited By
Automatic discovery method and related apparatus
WO2026170332A1
Data processing method and apparatus
WO2026208458A1
