User-Mode Interrupt Scheduling Without Preemption or Core Switching
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Ensuring real-time performance of processing user mode interrupts in operating systems is challenging due to factors such as preemption and core switching during interrupt processing, which affect the performance of drivers.
Innovation Solution
An interrupt processing method that replaces the common running entity with a simplified interrupt running entity, allowing for faster response times and avoiding operations like preemption or core switching by using an interrupt running entity resource pool with different priorities, and ensuring that interrupts with higher priorities are processed first.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a common running entity is used to process interrupts in user mode, then the interrupt processing can be performed with complete running context information, but the interrupt response speed is reduced and real-time performance cannot be ensured
Solution Approach 1:
The patent segments the running entity into two distinct types: common running entities for normal execution and interrupt running entities for interrupt processing. This segmentation allows the system to use a simplified interrupt running entity during interrupt handling, which contains only essential context information needed for interrupt processing, thereby reducing the time required for context switching and improving interrupt response speed while maintaining processing completeness through dedicated interrupt handling routines.
Solution Approach 2:
The patent changes the parameter of the running entity by creating a specialized interrupt running entity with reduced context information compared to a common running entity. This parameter change (reducing context information) is specifically applied during interrupt processing to accelerate response time, while the system can switch back to common running entities for normal operation, thus dynamically adjusting the parameter based on operational requirements.
2Adaptability or versatility
If preemption and core switching are performed during interrupt processing, then scheduling flexibility is improved, but real-time performance of interrupts is degraded
Solution Approach 1:
The patent implements dynamic behavior by making the scheduler aware of interrupt running entities and adjusting its behavior accordingly. When an interrupt running entity is detected, the scheduler dynamically disables preemption and core switching to ensure real-time performance. This dynamic adjustment allows the system to maintain scheduling flexibility during normal operation while guaranteeing real-time performance during interrupt processing, effectively resolving the contradiction between adaptability and reliability.
Data Source
AI summary
An interrupt processing method includes when a first interrupt request is triggered, determining a target CPU that responds to the first interrupt request; determining a first target interrupt running entity in the target CPU; scheduling a target thread from a user mode to a kernel mode; replacing a running entity in the target thread with the first target interrupt running entity; and scheduling the target thread including the first target interrupt running entity to the user mode, and running the first target interrupt running entity by using the target CPU.


