Calculating HIT RATE on a CACHE MEMORY

57 Views Asked by At

We assume that the processor reads the cache memory in one clock cycle when we have a cache miss, the CPU requires 5 clock cycles to read the information in the central memory. What should be the value of the cache parameter HIT RATE so that the average access time of the main memory is equal to 2 cycles.

I'm doing these Caclulations :

CACHE HIT RATE as H ,  CACHE MISS RATE as M. 
        M=1-H
        AVERAGE ACCESS TIME as AMAT
       AMAT= H + (M * MISS PENALTY)
       2= H + (M*6)
       2= H + 6 * (1-H)
       2 = H + 6 - 6H
       2 = 6 - 5H
       5H = 4
       H = 4/5 , or H=0.8 = 80%

Is this correct ? My concern is if MISS PENALTY is 6 or 5 ? But i think is 6 because 1 cycle for cache and 5 from Memory , so it's 6 ? Is this correct ?

0

There are 0 best solutions below