retagged by
23,926 views
36 36 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 _______________.

7 Answers

Best answer
32 32 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
13 13 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
5 5 votes

See If mention in que like "Level or Heirarichal" Then use Heirarichal access.

 

Now let's come to this que it is simultaneous now see how ans 0.847 is not correct but 0.85 is 100% correct

Before optimization

0.8*(10) + 0.2*(100) => 28

 

Now if you carefully read the questions it says that The minimum hit rate needed after the optimization such that it should not increase the average memory access time. Let hit is H.

After optimization

28 >= H*(15) + (1-H)*100  

 (Here >= because it say minimum Hit require that emat will remain same means it talk about at least)

 

So if further calculate it will be 

-72 >= -85H

72 <= 85H

0.847 <= H     which is obviously H should be greater than 0.847 then actual answer is 0.85 only

0 0 votes
  • Initial Hit Rate = 0.8

  • Initial Cache Access Latency = 10 ns

  • Initial Miss Penalty = 100 ns

  • Optimized Cache Access Latency = 15 ns

  • Optimized Miss Penalty = 100 ns

  • New Hit Rate = hhh (to be found)

Step 1: Compute Initial Average Memory Access Time (AMAT)

AMATinitial=(Hit Rate×Cache Latency)+(Miss Rate×(Cache Latency+Miss Penalty))\text{AMAT}_{\text{initial}} = (\text{Hit Rate} \times \text{Cache Latency}) + (\text{Miss Rate} \times (\text{Cache Latency} + \text{Miss Penalty}))AMATinitial​=(Hit Rate×Cache Latency)+(Miss Rate×(Cache Latency+Miss Penalty)) AMATinitial=(0.8×10)+(0.2×(10+100))\text{AMAT}_{\text{initial}} = (0.8 \times 10) + (0.2 \times (10 + 100))AMATinitial​=(0.8×10)+(0.2×(10+100)) =8+(0.2×110)= 8 + (0.2 \times 110)=8+(0.2×110) =8+22=30 ns= 8 + 22 = 30 \text{ ns}=8+22=30 ns

Step 2: Compute Required Hit Rate for New AMAT

For the new cache, the AMAT should not exceed 30 ns:

AMATnew=(h×15)+((1−h)×(15+100))≤30\text{AMAT}_{\text{new}} = (h \times 15) + ((1 - h) \times (15 + 100)) \leq 30AMATnew​=(h×15)+((1−h)×(15+100))≤30 15h+(1−h)×115≤3015h + (1 - h) \times 115 \leq 3015h+(1−h)×115≤30 15h+115−115h≤3015h + 115 - 115h \leq 3015h+115−115h≤30 −100h+115≤30-100h + 115 \leq 30−100h+115≤30 −100h≤−85-100h \leq -85−100h≤−85 h≥0.85h \geq 0.85h≥0.85

Final Answer

The minimum hit rate needed after the optimization is 0.85 (rounded to two decimal places).

Answer:
Position:
Show:

Related questions

48 48 votes
3 answers 3 answers
18.1k
18.1k views
Arjun asked Feb 15, 2022
18,147 views
Let $\text{WB}$ and $\text{WT}$ be two set associative cache organizations that use $\text{LRU}$ algorithm for cache block replacement. $\text{WB}$ is a write back cache ...
80 80 votes
7 7 answers
26.5k
26.5k views
Arjun asked Feb 15, 2022
26,533 views
Consider a system with $2 \;\text{KB}$ direct mapped data cache with a block size of $64 \; \text{bytes}.$ The system has a physical address space of $64 \; \text{KB}$ an...
75 75 votes
9 answers 9 answers
40.0k
40.0k views
Kathleen asked Sep 13, 2014
39,970 views
The access times of the main memory and the Cache memory, in a computer system, are $500$ n sec and $50$ nsec, respectively. It is estimated that $80\%$ of the main memor...
45 45 votes
7 7 answers
25.0k
25.0k views
Arjun asked Feb 15, 2022
25,017 views
A processor $\text{X}_{1}$ operating at $2 \; \text{GHz}$ has a standard $5-$stage $\text{RISC}$ instruction pipeline having a base $\text{CPI (cycles per instruction)}$ ...