Ownership is theft: Experiences building an embedded OS in rust

Amit Levy, Michael P. Andersen, Bradford Campbell, David Culler, Prabal Dutta, Branden Ghena, Philip Levis, Pat Pannuto

Research output: Chapter in Book/Report/Conference proceedingConference contribution

14 Scopus citations

Abstract

Rust, a new systems programming language, provides compile-time memory safety checks to help eliminate runtime bugs that manifest from improper memory management. This feature is advantageous for operating system development, and especially for embedded OS development, where recovery and debugging are particularly challenging. However, embedded platforms are highly event-based, and Rust's memory safety mechanisms largely presume threads. In our experience developing an operating system for embedded systems in Rust, we have found that Rust's ownership model prevents otherwise safe resource sharing common in the embedded domain, conflicts with the reality of hardware resources, and hinders using closures for programming asynchronously. We describe these experiences and how they relate to memory safety as well as illustrate our workarounds that preserve the safety guarantees to the largest extent possible. In addition, we draw from our experience to propose a new language extension to Rust that would enable it to provide better memory safety tools for event-driven platforms.

Original languageEnglish (US)
Title of host publicationProceedings of the 8th Workshop on Programming Languages and Operating Systems, PLOS 2015
PublisherAssociation for Computing Machinery, Inc
Pages21-26
Number of pages6
ISBN (Electronic)9781450339421
DOIs
StatePublished - Oct 4 2015
Externally publishedYes
Event8th Workshop on Programming Languages and Operating Systems, PLOS 2015 - Monterey, United States
Duration: Oct 4 2015 → …

Publication series

NameProceedings of the 8th Workshop on Programming Languages and Operating Systems, PLOS 2015

Other

Other8th Workshop on Programming Languages and Operating Systems, PLOS 2015
CountryUnited States
CityMonterey
Period10/4/15 → …

All Science Journal Classification (ASJC) codes

  • Hardware and Architecture
  • Software
  • Information Systems

Keywords

  • Embedded Operating Systems
  • Linear Types
  • Ownership
  • Rust

Fingerprint Dive into the research topics of 'Ownership is theft: Experiences building an embedded OS in rust'. Together they form a unique fingerprint.

  • Cite this

    Levy, A., Andersen, M. P., Campbell, B., Culler, D., Dutta, P., Ghena, B., Levis, P., & Pannuto, P. (2015). Ownership is theft: Experiences building an embedded OS in rust. In Proceedings of the 8th Workshop on Programming Languages and Operating Systems, PLOS 2015 (pp. 21-26). (Proceedings of the 8th Workshop on Programming Languages and Operating Systems, PLOS 2015). Association for Computing Machinery, Inc. https://doi.org/10.1145/2818302.2818306