Outline
Communication between Java threads is completely transparent to programmers, and memory visibility issues can easily plague Java programmers, and this article attempts to uncover the mysteries of the Java memory model. This paper is divided into three parts: reordering and sequential consistency, memory semantics of three synchronous primitives (lock,volatile,final), reordering rules and implementation in the processor, the design goal of the Java memory model, and its relationship to the processor memory model and the sequential consistent memory model.
In-depth understanding of Java memory Model (i)--deep understanding of Java Memory Model (ii)--reordering in-depth understanding of Java memory Model (iii)--sequential consistency in-depth understanding of Java memory Model (iv)--volatile in-depth understanding of Java memory Model (v)-- Lock in-depth understanding Java memory Model (vi)--final in-depth understanding of Java memory Model (vii)--Summary
"Go" in-depth understanding of the Java memory model