Tools for Memory Model Simulation - Herd7
summary
DPDK code gets modeled as C11 litmus tests and simulated with herd7 to exhaustively enumerate reorderings; a two-thread message‑passing example has four memory events so there are four events -> 24 sequences, herd7 reports four reachable states and one positive witness showing payload read as 0 despite guard = 1. Applying release/acquire barriers on the writer and reader eliminates that witness; rerunning herd7 yields two valid outcomes and no failing traces.
AI-written summary · about
chapters (11)
- 0:00Introduction to memory model simulation
- 1:52Why we need a memory model tool
- 8:19Problem with memory reordering
- 13:19Expectations from this session
- 15:03Representing algorithms in Herd7
- 20:07Running Herd7 on a test case
- 22:21Analyzing failing sequences
- 30:58Fixing the algorithm with barriers
- 34:11Using Herd7 for complex algorithms
- 35:15Importance of validation tools
- 36:45Q&A and closing remarks
