In case of simultaneous access,if we are not bringing the word from main memory to cache memory then what data cache contains?How data comes to cache ?
Write Back use write allocate .
When cache is Missed - it updates the block in main memory and brings the updated block to the cache;
so it brings the word from main memory to cache in case of miss.
And in case of Hit - Only cache is updated and main memory is not updated. ( The modified cache block is written to main memory only when the cache block is replaced.)
In case of read if i get miss in cache,i will directly goto the second level to access data,so why should i include time to put dirty block back to main memory as i am not brining new word to cache in case of read miss ,so why are we adding the time to put dirty block back in case of read time ?
No, this is not true.. in case of cache miss memory block is updated in main memory and brings the updated block to the cache .
The meaning of this formula :
Tread=Twrite= H ×Tcache + (1−H) × (Tmemory_block+Twrite_back)
it is use for cache miss and with cache block being replaced and the replaced block being dirty-- so that has to be written back..
Tcache = Cache access time
Tmemory_block = memory block access time
Twrite_back = time to bring that block from MMU to cache
H = hit ratio , 1-H = Miss ratio