Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

litmus test

A tiny two-thread program used to ask a memory model one question: can this particular result ever happen?

A litmus test is a minimal multi-threaded program with a specified final-state condition (store buffering SB, message passing MP, load buffering LB ...) whose allowed or forbidden status characterizes a memory consistency model; results are established by models and exhaustive tools such as herd7, not by timing runs.

Examples

  • Thread 1 runs x = 1; r1 = y, thread 2 y = 1; r2 = x. x86-TSO allows r1 = r2 = 0; sequential consistency does not.

Read the full section →