Memory 查找程序中内存指令的百分比

Memory 查找程序中内存指令的百分比,memory,Memory,因此,我有一个问题: cache access time: 5ns penalty = 200ns hit rate = 0.95 for instruction cache hit rate = 0.90 for data cache 1k Instructions Total memory access time = 23,750ns 查找程序中的内存指令百分比。 我的方法 instructions found in cache: 950 * 5 = 4750ns instructions

因此,我有一个问题:

cache access time: 5ns
penalty = 200ns
hit rate = 0.95 for instruction cache
hit rate = 0.90 for data cache
1k Instructions
Total memory access time = 23,750ns
查找程序中的内存指令百分比。
我的方法

instructions found in cache: 950 * 5 = 4750ns
instructions not found in cache = 50*(200+5) = 10,250
Total time = 4750 + 10,250 = 15,000
Percentage = 15,000 / 23,750 = 0.63 so 63%
然而,这似乎并不正确,因为第二个问题是,如果数据缓存命中率提高到95%,那么总内存访问时间是多少。这意味着数据缓存的总访问时间将与指令缓存相同(因为它们现在都是95%),因此将为15000。
然后,总内存访问时间将为=15000+15000=30000,这比原始访问时间多。这是没有意义的,因为如果我们提高命中率,总访问时间不应该减少吗?

我想这是Kaushik Patra的SJSU CS147课堂作业

总访问时间=指令访问时间+数据访问时间 指令访问时间=(1000*5ns)+(0.05*1000*200ns)=15000ns 所以我们得到数据访问时间=8750ns,我们需要计算出在数据访问时间中使用的内存指令的百分比

数据访问时间=(内存分数*1000*5ns)+(内存分数*0.10*1000*200ns) 经过一些代数运算后,你应该得到记忆,分数是0.35