CPU cache

作者: packet | 来源:发表于2018-07-20 20:02 被阅读0次

A CPU cache is a cache used by the central processing unit (CPU) of a computer to reduce the average time to access data from the main memory. The cache is a smaller, faster memory which stores copies of the data from frequently used main memory locations.

Data is transferred between memory and cache in blocks of fixed size, called cache lines.


Most modern desktop and server CPUs have at least three independent caches: an instruction cache to speed up executable instruction fetch, a **data cache **to speed up data fetch and store, and a translation lookaside buffer (TLB) used to speed up virtual-to-physical address translation for both executable instructions and data.

The data cache is usually organized as** a hierarchy of more cache levels** (L1, L2, etc.; see also multi-level caches below). However, **a TLB cache is part of the memory management unit (MMU) **and not directly related to the CPU caches.

The proportion of accesses that result in a cache hit is known as the hit rate, and can be a measure of the effectiveness of the cache for a given program or algorithm.

Read misses delay execution because of requiring data to be transferred from memory, which is much slower than reading from the cache. Write misses may occur without such penalty, since the processor can continue execution while data is copied to main memory in the background.

写缺失:CPU更新内存数据中,在Cache中没有找到相关数据(地址和数值)。

Cache写机制:Write-through与Write-back

参考文献:Modern Hardware

相关文章

  • CPU缓存一致性

    CPU Cache 通常分为三级缓存:L1 Cache、L2 Cache、L3 Cache,级别越低的离 CPU ...

  • CPU cache

    A CPU cache is a cache used by the central processing uni...

  • Cache line 和False Sharding

    CPU Cache的更新最小单位是64B,即cache line为更新的。CPU在更新cache时候,会自动帮助其...

  • CPU cache

    一个有意思的问题 看到为什么转置一个512x512的矩阵,会比513x513的矩阵慢很多?的直觉就是CPU Cac...

  • CPU Cache

    CPU Cache结构 CPU包含多个核心,每个核心又有独自的一级缓存(细分成代码缓存和数据缓存)和二级缓存,各个...

  • CPU CACHE

    内存速度对比 cache line 64 bytes 矩阵乘 转置后加速 76.6%image.png

  • CPU缓存行及伪共享概述

    认识CPU Cache CPU Cache概述 随着CPU的频率不断提升,而内存的访问速度却没有质的突破,为了弥补...

  • 【转】伪共享、缓存行填充和CPU缓存详述

    文章转自《一篇对伪共享、缓存行填充和CPU缓存讲的很透彻的文章》 认识CPU Cache CPU Cache概述 ...

  • CPU Cache相关

    名词解释 cache snooping - CPU修改cache中的数据,需要通知其他CPU。这种行为被叫做cac...

  • 基础知识

    1. 计算机基础 CPU 1. 多核概念 2. CPU cache,L1,L2,L3 cache 3. cache...

网友评论

      本文标题:CPU cache

      本文链接:https://www.haomeiwen.com/subject/ewoqmftx.html