Answer: Hit
A program usually stay in localized areas, it is
assumed that there is a possibility that the blocks which have been recently referenced
may also be referenced in near future. Therefore when a block is to be
overwritten it is a good decision to overwrite the one that has been not
referenced for a long time. This block is called Least Recently Used block.
It is required to track the LRU block. A counter is
used for this purpose.
When a hit occurs (when a read request is received for
a word that is in the cache), the counter of the block that is referenced is
set to 0. All counters which values originally lower than the referenced one are
incremented by 1 and all other counters remain unchanged.
0 comments:
Post a Comment