First time here? Checkout the FAQ!
+4 votes

64 word cache and main memory is divided into 16 words block.The access time of cache is 10ns/word and for main memory is 50ns/word. The hit ratio for read operation is .8 and write operation is.9. Whenever there is a miss in cache, associated block must be brought from main memory to cache for read and write operation. 40% reference is for write operation. Avg access time if write through is used.

asked in CO & Architecture by Junior (951 points)  
edited by | 986 views
what is the default memory organization- simultaneous or hierarchical?? this is the biggest doubt.. PLzzz Plzzz some one clear it.

Sir i have small confution

TavgR=hr×tc+(1−hr)×(tm+tc)  in given formula what tc is. tc=cache access time before new block come to main memory or cache acces time after new block is come to MM and then access is taken from cache.

I think in given formula will be hr*tc + (1-hr)*(tm+2*tc) bcoz in case of miss cache is access 2 time, before block came from MM and after block come into MM.

please clear my confution @Arjun

by default we use simultaneous .
By default we use hierarchical, it is more practical.

simultaneous is like parallel access which is not practical scenario .

1 Answer

+9 votes
Best answer
Cache access time = 10 ns
1 block main memory access time $= 50\times 16 = 800 ns$ (as from main memory, entire cache block is retrieved)

Then use this formula
$T_{avg_R} = h_r \times t_c+(1-h_r)\times (t_m + t_c) = 0.8 \times 10 + 0.2 \times (800 + 10) = 170 ns$ (Hierarchical access is default in case of read)

Whenever cache is missed, data (entire cache block) must come from main memory for write as per question. Also for all write operations, one word of data is written to main memory as cache is WRITE THROUGH. In WRITE THROUGH cache since main memory is always updated, memory arrangement is simultaneous and hence cache access time need not be considered (as it should be smaller than main memory access time and both happens in parralel).

$T{avg_W} = h_w\times t_m + (1-h_w)  (t_m + 800 )$

$= 0.9 \times 50 + 0.1 \times 850 = 130 ns$

$T_{avg}= f_r\times T_{avg_R}+ f_w\times T_{avg_W} = 0.6 \times 170 + 0.4 \times 130 = 154 ns.$
answered by (199 points)  
edited by

@Arjun sir,

 access time of cache is 10ns/word is given and 64 word cache

Cache access time = 10* 64 =640 ns totally right ? Please clarify?

whole cache is not fetched- only cache line is fetched.
it is 64 word cache..okay,but we will fetch only 1

but suppose it was given that maim memory access=20ns,but when a miss occurs,we need to bring entire block, then it would have neeb multiplied(for MM)
Someone please tell me what is the actual meaning of cache access time . Is it the time required to fetch a byte or time required to search cache or is it the sum of both?


cache access time  includes :

 The time required to search cache  and then fetch a byte ,

yes it is sum of both .

Top Users Sep 2017
  1. Habibkhan

    6836 Points

  2. Arjun

    2310 Points

  3. Warrior

    2306 Points

  4. rishu_darkshadow

    2092 Points

  5. A_i_$_h

    2004 Points

  6. nikunj

    1980 Points

  7. manu00x

    1750 Points

  8. Bikram

    1744 Points

  9. SiddharthMahapatra

    1718 Points

  10. makhdoom ghaya

    1690 Points

26,038 questions
33,651 answers
31,069 users