Tag

memory visibility

0 views collected around this technical thread.

Selected Java Interview Questions
Selected Java Interview Questions
Jul 27, 2022 · Fundamentals

Understanding Java's volatile Keyword: CPU Cache, Memory Visibility, and the MESI Protocol

This article explains how the volatile keyword ensures visibility in Java multithreaded programs by examining CPU cache architecture, cache‑coherency mechanisms such as the MESI protocol, and the low‑level assembly effects of volatile writes on modern x86 processors.

CPU cacheConcurrencyJava
0 likes · 12 min read
Understanding Java's volatile Keyword: CPU Cache, Memory Visibility, and the MESI Protocol
Selected Java Interview Questions
Selected Java Interview Questions
Nov 14, 2021 · Fundamentals

Understanding the volatile Keyword and Memory Visibility in Java

The article explains how the volatile keyword ensures prompt visibility of variables across threads, illustrates its effect with a concurrent increment example, highlights that visibility does not guarantee atomicity, and introduces CAS as a solution for correct concurrent updates.

CASConcurrencyJava
0 likes · 4 min read
Understanding the volatile Keyword and Memory Visibility in Java