201. Building certified concurrent OS kernels
- Author
-
Ronghui Gu, Jieung Kim, Vilhelm Sjöberg, David Costanzo, Jérémie Koenig, Xiongnan (Newman) Wu, Hao Chen, and Zhong Shao
- Subjects
Multi-core processor ,Correctness ,General Computer Science ,Programming language ,Computer science ,Concurrency ,020207 software engineering ,Context (language use) ,02 engineering and technology ,Thread (computing) ,computer.software_genre ,Abstraction layer ,020204 information systems ,0202 electrical engineering, electronic engineering, information engineering ,computer ,Kernel (category theory) ,Abstraction (linguistics) ,System software - Abstract
Operating system (OS) kernels form the backbone of system software. They can have a significant impact on the resilience and security of today's computers. Recent efforts have demonstrated the feasibility of formally verifying simple general-purpose kernels, but they have ignored the important issues of concurrency, which include not just user and I/O concurrency on a single core, but also multi-core parallelism with fine-grained locking. In this work, we present CertiKOS, a novel compositional framework for building verified concurrent OS kernels. Concurrency allows interleaved execution of programs belonging to different abstraction layers and running on different CPUs/threads. Each such layer can have a different set of observable events. In CertiKOS, these layers and their observable events can be formally specified, and each module can then be verified at the abstraction level it belongs to. To link all the verified pieces together, CertiKOS enforces a so-called contextual refinement property for every such piece, which states that the implementation will behave like its specification under any concurrent context with any valid interleaving. Using CertiKOS, we have successfully developed a practical concurrent OS kernel, called mC2, and built the formal proofs of its correctness in Coq. The mC2 kernel is written in 6500 lines of C and x86 assembly and runs on stock x86 multicore machines. To our knowledge, this is the first correctness proof of a general-purpose concurrent OS kernel with fine-grained locking.
- Published
- 2019