edited by
2,678 views
3 votes
3 votes

Assume that a system is using write-through cache. It has 70% write hits. The cache operates in look-aside mode with a read-hit ratio of 80%. The program run on the system is such that it has memory reference for read 70% of time and for write is 30%. The main memory cycle time is 100ns and the cache access is 20ns. (Further assume we are using no write allocate policy). Average access time of the system is

A. 43

B. 55.2

C. 41.5

D. 60

edited by

2 Answers

Best answer
5 votes
5 votes

Assume that a system is using write-through cache. It has 70% write hits. (Further assume we are using no write allocate policy)

Average access time in case of write = $0.30\left (0.70 * (100) + 0.30 * (100) \right ) = 30$ ns

The cache operates in look-aside mode with a read-hit ratio of 80%

Average access time in case of read = $0.70\left (0.80 * (20) + 0.20 * (100) \right ) = 25.2$ ns


Average access time of the system is = $30 + 25.2 = 55.2$ ns.

selected by
2 votes
2 votes

Average memory access time =  Time spend for read + Time spend for write

= Read time when cache hit + Read time when cache miss
+Write time when cache hit + Write time when cache miss
 

0.7*(0.8*20 + 0.2*100) (Simultaneous read as look aside mode is given)

+ 0.3*(0.7*100 + 0.3*100) (as write through policy is used)

=25.2 + 30 = 55.2

https://stackoverflow.com/questions/34001002/look-through-vs-look-aside

Related questions

0 votes
0 votes
0 answers
2
prasitamukherjee asked Aug 6, 2016
393 views
If the question is given, L1 cache access time is 150ns/word and one block of L1 cache contains 5words.Should I multiply the access time by 5 or leave it at 150ns as memo...