Inter-Process Function Calling Without IPC Data Copying
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing microkernel-based operating system architectures face performance issues due to the overheads incurred by input parameter data copying during inter-process function calls, which are necessary for security isolation between processes.
Innovation Solution
An inter-process function calling method that allows a first process to remotely execute a second function in a system service process's physical memory address space by configuring access permissions through a system call, eliminating the need for process switching and data copying.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If IPC-based function calling is used to ensure security isolation between processes, then process security is improved, but function calling overhead increases
Solution Approach 1:
The patent introduces a memory protection key (MPK) as an intermediary mechanism between user processes and system service processes. The MPK serves as a mediator that enables direct memory access while maintaining security isolation, eliminating the need for traditional IPC-based data copying and process switching overheads.
Solution Approach 2:
The patent changes the memory access parameters by introducing MPK-based direct memory access capability. Instead of copying data through kernel buffers and process context switching, the system allows user processes to directly access system service memory spaces through configured MPKs, fundamentally changing how inter-process communication occurs.
2Reliability
If input parameter data is copied twice through kernel data segment, then data transmission reliability is improved, but time consumption increases
Solution Approach 1:
The MPK acts as a security intermediary that enables direct memory access between user processes and system service processes. This eliminates the traditional two-step data copying process (user process → kernel data segment → system service process) and allows single-step direct access, reducing time consumption while maintaining data transmission reliability through MPK-based access control.
Solution Approach 2:
The patent segments memory access into different protected spaces (user process memory and system service memory) separated by MPKs. This segmentation allows direct access between segments through properly configured MPKs, eliminating the need for intermediate copying steps while maintaining security and reliability.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Embodiments of this application disclose an inter-process function calling method, and the method may be used in a small embedded device or an Internet of things device. The method includes: A first process remotely calls and executes, according to a first function readable and executable for a user-mode process, a second function in physical memory address space of a first system service process. The first function readable and executable for all processes in user mode is used, so that the first process may remotely call, according to the first function, the second function stored in the physical memory address space of the first system service process. In this way, the first process executes the second function. In comparison with a conventional technology in which an IPC-based function calling manner requires process switching and data copying, in embodiments of this application, process switching and data copying are not required when the first process calls the second function of the first system service process. From a mechanism logic level, this improves performance of calling the second function of the first system service process.