retagged by
1,156 views
1 votes
1 votes

Data:

Hit Ratio for Read Op - 80%
Hit Ratio for Write Op - 90%
There are 30% updations.
Cache Access time: 20ns [CMAT]
MM Access Time - 100ns [MMAT]

If there is a miss (either for read or write entire 2 block word block is transferred from MM to CM.


What I did:

T(avg)read = ReadHit * Read Data + ReadMiss * (MMAT + CMAT) * 2 = 64ns

T(avg)write = WriteHit * WriteTime + WriteMiss * (MMAT + WriteTime) * 2 = 130ns

Where, WriteMiss = max(MMAT,CMAT)

(NOTE: RHS of + in above formula multiplied by 2 because 2 blocks are transferred per miss)

T(avg)Write-Read = TotalReadOps * T(avg)Read + TotalWriteOps * T(avg)Write = 83.8

Efficiency = 1/83.8 ns i.e. 11.9 Million Ops per sec

Please tell me if it's right or wrong or how it will be solved.

retagged by

1 Answer

Best answer
8 votes
8 votes

write through scheme.

$T(avg)_{read}$=Hr*Tc+(1-Hr)*(Tm+Tc).

Hr=Read hit.

Tc=Read data

Tm=Read allocate.

here block size is 2 words.main memory is in the form of blocks not words,so Tm=2*100=200ns.

$T(avg)_{read}$=0.8*20+0.2[20+200]  

                       =60ns.

$T(avg)_{write}$=Hw*Tw+(1-Hw)*[Tm+Tw].  //

here dont take cach access time(Tc) it is simulatneously updates in MM and Cache,so whichever takes large consider that time

Tw=max[cache access,memory write] // Tw=simultaneous write.

Tw=max[20,100]

    =100ns.

$T(avg)_{write}$=0.9*100+0.1*[200+100]

                       =90+30=120ns.

$T(avg)_{access}$=Fr*$T(avg)_{read}$+Fw*$T(avg)_{write}$

                            =0.7*60+0.3*120

                            =36+42=78ns.

$\eta =\frac{1}{T(avg)_{access}}$.

         =1/78ns

          =12.82 MIPS.

selected by

Related questions

1 votes
1 votes
1 answer
1
1 votes
1 votes
1 answer
2
0 votes
0 votes
1 answer
4