A Primer on Memory Consistency and Cache Coherence


Book Description

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. Table of Contents: Preface / Introduction to Consistency and Coherence / Coherence Basics / Memory Consistency Motivation and Sequential Consistency / Total Store Order and the x86 Memory Model / Relaxed Memory Consistency / Coherence Protocols / Snooping Coherence Protocols / Directory Coherence Protocols / Advanced Topics in Coherence / Author Biographies










A Primer on Memory Consistency and Cache Coherence


Book Description

Many modern computer systems, including homogeneous and heterogeneous architectures, 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 high-level concepts as well as specific, concrete examples from real-world systems. This second edition reflects a decade of advancements since the first edition and includes, among other more modest changes, two new chapters: one on consistency and coherence for non-CPU accelerators (with a focus on GPUs) and one that points to formal work and tools on consistency and coherence.







Shared Memory Consistency Models


Book Description

The shared memory systems should support parallelization at the computation (multiprocessor), communication (Network-on-Chip, NoC) and memory architecture levels to exploit the potential performance benefits. Such systems are facing the critical issues of memory consistency and coherence. Memory consistency issue arises due to the unconstrained operations which sometimes lead to the unexpected behavior of the systems. Memory consistency models are used to resolve this issue. Relaxed or weaker consistency models enforce less ordering constraints on the memory operations and exploit system optimizations compared to the stricter models. This book discusses the novel realization schemes and scalability analysis of strict Sequential Consistency (SC) model and relaxed memory consistency models: Total Store Ordering (TSO), Partial Store Ordering (PSO), Weak Ordering (WO), Release Consistency (RC), and Protected Release Consistency (PRC) in the NoC based distributed shared memory multiprocessor systems. This study should help the average readers and professionals to understand the critical issue of memory consistency both in the NoC based systems and general purpose multiprocessor systems.




Memory Consistency Models for Shared-Memory Multiprocessors


Book Description

We believe that the combined benefits in hardware and software will make relaxed models universal in future multiprocessors, as is already evidenced by their adoption in several commercial systems.