Cache placement policies: Difference between revisions

Content deleted Content added
Mark a dead link as such.
Line 53:
 
=== To search a word in the cache ===
* The Tag field of the memory address is compared with tag bits associated with all the cache lines. If it matches, the block is present in the cache and is a cache hit. If it doesn'tdoes not match, then it's is a cache miss and has to be fetched from the lower memory.
* Based on the Offset, a byte is selected and returned to the processor.
[[File:Fully-Associative Cache Snehal Img.png|thumb|513x513px|Fully associative cache]]
Line 94:
=== To locate a word in the cache ===
* The set is determined by the index bits derived from the address of the memory block.
* The tag bits are compared with the tags of all cache lines present in selected set. If the tag matches any of the cache lines, it is a cache hit and the appropriate line is returned. If the tag doesn'tdoes not match any of the lines, then it is a cache miss and the data is requested from next level in the memory hierarchy.
 
=== Advantages ===