An Improved RTEMS Supporting Real-Time Detection of Stack Overflow

2019 
Aiming at the common problem of stack overflow in satellite software, this paper improves the RTEMS operating system which is supporting real-time stack use depth and overflow detection. Taking the on-board software based on TSC690F processor as an example, the accessible area and unaccessible area are set for each thread stack by using the memory access protection mechanism provided by the processor. The improved RTEMS shared the access protection mechanism among threads through context switching. A trap handler is designed to take over write protection error traps, calculate stack usage depth, and monitor stack overflow in real time. The core module performance test and stack detection instance verification show that the improved RTEMS has little effect on the software performance, so that the software can detect the stack depth online and real-time. By using this method, the software is still manageable in case of stack overflow, rather than runaway crash, and the reliability of the software is improved.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    4
    References
    1
    Citations
    NaN
    KQI
    []