Tagged articles
10 articles
Page 1 of 1
Tech Freedom Circle
Tech Freedom Circle
Apr 25, 2026 · Fundamentals

Why a Simple Singleton Answer Failed an Alibaba Interview: The Real Role of volatile, Memory Barriers, and Happens‑Before

The article dissects an Alibaba interview question about the volatile modifier, showing why answering only with a lazy‑loaded singleton is insufficient, and explains how volatile prevents instruction reordering, establishes memory barriers, and creates happens‑before relationships to make double‑checked locking safe.

Happens-beforeJMMJava
0 likes · 20 min read
Why a Simple Singleton Answer Failed an Alibaba Interview: The Real Role of volatile, Memory Barriers, and Happens‑Before
Deepin Linux
Deepin Linux
Apr 11, 2026 · Fundamentals

Why Memory Barriers Are the Hidden Foundation of Linux Kernel Concurrency

This article explains what memory barriers are, why they are essential for correct multi‑core operation in the Linux kernel, how different barrier types work, their implementation details, and practical guidelines for using them safely in synchronization primitives and driver code.

Linux kernelSynchronizationSystem Programming
0 likes · 47 min read
Why Memory Barriers Are the Hidden Foundation of Linux Kernel Concurrency
Liangxu Linux
Liangxu Linux
May 12, 2025 · Fundamentals

Essential Embedded Concepts: Stack Watermark, Copy Techniques, Sync/Async, Memory Barriers

This article explains key embedded software concepts, including how stack watermark detection tracks maximum stack usage, the differences between shallow and deep copying of data structures, the distinction between synchronous and asynchronous processing, and the role of memory barriers in enforcing operation ordering on weakly consistent architectures.

AsynchronousSynchronousdeep copy
0 likes · 7 min read
Essential Embedded Concepts: Stack Watermark, Copy Techniques, Sync/Async, Memory Barriers
Su San Talks Tech
Su San Talks Tech
Feb 17, 2025 · Fundamentals

Why Changing int to Integer Lets a Non‑volatile Java Loop Terminate

This article explores a classic Java concurrency puzzle where a non‑volatile flag causes an infinite loop, examines how modifying the loop variable from int to Integer or adding volatile affects termination, and explains the underlying JVM memory‑barrier behavior revealed by DeepSeek.

HotSpotJMMJava
0 likes · 11 min read
Why Changing int to Integer Lets a Non‑volatile Java Loop Terminate
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Jan 13, 2025 · Backend Development

How Does Java’s volatile Keyword Ensure Thread Visibility and Prevent Reordering?

This article explains how Java's volatile keyword provides visibility guarantees and prevents instruction reordering through memory barriers, illustrates its behavior with code examples, discusses its limitations regarding atomicity, and outlines appropriate usage scenarios such as state flags and double‑checked locking.

Instruction ReorderingJavamemory barrier
0 likes · 9 min read
How Does Java’s volatile Keyword Ensure Thread Visibility and Prevent Reordering?