Calculating actual/effective CPI for 3 level cache

半城伤御伤魂 提交于 2019-12-02 12:25:36

(a) The AMAT calculation is correct if you notice that the MissPenalty_L2 parameter is what you called Miss penalty to main memory.

The CPI is a bit more difficult. First of all, let's assume that the CPU is not pipelined (sequential processor).

There are 1.37 memory accesses per instruction (one access to fetch the instruction and 0.37 due to data transfer instructions). The ideal case is that all memory acceses hit in the L1 cache. So, knowing that:

CPI(ideal) = CPI(computation) + CPI(mem) = 
             CPI(computation) + Memory_Accesses_per_Instruction*HitTime_L1 =
             CPI(computation) + 1.37*HitTime_L1

With real memory, the average memory access time is AMAT, so:

CPI(actual) = CPI(computation) + Memory_Accesses_per_Instruction*AMAT =
              CPI(ideal) + Memory_Accesses_per_Instruction*(AMAT - HitTime_L1) =
              CPI(ideal) + 1.37*(AMAT - HitTime_L1)

(b) Your AMAT calculation is wrong. After a miss at L2, it follows a L3 access that can be a hit or a miss. Try to finish the exercise yourself.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!