* 假定Cache的容量为2N为字节(例中N=10),主存块大小为32字节,主存的容量为232字节。那么,32位主存地址的划分应该如下:低5位表示块内字节号,中间5位表示Cache的行(槽)号,高12位表示主存标志。 * Data cache uses 1 byte as the smallest unit but instruction cache uses 1 word as the smallest units This is yet another example showing that the byte select is divided into block offset and byte offset. Different computer systems have different designing choice. Designing shown in this example is good for both Instruction cache and data cache. * 访存过程: CPU给出一个20位主存地址,根据高11位的内容同时与Cache中各槽的标志位进行比较。 若能找到相等的槽,则说明要访问的单元在该槽中。再根据后9位字号找到相应的字取到CPU中。 若全都不相等,则说明要访问的单元不在Cache中。 * 访存过程: CPU给出一个20位主存地址,根据中间3位的内容找到对应的Cache组,再将前8位同时与该组中各槽的标志位进行比较。 若能找到相等的槽,则说明要访问的单元在该槽中。再根据后9位字号找到相应的字取到CPU中。 若全都不相等,则说明要访问的单元不在该组中。 * A HIT is when the data the processor wants to access is found in the upper level (Blk X). The fraction of the memory access that are HIT is defined as HIT rate. HIT Time is the time to access the Upper Level where the data is found (X). It consists of: (a) Time to access this level. (b) AND the time to determine if this is a Hit or Miss. If the data the processor wants cannot be found in the Upper level. Then we have a miss and we need to retrieve the data (Blk Y) from the lower level. By definition (definition of Hit: Fraction), the miss rate is just 1 minus the hit rate. This miss penalty also consists of two parts: (a) The time it takes to replace a block (Blk Y to BlkX) in the upper level. (b) And then the time it takes to deliver this new block to the processor. It is very important that your Hit Time to be much much smaller than your miss penalty. Otherwise, there will be no reason to build a memory hierarchy. +2 = 14 min. (X:54) 举例 第0组 第1组 第2组 第3组 第4组 …… …… 第15组 第0 行 第1 行 第2 行 第3 行 0/64/48 1/65/49 2/66/50 3/67/51 4 …… …… 15 16/0/64 17/1/65 18/2/66 19/3/67 20 …… …… 31 32/16 33/17 34/18 35/19 36 …… …… 47 48/32 49/33 50/34 51/35 52 …… …… 63 LRU算法:第一次循环,每一块的第一字未命中,其余都命中; 以后9次循环,有20块的第一字未命中,其余全部命中. 所以,命中率p为 (
您可能关注的文档
- 圆周运动万有引力讲义.ppt
- 圆柱的体积(练习)11讲义.ppt
- 圆锥的体积练习课讲义.ppt
- 月球之谜讲义.ppt
- 匀变速直线运动规律推论及其应用讲义.ppt
- 在阳光下成长话题作文讲义.ppt
- 噪声与振动控制2讲义.ppt
- 怎样拍好集体照讲义.ppt
- AI+具身智能行业市场前景及投资研究报告:体育安防场景落地.pdf
- 春风动力-市场前景及投资研究报告-极核增长引擎,全球结构变化,新驱动力.pdf
- 广东省广州省实验中学教育集团2025-2026学年八年级上学期期中考试物理试题(解析版).docx
- 广东省广州大学附属中学2025-2026学年八年级上学期奥班期中物理试题(解析版).docx
- 广东省广州市第八十六中学2025-2026学年八年级上学期期中物理试题(含答案).docx
- 广东省广州市第八十九中学2025-2026学年八年级上学期期中考试物理试题(解析版).docx
- 广东省广州市第二中学2025-2026学年八年级上学期期中考试物理试题(含答案).docx
- 广东省广州市第八十六中学2025-2026学年八年级上学期期中物理试题(解析版).docx
- 广东省广州市第八十九中学2025-2026学年八年级上学期期中考试物理试题(含答案).docx
- 广东省广州市第二中学2025-2026学年八年级上学期期中考试物理试题(解析版).docx
- 2026《中国人寿上海分公司营销员培训体系优化研究》18000字.docx
- 《生物探究性实验教学》中小学教师资格模拟试题.docx
最近下载
- 中医护理技术在骨科中的应用.ppt VIP
- 非煤矿山节后复工安全培训.pptx VIP
- 吉林省松原市长岭县2025~2026学年度下学期第一次月考试卷 八年英语(含答题卡、答案).docx VIP
- 2019新人教版高中英语必修二Unit4词汇表.pdf VIP
- 2025年上半年中国铁路西安局集团有限公司校招笔试题带答案.docx VIP
- 教育学原理-第三章-教育与人的发展【实用参考】.ppt VIP
- 婴幼儿早期教育课程标准.docx VIP
- 景成道人培训课件.ppt VIP
- 2022年高中军训心得体会(集合15篇).docx VIP
- (统编版2024)语文七年级下册 第三单元《课外古诗词诵读》课件(新教材).pptx
原创力文档

文档评论(0)