A Comparative Formal Verification Framework for General-Purpose CPU Scheduling in Rocq
Abstract
CPU scheduling determines which runnable process receives the processor and directly affects system responsiveness, fairness, and overall performance. Although many scheduling policies have been extensively studied and implemented, their correctness is typically justified through informal reasoning, examples, or simulations rather than machine-checked proofs. Existing formal verification efforts also focus predominantly on real-time scheduling, leaving general-purpose scheduling policies comparatively underexplored. This paper formalizes six general-purpose scheduler policies in Rocq: FIFO, SJF, Lottery, MLFQ, Stride, and CFS. By policy, we mean the rule used to choose the next runnable process and, for state-transforming models, update scheduler state. Beyond formalizing the schedulers individually, we compare their verified properties and identify recurring proof patterns across scheduler families. FIFO, SJF, Stride, and list-based CFS share a minimum-key proof pattern, MLFQ follows a layered-priority proof pattern, and Lottery follows a ticket-interval proof pattern. We formalize these proof patterns in Rocq, enabling proof reuse while allowing each scheduler to retain its own mathematical model. To the best of our knowledge, this work provides the first interactive-theorem-prover formalizations of MLFQ, Lottery, and Stride schedulers, together with CFS-style virtual-runtime scheduling as standalone general-purpose scheduler policies. We also include a CFS variant based on Rocq's verified red-black-tree library. The entire development is checked by Rocq without unfinished proofs or additional trusted assumptions, i.e., every theorem is accepted by the Rocq kernel.
Create a lesson
Metadata
- Comments
- 6 Pages, International Conference on Digital Futures & Transformative Technologies (ICoDT2) 2026
Related papers
Math Foundation Formalization Agent: A General-Purpose Approach to Formalizing Mathematical Foundations
Shared title terminologycs.LOJiaxin Xie, Guowei Dou, Xiang Ji et al.
Formal Semantics and Machine-Checked Metatheory for General Fault Trees in Lean 4
Shared title terminologycs.LOAdnan Rashid
Enabling Formal Verification in a Common Model of Cognition
Shared title terminologycs.LOParth Ganeriwala, Miki Matsumuro, Frank E. Ritter et al.
RyBench: Runtime Verification Benchmarking Framework over Publish/Subscribe Networks
Shared title terminologycs.LOMehmet Hilmi Dündar, Doğan Ulus
BLIP: Bernstein-Lifted Iterative p-ROA Verification for Stochastic Neural Control Systems with Nonsmooth Controllers
Shared title terminologycs.LOXueZhou Tang, Yufeng Li
From Proof Construction to Independent Checking: Reproducing the Lean Verification of RH and Dirichlet GRH on AArch64
Shared title terminologycs.LOZoltán Gábor Molnár