If the hit ratio for a given piece of code is 0.2, the time
required to access the cache is 20 nanoseconds, and the time to
access the underlying physical memory is 1 microsecond, what is the
effective memory access time for the piece of code? What is the
upper bound on speedup for the situation described in this
exercise?
use Amdahl’s Law to determine speedup from this cache.
Q-> If the hit ratio for a given piece of code is 0.2, the time required to access the cache is 20 nanoseconds, and the time to access the underlying physical memory is 1 microsecond,
Given:
H = hit ratio = 0.2
A = cache access time = 20 ns
m = memory access time = 1 us = 1000 ns
.
a) what is the effective memory access time for the piece of code?
effective access time = A + ( 1-H) * m = 20 + 0.8 * 1000 = 20 + 800 = 820 ns
=> effective access time is 820 ns
.
b) What is the upper bound on speedup for the situation described in this exercise?
speedup = memory access time / effective access time = 1000 / 820 = 1.21
Get Answers For Free
Most questions answered within 1 hours.