Jump to ratings and reviews
Rate this book

A Primer on Memory Consistency and Cache Coherence

Rate this book
Many modern computer systems and most multicore chips (chip multiprocessors) support shared memory in hardware. In a shared memory system, each of the processor cores may read and write to a single shared address space. For a shared memory machine, the memory consistency model defines the architecturally visible behavior of its memory system. Consistency definitions provide rules about loads and stores (or memory reads and writes) and how they act upon memory. As part of supporting a memory consistency model, many machines also provide cache coherence protocols that ensure that multiple cached copies of data are kept up-to-date. The goal of this primer is to provide readers with a basic understanding of consistency and coherence. This understanding includes both the issues that must be solved as well as a variety of solutions. We present both highlevel concepts as well as specific, concrete examples from real-world systems.

210 pages, Paperback

First published March 2, 2011

5 people are currently reading
86 people want to read

About the author

Daniel J. Sorin

4 books1 follower

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
8 (47%)
4 stars
9 (52%)
3 stars
0 (0%)
2 stars
0 (0%)
1 star
0 (0%)
Displaying 1 - 3 of 3 reviews
Profile Image for Szymon Kulec.
217 reviews120 followers
September 18, 2020
5 out of 5.

If you want to learn about memory models, how modern CPUs work and why they work this way this is the book. Don't start with descriptions of volatile in C++ or any language but start with this book. It's written by academics so it's dense and it provides a steep learning curve. And it's good that it does it this way, because you will learn a lot in a short period of time.

I love the approach authors took to first separate the consistency from the coherence, and then build on top of it. I love the samples provides when discussing the ideas provides in a chapter. I love that sometimes, you're given a choice to jump over some sections if you don't want to dive that deep.

If you're looking for a book on memory consistency and cache coherence, this is it.
Profile Image for Bugzmanov.
235 reviews100 followers
December 15, 2021
This book is rad! But requires a bit of a galaxy brain.
The good parts:
- this is the fundamental level explanation why concurrency is hard. all those "re-orderings", "data races", "consistency", "total store orderings" are explained at a hardware level and from an algorithmic perspective.
- the book does an excellent job at building intuition with simplified solutions at start and then gradually adding optimizations to get to the "real deal"
- most of the topics are covered from multiple perspective: algorithmic, hardware, formalism.
- despite academic tone, it tries to be reader friendly: hard topics are explained multiple times using different illustrations, formalisms are walked through using step-by-step execution, etc.
- tons of links if you need to go deeper

The bad parts:
- it's not a casual read and requires galaxy brain mode to get to the end. while some chapters are prefaced with "you can skip it, if don't need these details", jumping in the middle of the book is most likely a bad idea.
7 reviews
July 1, 2020
A good introductory textbook to a complex subject. An excellent beginner guide to demystify memory consistency models and cache coherence protocols.
Displaying 1 - 3 of 3 reviews

Can't find what you're looking for?

Get help and learn more about the design.