Edit: Ans is updated
Given , tc=10 ns, tm=100 ns per word i.e., for 2 words Tm=2*100=200 ns, hr=0.8, hw=0.9, % of dirty page replacement = x = 30% = 0.3 and by default hierarchial access
Considering the given question is for
1. Write through policy –
Tr=(hr*tc)+(1-hr)(tc+Tm)=(0.8*10)+(0.2)(10+200)=8+42=50 ns
Tw=100 ns (Write through always goes to memory, so hit rate does not matter for time and only 1 word is written to)
Tavg=0.8*Tr+0.2*Tw = 0.8*50 + 0.2*100 = 40+20 = 60 ns
Throughput = 1/Tavg = 1/60 = 0.016667*(10^9) = 16.67 * (10^6) words per second = 16.67 million words per second
2. Write Back policy –
Tr = (hr*tc)+(1-hr)(tc+Tm+(x*Tm)) = (0.8*10)+(0.2)(10+200+(0.3*200)) = 8+54 = 62 ns
Tw = (hw*tc)+(1-hw)(tc+Tm+(x*Tm)) = (0.9*10)+(0.1)(10+200+(0.3*200)) = 9+27 = 36 ns
Tavg = 0.8*Tr+0.2*Tw = 0.8*62 + 0.2*36 = 49.6+7.2 = 56.8 ns
Throughput = 1/Tavg = 1/56.8 = 0.0176056*(10^9) = 17.6056 * (10^6) words per second = 17.6056 million words per second