Rely-Guarantee Reasoning About Concurrent Memory Management In Zephyr Rtos

Yongwang Zhao,David Sanán
DOI: https://doi.org/10.1007/978-3-030-25543-5_29
2019-01-01
Abstract:Formal verification of concurrent operating systems (OSs) is challenging, and in particular the verification of the dynamic memory management due to its complex data structures and allocation algorithm. Up to our knowledge, this paper presents the first formal specification and mechanized proof of a concurrent buddy memory allocation for a real-world OS. We develop a fine-grained formal specification of the buddy memory management in Zephyr RTOS. To ease validation of the specification and the source code, the provided specification closely follows the C code. Then, we use the rely-guarantee technique to conduct the compositional verification of functional correctness and invariant preservation. During the formal verification, we found three bugs in the C code of Zephyr.
What problem does this paper attempt to address?