Embedded Stack Corruption Recovery via Backup Copying
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Modern automotive software systems face inefficiencies in recovering from stack-overflow/underflow faults, which often require hardware or software restarts, leading to unacceptable downtime in real-time environments.
Innovation Solution
A method that involves copying portions of the memory stack and state variable data to a backup location during task switches, allowing for restoration and estimation of corrupted data without restarting software or hardware, using techniques to detect and recover from stack-overflow/underflow faults.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If hardware or software restart is performed to recover from stack-overflow/underflow faults, then system reliability is improved, but system downtime increases and productivity decreases
Solution Approach 1:
The patent applies preliminary action by creating backup copies of the stack memory and state variables before task execution begins. This allows the system to restore from these pre-prepared backups immediately upon detecting a stack fault, avoiding the time-consuming hardware or software restart process while maintaining system reliability
Solution Approach 2:
The patent implements copying by creating duplicate copies of the stack memory region and state variable data and storing them in a protected backup memory area. When a stack-overflow or stack-underflow fault occurs, these copies enable rapid restoration of the corrupted data without requiring a full system restart, thus resolving the contradiction between reliability and downtime
2Reliability
If backup memory and state variable copying is implemented at every task switch, then fault recovery capability is improved, but memory usage and processor overhead increase
Solution Approach 1:
The patent applies local quality by selectively backing up only the specific portions of memory that are susceptible to corruption (the stack region and state variables) rather than the entire system memory. This targeted approach provides adequate fault recovery capability while minimizing the additional memory consumption and processor overhead associated with comprehensive backups
Data Source
AI summary
A method and system for recovering from stack-overflow or stack-underflow faults without restarting software or hardware. At every task switch operation in an application program, a portion of the memory stack is copied to a backup location, so that portion of the stack can be restored if it is subsequently corrupted by a stack-overflow or stack-underflow fault during the execution of the next task. State variable data is similarly copied to a backup location, so that it can be used to restore or estimate the output of the next task if that task experiences a fault. Techniques are disclosed for selecting which state variable data and which portion of the memory stack to copy to backup, and for detecting a stack-overflow or stack-underflow fault and restoring state variable and memory data in the event of such a fault.


