Relaxed Memory Model Zoo

Memory model
← Back to the map

Volatile-by-Default VbD

2017 · Liu, Millstein, Musuvathi · language, formal

A volatile-by-default semantics for Java in which every memory access is treated as volatile (sequentially consistent) by default. Bare VbD carries a considerable penalty (28% average / 81% maximum on x86; 57% / 157% on Armv8), so the authors add a just-in-time technique that speculatively treats each object as thread-local and compiles its accesses without fences, recompiling to insert fences once concurrent access is detected — bringing the Armv8 overhead down to 37% average / 73% maximum. It admits exactly the SC behaviours.

Ordering relationships

Equivalent to
  • Sequential Consistency (SC) — Volatile-by-default makes every Java access sequentially consistent, so it admits exactly the SC outcomes; it differs from SC only in enforcement mechanism (speculative JIT recompilation) and performance.

References

  • Lun Liu, Todd Millstein, Madanlal Musuvathi. A Volatile-by-Default JVM for Server Applications. OOPSLA 2017 (PACMPL vol. 1), 2017. doi:10.1145/3133873
  • Lun Liu, Todd Millstein, Madanlal Musuvathi. Accelerating Sequential Consistency for Java with Speculative Compilation. PLDI 2019, 2019. doi:10.1145/3314221.3314611
  • Evgenii Moiseenko, Anton Podkopaev, Dmitrii Koznov. A Survey of Programming Language Memory Models. Programming and Computer Software 47(6), pp. 439–456, 2021. doi:10.1134/S0361768821060050