arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.09282cs.SE
收藏

Awkernel 的模型检测与运行时验证案例研究

A Case Study on Model Checking and Runtime Verification for Awkernel

Akira Hasegawa, Ryuta Kambe, Toshiaki Aoki, Yuuki Takano

AI总结:

本文以 Awkernel 操作系统为案例,提出结合模型检测辅助代码审查与运行时验证的并发软件开发方法,成功发现人工审查和简单测试难以检测的多个缺陷。

摘要:

在操作系统开发中,并发带来了重大挑战。人类难以手动审查并发行为,也难以编写覆盖所有可能执行的测试用例,这往往导致严重缺陷。调度器中的抢占就是一个典型例子。本文提出了一种针对调度器等并发软件的开发方法。我们的方法引入模型检测作为代码追踪的辅助手段,简化并发行为的分析;我们将其称为模型检测辅助代码审查。虽然该方法有助于追踪行为,但由于建模语言与编程语言之间存在语义差距,结果的准确性受到限制。因此,我们还引入运行时验证来解决模型检测辅助代码审查中的这一局限。我们将该方法应用于一个真实操作系统 Awkernel 作为案例研究。这个目前正在为自动驾驶开发的新操作系统,设计用于在 Rust 中使用异步函数进行抢占式任务执行。实施我们的方法后,我们发现了若干通过人工审查或简单测试难以检测的缺陷。

英文摘要:

In operating system development, concurrency poses significant challenges. It is difficult for humans to manually review concurrent behaviors or to write test cases covering all possible executions, often resulting in critical bugs. Preemption in schedulers serves as a typical example. This paper proposes a development method for concurrent software, such as schedulers. Our method incorporates model checking as an aid for tracing code, simplifying the analysis of concurrent behavior; we refer to this as model checking-assisted code review. While this approach aids in tracing behaviors, the accuracy of the results is limited because of the semantics gap between the modeling language and the programming language. Therefore, we also introduce runtime verification to address this limitation in model checking-assisted code review. We applied our approach to a real-world operating system, Awkernel, as a case study. This new operating system, currently under development for autonomous driving, is designed for preemptive task execution using asynchronous functions in Rust. After implementing our method, we identified several bugs that are difficult to detect through manual reviews or simple tests.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑