retagged by
465 views
0 votes
0 votes
Main disadvantage of direct mapping is that cache his ratio decreases sharply it two or more frequently used blocks map on to same region.

For two level memory hierarchy cache and main memory, WRITE THROUGH results in more write cycles to main emeory then WRITE BACK.

is it true or false ? with reasons ?

thank you in advance
retagged by

1 Answer

1 votes
1 votes
The first statement is mostly true. Direct mapping is a simple cache mapping technique where each block of main memory can be mapped to only one specific cache line. However, if two or more frequently used blocks map on to the same cache line, then cache hit ratio decreases sharply, leading to more cache misses and reduced cache performance. This is because a block from the main memory that is mapped to a busy cache line would need to be replaced before a new block can be loaded from the main memory.

The second statement is true. In the WRITE THROUGH policy, every write operation is performed on both the cache and the main memory. This ensures that the main memory always has the latest copy of the data, but it results in more write cycles to main memory than in the WRITE BACK policy. In the WRITE BACK policy, the write operation is performed only on the cache, and the updated data is written back to the main memory only when the block is replaced or evicted from the cache. This reduces the number of write cycles to the main memory, but it may lead to data inconsistency issues in certain cases. Therefore, the choice of the write policy depends on the specific requirements of the system.

Related questions

0 votes
0 votes
1 answer
2