Introduction
CPU cache coherence impacts how the Java concurrency features such as the Java volatile and synchronized block features work. This video explains how Java volatile and synchronized "interact" with the CPU cache coherence.
Basically, what happens is that when a Java thread writes to a Java volatile variable, or a Java thread exits a synchronized block, the Java VM flushes any thread visible variables from CPU registers to main memory. The hardware may choose only to flush the variables into the CPU cache, and then rely on its Cache coherence strategy to make sure those variables are still visibles to other CPUs. Eventually the hardware will flush the variables to main RAM - when the CPU cache lines containing the variables are needed for other data.

Main Memory에 Write/Read 한다고 표현한 경우 실제로는 L1, L2 캐시 까지만 Write한 경우 일 수 있다. Cache Coherence라는 기술로 CPU 및 쓰레드 간에 서로의 Cache를 읽을 수 있기 때문이다.