Hopter: a Safe, Robust, and Responsive Embedded Operating System
Microcontroller-based embedded systems are vulnerable to memory safety errors and must be robust and responsive because they are often used in unmanned and mission-critical scenarios. The Rust programming language offers an appealing compile-time solution for memory safety but leaves stack overflows unresolved and foils zero-latency interrupt handling. We present Hopter, a Rust-based embedded operating system (OS) that provides memory safety, system robustness, and interrupt responsiveness to embedded systems while requiring minimal application cooperation. Hopter executes Rust code under a novel finite-stack semantics that converts stack overflows into Rust panics, enabling recovery from fatal errors through stack unwinding and restart. Hopter also employs a novel mechanism called soft-locks so that the OS never disables interrupts. We compare Hopter with other well-known embedded OSes using controlled workloads and report our experience using Hopter to develop a flight control system for a miniature drone and a gateway system for Internet of Things (IoT). We demonstrate that Hopter is well-suited for resource-constrained microcontrollers and supports error recovery for real-time workloads.
Authors
- Z. Chen
- Guojun Chen (ORCID: https://orcid.org/0009-0001-6450-4983)
- Lin Zhong (ORCID: https://orcid.org/0000-0003-0840-167X)
- Zhiyao Ma (ORCID: https://orcid.org/0000-0002-1868-4856)
Institutions
- Yale University (US)
Publication Details
- Published
- 2025-06-23
- DOI
- https://doi.org/10.1145/3711875.3729149
- Primary Topic
- Advanced Malware Detection Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Science Foundation
- Yale University