retagged by
1,088 views
2 votes
2 votes

Please help in clearing following two points :-

1.Consider   write back cache and  we use simultaneous organization, as mentioned here:- https://gateoverflow.in/14480/formula-write-back-write-through-access-time-parallel-serial

For simultaneous access and write-back: 

Tread=Twrite=H×Tcache+(1−H)×(Tmemory_block+Twrite_back),

 where Twrite_back=x×Tmemory_block, where x is the fraction of dirty blocks

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?

2. 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?

retagged by

1 Answer

0 votes
0 votes

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 

edited by

Related questions

0 votes
0 votes
0 answers
3
0 votes
0 votes
1 answer
4