This question is asking about Average writing time for Write-Through technique ...In write through Technique, cache write / update and memory write/ update is done paralley means both have done at the same time ( parallely) .
Now, H = hit rate in cache
Tc = cache access time
Tm = memory access time
H= 35%
Tc= 20 and Tm = 40
writing / updating time into memory = 50
so formula is
T avg write time = H * T memory update time + ( 1-H) * ( T memory update time )
= 0.35 * 50 + 0.65 * ( 50 )
= 17.5 + 32.5
= 50
When cache miss occurs , in Write Through it use Write No-Allocate policy, in Write No-Allocate Missed main memory block is updated while residing in the Main memory itself and NOT brought to the cache.
That's why we need to consider Memory update time only when cache miss.
In Write - Through Technique , every write operation to the CACHE is repeated to the main memory AT THE SAME TIME.
Write-Through Technique use Write No Allocate Policy . Where the missed Main memory block is updated while residing in the main memory and not brought to the cache.
so for this problem formula used is :
TAverage writing time = H * T mem update time + ( 1 - H ) * ( T mem update time ) .
// In this question all the data given is not required .
And we don't need extra search time as it is clearly mention in the question that " consider a 2 level memory hierarchy " . Means if miss in cache then surely found in main memory .
So the question implicitly assumes that all the blocks required are contained within the main memory, we NO need to check whether a block exists or not because, if it doesn't exist then we have to go to secondary storage but that is not mentioned in the question , in question only 2 level memory hierarchy is given .