retagged by
8,846 views
13 votes
13 votes

A cache memory that has a hit rate of $0.8$ has an access latency $10 \; \text{ns}$ and miss penalty $100 \; \text{ns}.$ An optimization is done on the cache to reduce the miss rate. However, the optimization results in an increase of cache access latency to $15 \; \text{ns},$ whereas the miss penalty is not affected. The minimum hit rate (rounded off to two decimal places) needed after the optimization such that it should not increase the average memory access time is _______________.

retagged by

2 Answers

Best answer
11 votes
11 votes
$\text{For a given cache, Average memory access time can be computed as:}$
$\text{AMAT} = \text{HitTime} + \text{Miss rate}*\text{Miss Penalty}$

$\text{Initially,}$
$\text{Hit rate of cache} = 0.8$
$\therefore \text{Miss rate} = 0.2$

$\text{Access Latency = HitTime} = 10\,ns$

$\text{Miss Penalty} = 100\,ns$

$\therefore \text{AMAT}_{unoptimized} = 10 + 0.2(100) = 30\,ns$

$\text{For the optimized cache,}$

$\text{Access Latency = HitTime} = 15\,ns$

$\therefore \text{AMAT}_{optimized} = 15 + x(100)$

$\text{Now,}$

$ \text{AMAT}_{unoptimized} \geqslant \text{AMAT}_{optimized} $

$30 \geqslant 15 + 100x$

$\implies 15 \geqslant 100x$

$\implies 0.15 \geqslant x$

$\implies 0.85 \leqslant 1-x$

$\therefore \text{The required hit rate} = (1-x) = 0.85$
selected by
9 votes
9 votes

Those who are saying 0.84 can also be the answer, consider the following :

Firstly, it is mentioned in the question that Average memory access time should not increase. This means the new average memory access time should be either equal or less than its original obtained value.

 

In hierarchical access, hit ratio is coming to be 0.85.

Let's check for simultaneous access,

Average memory access time = ( 0.8 * 10 )  +  ( 0.2 * 100 ) = 28 ns.

Now the cache latency has become 15 ns.

 

So, put the value of hit ratio as 0.84 ( simultaneous access ) and compute the average memory access time.

Average memory access time = ( 0.84 * 15 ) + ( 0.16 * 100 ) = 28.6 ns

 

Now if we put the value of hit ratio as 0.85 ( simultaneous access ), then,

Average memory access time = ( 0.85 * 15 ) + ( 0.15 * 100 ) = 27.75 ns 


Now, it can be seen that for hit ratio 0.84 ( simultaneous access ), the average memory access time is 28.6 ns which is more than that its original value 28 ns.

But for hit ratio with 0.85 ns ( simultaneous access ), the average memory access time is 27.75 ns which is less than its original value.

But in the question, it is
clearly written that average memory access time should not increase. This means the average memory access time can be equal or less than the original value.

Hit ratio 0.85 is giving value less than 28 ns whereas hit ratio 0.84 is giving value more than 28 ns. But as per requirement of the question, average memory access time should not be more than its original value.

So, correct answer is 0.85 irrespective of memory access technique.

 

edited by
Answer:

Related questions

9 votes
9 votes
3 answers
3
Arjun asked Feb 15, 2022
5,024 views
Which one of the following facilitates transfer of bulk data from hard disk to main memory with the highest throughput?$\text{DMA}$ based $\text{I/O}$ transferInterrupt d...
40 votes
40 votes
3 answers
4