Tagged articles
14 articles
Page 1 of 1
Open Source Linux
Open Source Linux
Jul 7, 2023 · Fundamentals

Why CPUs Need Cache Memory and How the MESI Protocol Ensures Consistency

This article explains the purpose of CPU cache memory, the principles of temporal and spatial locality, the multi‑level cache architecture, the MESI cache‑coherence protocol for multi‑core processors, and the optimizations such as store buffers and memory barriers that address performance and consistency challenges.

CPU cacheMESIMemory Hierarchy
0 likes · 16 min read
Why CPUs Need Cache Memory and How the MESI Protocol Ensures Consistency
Liangxu Linux
Liangxu Linux
Jul 5, 2023 · Fundamentals

Why CPUs Need Cache Memory and How the MESI Protocol Keeps It Consistent

Modern CPUs use multi‑level cache memory to bridge the speed gap with main memory, relying on temporal and spatial locality, and employ the MESI protocol with states M, E, S, I to maintain coherence across cores, while techniques like store buffers and memory barriers mitigate latency and ordering issues.

CPUCache MemoryMESI
0 likes · 15 min read
Why CPUs Need Cache Memory and How the MESI Protocol Keeps It Consistent
Liangxu Linux
Liangxu Linux
Jun 23, 2023 · Fundamentals

Understanding CPU Cache Consistency: MESI Protocol, Performance Tips & Code Examples

Cache consistency spans icache‑dcache synchronization, multi‑CPU cache coherence, and device‑CPU interactions; the article explains the MESI protocol, demonstrates performance impacts with multithreaded code, explores prefetching, false sharing, mapping strategies, and practical tips for writing cache‑aware software.

CPUCacheCoherence
0 likes · 24 min read
Understanding CPU Cache Consistency: MESI Protocol, Performance Tips & Code Examples
MaGe Linux Operations
MaGe Linux Operations
Jun 16, 2023 · Fundamentals

Why Cache Consistency Can Halve Your Program’s Runtime – A Deep Dive

This article explains the multiple layers of CPU cache consistency, the MESI protocol, and how improper cache handling can dramatically slow programs, then demonstrates performance gains through code examples, prefetching, false‑sharing avoidance, and DMA strategies, offering practical guidance for low‑level optimization.

CPUCacheFalseSharing
0 likes · 23 min read
Why Cache Consistency Can Halve Your Program’s Runtime – A Deep Dive
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
Jun 22, 2022 · Fundamentals

Why CPU Cache Coherence Matters: From Volatile to MESI and Memory Barriers

This article explores the fundamentals of CPU cache hierarchy, why caches are needed, how cache inconsistency arises in multicore systems, and the mechanisms—such as cache coherence protocols, MESI, store buffers, invalidate queues, and memory barriers—that ensure correct data ordering and visibility across processors.

CPUMESIcache coherence
0 likes · 21 min read
Why CPU Cache Coherence Matters: From Volatile to MESI and Memory Barriers
Top Architect
Top Architect
Oct 4, 2021 · Fundamentals

Understanding Cache: Concepts, Mechanisms, and Consistency

This article provides a comprehensive overview of cache memory, explaining why caches are needed, their placement strategies, operation principles, replacement policies, write handling methods, and coherence protocols such as MESI, offering essential knowledge for computer architecture and system design.

CacheMESIMemory Hierarchy
0 likes · 12 min read
Understanding Cache: Concepts, Mechanisms, and Consistency
Selected Java Interview Questions
Selected Java Interview Questions
Jul 31, 2021 · Fundamentals

Understanding Java volatile, Memory Semantics, and the lock Prefix

This article explains the two core properties of Java's volatile keyword—visibility and ordering—how they are implemented via lock prefixes and memory barriers, compares volatile with synchronized and CAS, and details the underlying CPU cache‑coherency mechanisms such as MESI, store buffers, and invalidate queues.

Happens-beforeMESIMemory Model
0 likes · 13 min read
Understanding Java volatile, Memory Semantics, and the lock Prefix
TAL Education Technology
TAL Education Technology
May 13, 2021 · Backend Development

Understanding Java Concurrency: Volatile, Synchronized, JMM, and MESI

This article provides a comprehensive tutorial on Java concurrency, covering the usage and implementation principles of the volatile and synchronized keywords, the Java Memory Model, the MESI cache protocol, common visibility and reordering issues, and practical code examples for designing efficient multithreaded solutions.

JMMMESIconcurrency
0 likes · 17 min read
Understanding Java Concurrency: Volatile, Synchronized, JMM, and MESI
JavaEdge
JavaEdge
Jan 9, 2020 · Fundamentals

Why False Sharing Slows Your Java Programs and How to Eliminate It

False sharing occurs when multiple threads modify variables that reside on the same CPU cache line, causing unnecessary cache coherency traffic; this article explains cache line basics, CPU cache hierarchy, MESI protocol, and presents Java solutions—including padding, @sun.misc.Contended annotation, and JVM flags—to prevent performance degradation.

Java concurrencyMESIcache line
0 likes · 9 min read
Why False Sharing Slows Your Java Programs and How to Eliminate It