recategorized by
532 views
0 votes
0 votes

Assume a memory access to main memory on a cache “miss” takes $30 \; \text{ns}$ and a memory access to the cache (on a cache “hit”) takes $3 \; \text{ns}.$ If $80 \%$ of the processor’s memory requests result in a cache “hit”, what is the average memory access time?

  1. $8.4 \text{ns}$
  2. $9 \text{ns}$
  3. $4.4 \text{ns}$
  4. $2.2 \text{ns}$
recategorized by

1 Answer

2 votes
2 votes

Here we have confusion that when to use given two formula

(1)  T$_{avg}$ = (hit ratio) * (Cache access time)  +  (1- h)  (Cache access time + Memory access time) 

(2) T$_{avg}$ = (hit ratio) * (Cache access time)  +  (1- h)  (Cache miss penalty)       

see, when in the question memory access time given explicitly and there is no discussion of cache miss penalty then we will for 1st formula.

and if in the question cache miss penalty is given and no memory access time then use 2nd formula.


now coming to the question, here cache miss penalty is not given rather memory access time is given after cache miss.

so we will use this formula:

(1)  T$_{avg}$ = (hit ratio) * (Cache access time)  +  (1- h)  (Cache access time + Memory access time) 

                       =  $\frac{80}{100} (3) + (1 - \frac{80}{100}) (3 + 30)$

                       =  $\frac{240}{100} + \frac{660}{100}$

                       =  $\frac{900}{100}$

                       = 9 ns.

Answer : 9 ns.

 

Answer:

Related questions