所有权就是盗窃:在rust中构建嵌入式操作系统的经验

A. Levy, Michael P. Andersen, Bradford Campbell, D. Culler, P. Dutta, Branden Ghena, P. Levis, P. Pannuto
{"title":"所有权就是盗窃:在rust中构建嵌入式操作系统的经验","authors":"A. Levy, Michael P. Andersen, Bradford Campbell, D. Culler, P. Dutta, Branden Ghena, P. Levis, P. Pannuto","doi":"10.1145/2818302.2818306","DOIUrl":null,"url":null,"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.","PeriodicalId":170899,"journal":{"name":"Proceedings of the 8th Workshop on Programming Languages and Operating Systems","volume":"270 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2015-10-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"42","resultStr":"{\"title\":\"Ownership is theft: experiences building an embedded OS in rust\",\"authors\":\"A. Levy, Michael P. Andersen, Bradford Campbell, D. Culler, P. Dutta, Branden Ghena, P. Levis, P. Pannuto\",\"doi\":\"10.1145/2818302.2818306\",\"DOIUrl\":null,\"url\":null,\"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.\",\"PeriodicalId\":170899,\"journal\":{\"name\":\"Proceedings of the 8th Workshop on Programming Languages and Operating Systems\",\"volume\":\"270 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2015-10-04\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"42\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 8th Workshop on Programming Languages and Operating Systems\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/2818302.2818306\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 8th Workshop on Programming Languages and Operating Systems","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2818302.2818306","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 42

摘要

Rust是一种新的系统编程语言,它提供编译时内存安全检查,以帮助消除由于内存管理不当而导致的运行时错误。这个特性对于操作系统开发非常有利,特别是对于恢复和调试特别具有挑战性的嵌入式操作系统开发。然而,嵌入式平台是高度基于事件的,Rust的内存安全机制很大程度上是基于线程的。在我们用Rust为嵌入式系统开发操作系统的经验中,我们发现Rust的所有权模型阻止了嵌入式领域中常见的安全资源共享,与硬件资源的现实冲突,并且阻碍了使用闭包进行异步编程。我们描述了这些经验,以及它们与内存安全的关系,并说明了我们的解决方案,以最大程度地保持安全保证。此外,我们根据自己的经验,提出了一种新的Rust语言扩展,使其能够为事件驱动平台提供更好的内存安全工具。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Ownership is theft: experiences building an embedded OS in rust
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.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信