Toward Formal Verification of a Lock-Free Distributed Double Buffer Cache

Training deep learning models on synthetic data is increasingly important in neuroimaging, yet on-the-fly generation introduces severe throughput bottlenecks. Wirehead is a distributed caching system that decouples data generation from model training using a MongoDB-backed double buffer, achieving near-linear scaling with additional generators. While Wirehead has demonstrated a 15.7x throughput increase with 16 generators in practice, its correctness properties, including freedom from deadlocks, data corruption, and zombie processes, have not been formally established. This thesis presents Wirehead’s design and evolution from a three-component architecture to a streamlined distributed double buffer, then investigates the formal verification of this algorithm using the Rocq proof assistant. We model the relevant MongoDB operations as pure Rocq functions, translate the core algorithm into a nondeterministic state machine, and present proofs of six properties: three safety (swap mutual exclusion, read consistency, and post-swap data integrity) and three liveness (swap completion, lock acquisition, and progress). Five are fully machine-checked; the progress theorem depends on two Admitted lemmas involving a pigeonhole counting argument. This effort contributes to the broader goal of building trustworthy infrastructure for scientific computing.

Authors

Publication Details

Journal
Open MIND
Published
2026-04-27
DOI
https://doi.org/10.57709/138
Primary Topic
Security and Verification in Computing
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Toward Formal Verification of a Lock-Free Distributed Double Buffer Cache

Mike Doan
Open MIND
Security and Verification in Computing
article

Toward Formal Verification of a Lock-Free Distributed Double Buffer Cache

Mike Doan
article en

Abstract

Training deep learning models on synthetic data is increasingly important in neuroimaging, yet on-the-fly generation introduces severe throughput bottlenecks. Wirehead is a distributed caching system that decouples data generation from model training using a MongoDB-backed double buffer, achieving near-linear scaling with additional generators. While Wirehead has demonstrated a 15.7x throughput increase with 16 generators in practice, its correctness properties, including freedom from deadlocks, data corruption, and zombie processes, have not been formally established. This thesis presents Wirehead’s design and evolution from a three-component architecture to a streamlined distributed double buffer, then investigates the formal verification of this algorithm using the Rocq proof assistant. We model the relevant MongoDB operations as pure Rocq functions, translate the core algorithm into a nondeterministic state machine, and present proofs of six properties: three safety (swap mutual exclusion, read consistency, and post-swap data integrity) and three liveness (swap completion, lock acquisition, and progress). Five are fully machine-checked; the progress theorem depends on two Admitted lemmas involving a pigeonhole counting argument. This effort contributes to the broader goal of building trustworthy infrastructure for scientific computing.

Open MIND
Peace, Justice and strong institutions
Openalex Percentile: Top 4%
Security and Verification in Computing
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Toward Formal Verification of a Lock-Free Distributed Double Buffer Cache — Mike Doan · Open MIND (2026) | TGRS Research Map | TGRS