gpt4 book ai didi

memory - 当向 DRAM 发出读取请求时,为什么我们需要读取标签和数据,而不是仅读取数据?

转载 作者:行者123 更新时间:2023-12-02 09:35:42 24 4
gpt4 key购买 nike

我正在阅读 David Patterson 和 John Hennessy 的计算机体系结构书籍。在第2章中,提到如果我们将标签存储在DRAM中,我们可能需要在两个周期内发出两个单独的请求来读取标签和数据。我的问题是为什么我们需要请求标签?标签不就是地址的高位吗?

最佳答案

哇 - 很久很久以前,我在研究生院读过帕特森和轩尼诗;)感谢沿着内存巷的旅行;)

事情是这样的:

https://www.webopedia.com/TERM/T/tag_RAM.html

The area in an L2 cache that identifies which data from main memory is currently stored in each cache line. The actual data is stored in a different part of the cache, called the data store. The values stored in the tag RAM determine whether a cache lookup results in a hit or a miss.

换句话说,两个不同的“地方”(缓存行和数据存储)中有两个不同的“东西”(标签和数据)。如果它是“命中”,则只需执行一次查找(到缓存行)。

那么为什么要有“标签”呢?由于不同的内存区域可能被映射到一个 block 中,因此使用标签来区分它们。

关于memory - 当向 DRAM 发出读取请求时,为什么我们需要读取标签和数据,而不是仅读取数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53991402/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com