DRAM缓存未命中 [英] DRAM cache miss

查看:205
本文介绍了DRAM缓存未命中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读了一段有关DRAM(主存储器)高速缓存未命中和SRAM(L1,L2,L3)高速缓存未命中的段落,我不确定这是什么意思.

I read a paragraph about DRAM(main memory) cache miss and SRAM(L1,L2,L3) cache miss and I am not sure what it means.

由于DRAM比SRAM慢,因此高速缓存未命中的代价很高,因为DRAm高速缓存未命中由磁盘提供,而SRAM高速缓存未命中通常由基于DRAM的主存储器提供.

Since DRAM is slower than SRAM, the cost for cache misses is expensive because DRAm cache misses are served from disk, while SRAM cache misses are usually served from DRAM based main memory.

这是我的理解: 如果DRAM中存在高速缓存未命中,它将进入磁盘(第二个内存)以查找数据.而如果SRAM中存在高速缓存未命中,它将进入SRAM中以查找数据.

Here is my understanding : if there is a cache miss in DRAM, it goes into disk(second memory) to find datum. while if there is a cache miss in SRAM, it goes into SRAM to find the datum.

你能告诉我我是对还是错?

Could you tell if I am right or wrong ?

推荐答案

通常,如果在L级别上未命中,则必须再往下调L+1.

In general, if there's a miss at level L, you have to go one level further down, L+1.

典型的内存层次结构从0开始包含以下级别:

A typical memory hierarchy comprises the following levels, from 0 onwards:

  • 处理器寄存器
  • 处理器缓存(SRAM)
  • 系统内存(DRAM)
  • 大容量存储(闪存/旋转设备)

如果要将内容存储在本地寄存器中,则必须首先从内存中获取内容.

If you want to store something in a local register, you have to first fetch it from memory.

如果您的数据位于处理器(SRAM)的缓存之一中,则无需进一步检查.但是,如果高速缓存未命中,则必须转到系统内存(DRAM).

If your data is in one of the caches of the processor (SRAM), you don't need to go further down. If you have a cache miss however, you have to go to system memory (DRAM).

这里发生的是,您可能会尝试访问一个不在内存中的内存页面,这可能是因为它从未被加载过,或者因为某个时候已经被换出了.您遇到页面错误,并且需要从存储设备中获取页面.找到数据后,该过程将立即停止.

What happens here is that you might try to access a memory page which is not in memory, either because it has never been loaded or because at some point it has been swapped out. You have a page fault and you need to fetch your page from storage devices. This process stops as soon as you find your data.

请注意,您要尽可能避免访问慢速存储驱动器,因此可以通过更快的设备,例如DRAM,在DRAM和旋转磁盘之间创建额外的缓存层. SSD( ZFS L2ARC

Note that you want to avoid as much as possible access to slow storage drives, so what you can do it to create additional caching layers between DRAM and spinning disks by means of faster devices, e.g. SSDs (ZFS L2ARC, bcache etc)

这篇关于DRAM缓存未命中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆