Abstract
Embedded systems in safety-critical environments are continuously required to deliver more performance and functionality, while expected to provide verified safety guarantees. Nonetheless, platform-wide software verification (required for safety) is often expensive. Therefore, design methods that enable utilization of components such as real-time operating systems (RTOS), without requiring their correctness to guarantee safety, is necessary. In this paper, we propose a design approach to deploy safe-by-design embedded systems. To attain this goal, we rely on a small core of verified software to handle faults in applications and RTOS and recover from them while ensuring that timing constraints of safety-critical tasks are always satisfied. Faults are detected by monitoring the application timing and fault-recovery is achieved via full platform restart and software reload, enabled by the short restart time of embedded systems. Schedulability analysis is used to ensure that the timing constraints of critical plant control tasks are always satisfied in spite of faults and consequent restarts. We derive schedulability results for four restart-tolerant task models. We use a simulator to evaluate and compare the performance of the considered scheduling models.
Introduction
Modern safety-critical cyber-physical systems (CPS)—such as medical devices, avionics, and autonomous vehicles—increasingly rely on complex hardware and software stacks. This includes real-time operating systems (RTOS), multi-core processors, and unverified third-party libraries. Formally verifying this entire stack to guarantee safety is prohibitively expensive, if not impossible. Consequently, bugs in the OS or complex application layers can cause silent failures or crashes that jeopardize the physical system.
This paper proposes a novel fault-tolerance mechanism for safety-critical embedded systems that relies on rapid, full-system restarts to recover from software and OS faults. By combining the Simplex Architecture with rigorous schedulability analysis, we demonstrate that critical control tasks can safely re-execute and meet their deadlines even if the system reboots mid-operation.
Restart-Based Recovery (RBR) Architecture
We propose a Restart-Based Recovery (RBR) approach. The software is structured using the Simplex Architecture, dividing control into a formally verified Safety Controller (SC), an unverified Complex Controller (CC), and a verified Decision Module (DM).
To handle faults, we introduce a hardware watchdog timer that monitors the execution of critical tasks. If a task fails to complete within its "ideal worst-case response time," the watchdog assumes a fault has occurred and triggers a full system restart from a read-only memory image. To ensure the physical plant remains safe, critical tasks must finish before their deadlines even if a restart occurs. We derive exact mathematical response-time equations (RBR-Feasibility) for four fixed-priority scheduling paradigms:
- Fully Preemptive: High restart overhead because a restart forces all preempted tasks to re-execute.
- Fully Non-Preemptive: Low restart overhead (only the currently running task re-executes) but high blocking times for high-priority tasks.
- Non-Preemptive Ending Intervals: Tasks become non-preemptive near completion, reducing wasted execution time if a restart happens late in a task's lifecycle.
- Preemption Thresholds: Tasks are assigned a higher priority threshold once they start executing, limiting which tasks can preempt them and shrinking the "preemption chain."
The Preemption Chain Penalty
A key insight of this work is the "Preemption Chain Penalty." In fully preemptive systems, a restart at the worst possible time—at the end of a long chain of preemptions—forces all partially executed tasks in the chain to start over. This cascading penalty severely limits the system's ability to guarantee deadlines.
Evaluation and Results
The evaluation relies on synthetically generated periodic task sets to test the mathematical schedulability bounds. For each experiment, 500 task sets were generated with varying CPU utilizations and periods (ranging from 10 to 1000 time units).
Key Findings
- Baseline Feasibility: Under fully preemptive scheduling, most task sets with CPU utilization under 50% remain schedulable (RBR-feasible) despite restart overhead.
- Impact of Task Diversity: When task periods are highly diverse, fully preemptive scheduling outperforms fully non-preemptive scheduling due to the latter's severe blocking issues (low-priority tasks with long execution times block high-priority tasks with short deadlines).
- Limited Preemption Wins: Both "preemption thresholds" and "non-preemptive ending intervals" significantly outperformed the baselines, maintaining high schedulability even as system utilization approached 70-80%.
Conclusion
Restarts can be treated as a first-class recovery mechanism. Instead of complex software recovery blocks, a fast, full-system reboot from a read-only image is highly effective for clearing transient and system-level faults, provided the real-time schedule can absorb the delay. By utilizing limited preemption models, systems can achieve a "Goldilocks" zone: enough preemption to meet tight deadlines, but enough restriction to keep restart overhead manageable.
Future work will address the single fault assumption (modeling fault bursts), explore hardware dependencies like transactional Non-Volatile Memory (NVM), and extend the analysis to multi-core platforms where inter-core interference complicates fault isolation.
Summary updated