A pipeline machine running al 1 GHz with an instruction cache and data cache. Th
ID: 3836779 • Letter: A
Question
A pipeline machine running al 1 GHz with an instruction cache and data cache. The cache (Instruction/Data) access time is 1 ns and the memory access time is 60ns. The base CPI for this machine is 2.0. a. A program with the following instruction mix (20%Ioad, 10% store, and 20% branch, 50%arith) is executed on this machine. The miss rate for the data cache is 5% for the loads and 3% for stores. The miss rate for the instruction memory is 1.5%. What is the CPI of this machine? b. If the data cache size is doubled the miss role for the loads and stores is reduced to 2% and 1%, respectively. The data cache access lime, as a result, is increased to 1.25ns. To accommodate the increased in the data cache access time, the CPU clock is reduced to allow the data cache access to be completed in I clock cycle. Is this machine faster or slower than the machine in part a.Explanation / Answer
A) CPU time = IC x [CPI execution + Memory accesses/instruction x Miss rate x Miss penalty ] x Clock cycle time
CPUtime with cache = IC x (2.0 + (1.33 x 2% x 50)) x clock cycle time
= IC x 3.33 x Clock cycle time
•Instruction mix: 50% arith/logic, 30% load/store, 20% control
•Assume a cache miss rate of 1.5% and a miss penalty of 50 cycles.
CPI = CPIexecution + mem stalls per instruction
Mem Stalls per instruction = Mem accesses per instruction x Miss rate x Miss penalty
Mem accesses per instruction = 1 + .3 = 1.3
Mem Stalls per instruction = 1.3 x .015 x 50 = 0.975
CPI = 1.1 + .975 = 2.075
The ideal memory CPU with no misses is 2.075/1.1 = 1.88 times faster
•Since memory speed is not changed, the miss penalty takes more CPU cycles:
Miss penalty = 50 x 2 = 100 cycles.
CPI = 1.1 + 1.3 x .015 x 100 = 1.1 + 1.95 = 3.05
Speedup = (CPIold x Cold)/ (CPInew x Cnew)
= 2.075 x 2 / 3.05 = 1.36
The new machine is only 1.36 times faster rather than 2
Note:CPUs with higher clock rate, have more cycles per cache miss and more memory impact on CPI.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.