Verified Process-Context Switch for C-Programmed Kernels

  • Authors:
  • Artem Starostin;Alexandra Tsyban

  • Affiliations:
  • Computer Science Dept., Saarland University, Germany;Computer Science Dept., Saarland University, Germany

  • Venue:
  • VSTTE '08 Proceedings of the 2nd international conference on Verified Software: Theories, Tools, Experiments
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

A context switch -- an act of saving and restoring the state of a CPU such that multiple processes can share a single CPU resource -- is an essential feature of multitasking operating systems. Commonly computationally intensive and necessarily accessing hardware registers, context-switch procedures are implemented as inline assembly portions in C-programmed operating-system kernels. Feasible verification of operating systems is usually attempted in some kind of C semantics. However, seamless verification of kernels requires reasoning about context-switch routines in semantics of assembly language. At the end of the day, both semantics meet together in an overall correctness theorem of operating system. The task of formal integration of correctness results achieved on different semantical layers is challenging but inevitable for systems verification.The paper describes a formal approach to pervasive reasoning about interleaved computations of user processes and a C-programmed kernel. The interleaving is achieved by context-switch procedures implemented in inline assembly. We report on the correctness proof of the context-switch procedures and elaborate on our experience in formal integration of this result into the correctness proof of CVM, a verified framework for microkernel programmers.