Hardware-Assisted Context Preservation for Deterministic Task Switching in a RISC-V Real-Time Execution Model
Abstract
Temporal predictability in real-time preemptive embedded systems is strongly influenced by how execution contexts are interrupted and resumed. This paper investigates whether hardware-assisted context preservation can reduce the temporal jitter introduced by conventional task switching in a RISC-V real-time execution model. A controlled comparative evaluation is performed between a standard shared-pipeline execution configuration and a context-preserving multi-context execution configuration under identical scheduler-driven periodic workloads. The study focuses on determinism-oriented task switching indicators, including deadline misses, preemption counts, switch-related flush events, and accumulated switch overhead. Four control-oriented experimental scenarios are used to expose progressively different switching conditions, ranging from baseline periodic execution to frequent preemption, near-saturation behavior, and tight-deadline pressure. The results show that preserving execution context across preemptions consistently reduces switching overhead and improves deadline-related behavior under recurring real-time activations. The benefits of context-preserving execution become progressively more visible under elevated preemption pressure, reduced timing slack, and tighter deadline conditions. The study therefore provides a controlled comparative basis for analyzing deterministic task switching in RISC-V real-time execution models.