XPC Engine Direct Context Switching for Microkernel IPC

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The microkernel architecture experiences significant performance losses due to high inter-process communication (IPC) overheads, primarily attributed to context switching overheads, which are exacerbated by the need for kernel intervention.

Innovation Solution

The introduction of a communication engine, referred to as the XPC engine, which enables direct context switching between processes by executing specific instructions (xcall and xret) asynchronously, thereby reducing kernel intervention and improving IPC efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If microkernel architecture is used to enhance isolation and reliability, then system reliability is improved, but IPC communication duration increases

Engineering Contradiction:
Improvesystem reliabilityVSAvoidIPC communication duration
Core Design Contradiction:
ReliabilityVSDuration of action of moving object

Solution Approach 1:

The patent segments the context switching process into two independent phases: (1) user-mode context switching between caller and callee processes, and (2) kernel-mode operations for privilege changes and system calls. This segmentation allows most IPC communication to occur in user mode without kernel intervention, reducing IPC duration while maintaining the microkernel's reliability benefits through selective kernel involvement only when necessary.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a user-mode context switch mechanism as an intermediary layer between caller and callee processes. This intermediary enables direct process-to-process communication in user mode, eliminating the need for repeated kernel mode transitions and reducing communication duration while preserving the isolation and reliability guarantees of the microkernel architecture.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If kernel intervention is used for context switching, then system control and security are maintained, but context switching overhead increases

Engineering Contradiction:
Improvesystem controlVSAvoidcontext switching overhead
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent divides context switching into user-mode switching (for process context) and kernel-mode operations (for privilege management). This segmentation allows the time-consuming context switching to occur in user mode without kernel intervention, reducing overhead while maintaining system control through selective kernel involvement for security-critical operations.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary setup of process contexts and communication channels in user mode before actual IPC operations. By pre-configuring context information and establishing communication pathways without kernel intervention, the system reduces real-time context switching overhead while maintaining security through initial kernel-validated setup.

Inventive Principle:
Principle #10Preliminary action

3Device complexity

If direct process switch is implemented to simplify IPC processing, then kernel intervention is reduced, but context switching overhead remains high

Engineering Contradiction:
ImproveIPC processing complexityVSAvoidcontext switching overhead
Core Design Contradiction:
Device complexityVSLoss of time

Solution Approach 1:

The patent segments the context switching mechanism into user-mode context management and kernel-mode privilege management. This segmentation simplifies IPC processing by allowing direct process switching in user mode while maintaining necessary kernel control for security, thereby reducing both complexity and time overhead compared to traditional kernel-mediated context switching.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentEP3968160B1Inter-process communication method and apparatus, and computer device
Publication Date: 2025.01.22 HUAWEI TECH CO LTD
  • EP3968160B1 patent drawingFigure 1
  • EP3968160B1 patent drawingFigure 2
  • EP3968160B1 patent drawingFigure 3(a)~3(b)

AI summary

A method for inter-process communication, a related apparatus for implementing the method, a computer device, and the like are provided. The method may be applied to an intelligent terminal, a self-driving device, and the like. The method mainly includes: A communication engine running at a hardware layer or a high-level software layer provides a context switching instruction, and when a caller running in a user mode calls a callee, context switching is directly implemented by calling the context switching instruction without trapping into a kernel mode. Therefore, kernel intervention in context switching is avoided to some extent, and an execution time of inter-process communication IPC is shortened.