Computer Science, asked by Jananii9374, 1 year ago

the average memory access time for a machine with a cache hit rate of 90% where the cache access time is 10ns and the memory access time is 100ns is

Answers

Answered by genus23
1

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

For read = 45 + 0.1 * 750 = 45 + 75 = 120

For write = 750

Average access time = 0.75 * 120 + 0.25* 750 = 277.5

Here, HR1HR1 is hit ratio for read operation to cache is 0.9, and hit ratio for main memory will be HR2HR2 = 1 as it must hit the request.

Memory Access Time for Read (MATRMATR) is,

MATRMATR = HR1T1+(1−HR1)HR2T2HR1T1+(1−HR1)HR2T2

= 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 (MATWMATW) is,

MATWMATW = HW2HW2T2

= 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=MATR∗ReadRequests+MATW∗WriteRequestsReadRequests+WriteRequestsAMAT=MATR∗ReadRequests+MATW∗WriteRequestsReadRequests+WriteRequests

AMAT=120∗0.75+750∗0.250.75+0.25AMAT=120∗0.75+750∗0.250.75+0.25

AMATAMAT = 277.5 ns

Answered by Rishabh908
5

Answer:

Explanation:

h=90%

H=90/100

H=0.9

Then,

T(avg)=Ht(cache)+(1-H)T(cache)

To=0.9*10+(1-0.9)*100

To=24

Similar questions