Skip to content

Java memory Model

Ravi Chaudhary edited this page Aug 21, 2019 · 1 revision

Memory Model Diagram for a Multi core system

Core1 Core2 Core3 Core4
register1 register2 register3 register4
L1 Cache L1 Cache L1 Cache L1 Cache
L2 Cache L2 Cache
L3 Cache
RAM

Important concepts of the Java memory model

  1. Order of execution: No matter in which way compiler executes the statements in a program the result should always be the same
  2. Happens before relationship