如何计算有效CPI为3级缓存 [英] How to calculate effective CPI for a 3 level cache

查看:1012
本文介绍了如何计算有效CPI为3级缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我绝望地卡在一门功课的问题,我希望一些帮助理解的更好。下面是我得到了什么:

I am hopelessly stuck on a homework problem, and I would love some help understanding it better. Here is what I was given:


  1. CPU底座CPI = 2,时钟频率2GHz的=

  2. 主缓存,速率小姐/指令= 7%

  3. L-2高速缓存访​​问时间为15ns =

  4. L-2高速缓存,本地缺失率/指令= 30%

  5. L-3高速缓存访​​问时间为30ns =

  6. L-3高速缓存,环球小姐速率/指令= 3%,主存储器存取时间= 150ns的

什么是有效的 CPI 的?

这是我的理解是,我需要计算每个高速缓存级别的缺失损失。

It is my understanding that I need to calculate the miss penalty for each cache level.


  • L2的L1缺失损失=访问时间= 15ns的/(1纳秒/ 2毫升)= 30个时钟周期

  • L3的L2缺失损失=访问时间30ns的= /(1纳秒/ 2毫升)= 60个时钟周期

  • MM = 150ns的/(1纳秒/ 2毫升)= 300个时钟周期的L3缺失损失=访问时间

现在我需要计算有效的 CPI 的。这是我有点糊涂了。

Now I need to calculate the effective CPI. This is where I am a bit confused.

我相信的公式的应该是:

CPI = BaseCPI +(%L1 MR / INSTR * L1小姐罚款)+(%L1 MR / INSTR *
  %L2 MR / INSTR * L2小姐罚款)+(%全球MR / INSTR * L3小姐罚款)

CPI = BaseCPI + (%L1 MR/Instr * L1 Miss Penalty) + (%L1 MR/Instr * %L2 MR/Instr * L2 Miss Penalty) + (%Global MR/Instr * L3 Miss Penalty)

如果我这样做,我得到

CPI = 2.0 +(0.07 * 30)+(0.07 * 0.3 * 60)+(0.03 * 300)= 14.36

CPI = 2.0 + (0.07 * 30) + (0.07 * 0.3 * 60) + (0.03 * 300) = 14.36

电子邮件我的老师,因为没有人在课堂上理解全球和本地的1-2分钟的解释之后,我被告知,我的答案是接近的,但错了。如果任何人都可以提供一些见解,甚至是指向我朝着一个很好的教程,我将不胜感激。我能理解如何找出有效的 CPI 的1和2级高速缓存。使得跳转到3混淆了我。


After emailing my instructor because no one in the class understood the 1-2 minute explanation of global and local, I was told that my answer is close, but wrong. If anyone could provide some insight, or even point me towards a good tutorial, I would be grateful. I can understand how to figure out effective CPI for 1 and 2 level caches. Making the jump to 3 confuses me.

推荐答案

哎,所以我给他发邮件询问该解决方案

Hey so I emailed him asking about this solution

有效CPI = 2.0 + 0.07×30 + 0.30×60 + 0.03×300 = 31.1

Effective CPI = 2.0 + .07 x 30 + .30 x 60 + .03 x 300 = 31.1

和他的回应是,L1和L3是正确的,但我不得不考虑到L2当地的命中率。不知道这是什么意思呢,而是希望这个小信息可以帮助

and his response was that L1 and L3 were correct but that I had to take into account the local miss rate for L2. Not sure what that means yet, but hope this little info helps

这篇关于如何计算有效CPI为3级缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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