4,733 views
4 votes
4 votes
The access time of cache memory is 45 nsec and that of main memory is 750 nsec. It is found that 75% of memory requests are for read and remaining for write. If the hit access for read is 0.9 and hit ratio for write is 1 and write through protocol is used, then the average memory access time is ________.

1 Answer

5 votes
5 votes

Here, $H_{R1}$ is hit ratio for read operation to cache is 0.9, and hit ratio for main memory will be $H_{R2}$ = 1 as it must hit the request.

Memory Access Time for Read ($MAT_{R}$) is,

$MAT_{R}$ = $H_{R1}T1 + (1 - H_{R1})H_{R2}T2$

              = 0.9 * 45 + (1 - 0.9) * 1 * (45 + 750)

              = 40.5 + 79.5

              = 120 ns

Here, we take T2 = (45 + 750), because the memory access type is hierarchical, so Miss Penality will be the time from cpu to cache and cache to main memory in total.

Now, Memory Access Time for Write ($MAT_{W}$) is,

$MAT_{W}$ = $H_{W2}$T2

              = 1 * 750

              = 750 ns

In question they have given that we are using write through protocol, so write operation in cache and and write operation in main memory will be performed simultaneously, Though to write the data into main memory it will take the time 750 ns, and given hit ratio is 1.

 

So, the Average Memory Access Time (AMAT) is :

From all requests 75% is read requests, so 25 % is write request.

$AMAT = \frac{MAT_{R} * Read Requests + MAT_{W} * Write Requests}{Read Requests + Write Requests}$

$AMAT = \frac{120 * 0.75 + 750 * 0.25}{0.75 + 0.25}$

$AMAT$ = 277.5 ns

Related questions

2 votes
2 votes
1 answer
2
Manu Thakur asked Oct 29, 2017
886 views
My Solution:E.M.A.T = HitTimeL1 + MissRateL1x( HitTimeL2 + MissRateL2xMissPenaltyL2) = 1 + $\frac{16}{100}$(5 + $\frac{8}{16}$*50) = 1 + .16(30)...