filmov
tv
JDD 2022: Maciej Przepióra - Java memory model for mere mortals
Показать описание
A memory model describes the relationship between variables in a program (instance fields, static fields, and array elements) and the low-level details of storing them to and retrieving them from memory in a real computer system. Java Memory Model (JMM) was and still is one of the key advantages of the JVM. Thanks to it, the compiler and the runtime may take some liberties with the timing of moving values to or from a variable's assigned memory location for the sake of optimisations. On multiprocessor systems, some complexities may sometimes show through, and the JMM allows the programmer to safely tackle those complexities. We will also take a peek on how modern CPUs and caches work and why it matters to JVM.