Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please answer both parts correctly 7 . Consider a cached memory system with tm =

ID: 3816682 • Letter: P

Question

Please answer both parts correctly

7. Consider a cached memory system with tm = 300ns and tc = 50ns. Suppose that, on the average, an instruction requires 1.3 memory accesses. The typical instruction execution time exclusive of memory accesses is 175ns.

(a) Calculate the average instruction execution time (i.e., execution + memory access) with no cache.

(b) Calculate the average instruction execution time with each of the following cache hit ratios (assume a read through policy, that is, upon a cache miss the data is directly supplied to the CPU as well as the cache) :

h = 0.90

h = 0.95

h = 0.98

Explanation / Answer

7) Given that a cached memory system has tm = 300ns and tc = 50ns.

On average , an instruction requires 1.3 memory accesses.

It is also given that,

a typical instruction execution time exclusive of memory accesses is 175ns.

a) Average instruction execution time (with no cache) = execution + memory access

= 175ns + (1.3)*300ns

= 565ns

b) Average instruction execution time with cache = execution + effective access

where

effective access = memory access*(cache access time + miss penalty time).

Average instruction execution time

with cache hit ratio h = 0.90 = 175ns + (1.3) * (0.90*50ns + 0.10*300ns)

= 272.5ns

with cache hit ratio h = 0.95 = 175ns + (1.3) * (0.95*50ns + 0.05*300ns)

= 256.25ns

with cache hit ratio h = 0.98 = 175ns + (1.3) * (0.98*50ns + 0.02*300ns)

= 246.5ns