What is JMM? ⚙️

Published: 19 June 2024
on channel: mostdevwill
474
like

What is JMM? ⚙️

We just figured out that “obvious” Java memory-related things like heap and stack memory, object allocation, object headers, the weight of different types, and garbage collectors are about Java Memory Management, not the Java Memory Model.

So, what is the Java Memory Model actually about?

In general, it’s about how memory behaves in both single-threaded and multithreading environments. The JMM answers one critical question: What values can a particular read operation observe?

This turns out to be a non-trivial question, especially in a multithreading context.

You’ll encounter concepts like data races, operation reordering during compilation to bytecode, machine code, and at the processor level, cached values, and word tearing.

The JMM also explains the necessity of synchronization, volatile variables, and happens-before relationships.

I plan to explain these concepts step by step. Follow me so you don’t miss any new videos! ✅


Watch video What is JMM? ⚙️ online without registration, duration hours minute second in high quality. This video was added by user mostdevwill 19 June 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 474 once and liked it like people.