retagged by
611 views
1 votes
1 votes
Writing the example in short words;

Cache Access =1ns

Main Memory Access =10 clock cycles

Time to load word into the cache = 17 cycles

30% Instructions perform Memory read and write.

Instruction cache Hit rate=.95 and Data cache hit rate =.9

Let us say that Miss penalty is same for both read and write access.

Find the performance gain if we use system with cache over system without cache.
retagged by

1 Answer

Best answer
2 votes
2 votes
Miss Penalty = Main memory access time + Cache load time

= 10 + 17 = 27 cycles. -- assuming this is same for both data and instruction cache

Instruction Execution Time with cache (both instruction and cache) ignoring data memory access = Instruction Cache access time + Miss Rate * Miss penalty

$= 1ns + 0.05 \times 27 =  2.35 ns$.

Average data memory access time = Data cache access time + Miss rate * Miss penalty

$ = 1ns + 0.1 \times 27 = 3.7 ns$.

Average instruction execution time $ = 2.35 + 0.3 \times 3.7 = 3.46 ns$.

Average instruction execution time without cache $ = 10 + 0.3 \times 10 = 13 ns$.

So, speed-up $ = \frac{13}{3.46} = 3.75.$
selected by

Related questions