Dynamic Context Switching for Distributed Storage I/O Processes
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing distributed storage systems face challenges in multitasking, as I/O service processes consume 100% of processor core time, preventing other processes from executing without causing system instability when using standard preemption techniques.
Innovation Solution
A method and apparatus for dynamic multitasking in a storage system, where a first storage server detects events to trigger context switches, pauses the I/O service process, and executes a context switch between I/O service processes on the same processor core, allowing other processes to run without impairing system performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If standard preemption techniques are used to allow other processes to execute on the processor core, then processor core sharing is enabled, but system instability occurs because I/O service processes consume 100% of processor core time
Solution Approach 1:
The system dynamically adjusts the execution state of I/O service processes based on detected events. When a context switch event is detected, the I/O service process transitions from an active state consuming 100% processor time to a paused state, allowing dynamic sharing of the processor core while maintaining system stability through controlled state transitions rather than fixed allocation
Solution Approach 2:
The invention changes the processor time allocation parameter for I/O service processes from a fixed 100% consumption to a variable allocation. By pausing the I/O service process and its associated I/O providers when context switch events occur, the system modifies the execution parameter to enable other processes to share the processor core without causing instability
2Productivity
If I/O service processes consume 100% of processor core time to maintain performance, then system performance is optimized, but other processes cannot execute on the same processor core
Solution Approach 1:
The system implements periodic context switching by monitoring for specific events that trigger pauses in I/O service process execution. This periodic interruption allows other processes to execute on the same processor core at designated intervals, enabling multitasking while maintaining I/O service performance through resumption of the paused processes after context switches complete
Solution Approach 2:
The I/O service process execution is made dynamic rather than static. The process can transition between full-execution mode (consuming 100% processor time for optimal performance) and paused mode (allowing other processes to run), with these transitions triggered by detected events. This dynamic behavior enables the system to alternate between performance optimization and multitasking based on operational needs
3Adaptability or versatility
If context switches are implemented to enable process sharing, then processor core utilization is improved, but I/O service process execution is interrupted
Solution Approach 1:
The system performs preliminary pausing of the I/O service process and its associated I/O providers before the context switch occurs. By proactively stopping the I/O service process and preventing new I/O requests from being submitted to paused providers, the system prepares the system state in advance to minimize disruption and enable clean context switches with reduced I/O service interruption time
Data Source
AI summary
A method is disclosed for dynamic multitasking in a storage system, the storage system including a first storage server configured to execute a first I/O service process and one or more second storage servers, the method comprising: detecting a first event for triggering a context switch; transmitting to each of the second storage servers an instruction to stop transmitting internal I/O requests to the first I/O service process, the instruction including an identifier corresponding to the first I/O service process, the identifier being arranged to distinguish the first I/O service process from other first I/O service processes that are executed by the first storage server concurrently with the first I/O service process; deactivating the first I/O service process by pausing a frontend of the first I/O service process, and pausing one or more I/O providers of the first I/O service process; and executing a first context switch between the first I/O service process and a second process.


