Cache placement policies: Difference between revisions

Content deleted Content added
Advantages: "cheap hardware" > "simple and low-cost". cheap probably sounds a bit... insulting.
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
 
(2 intermediate revisions by 2 users not shown)
Line 20:
* This placement policy is power efficient as it avoids the search through all the cache lines.
* The placement policy and the [[CPU cache#Replacement policies|replacement policy]] is simple.
* Simple and low-cost hardware can be used, as only one tag needs to be checked at a time.
 
=== Disadvantage ===
* It has lower cache hit rate, as there is only one cache line available in a set. Every time a new memory is referenced to the same set, the cache line is replaced, which causes conflict miss.<ref>{{Cite web|url=http://meseec.ce.rit.edu/eecc551-winter2001/551-1-30-2002.pdf|title=Cache Miss Types|access-date=2016-10-24|archive-date=2016-11-30|archive-url=https://web.archive.org/web/20161130184519/http://meseec.ce.rit.edu/eecc551-winter2001/551-1-30-2002.pdf|url-status=dead}}</ref>
 
=== Example ===
Line 48:
 
=== To place a block in the cache ===
* The cache line is selected based on the [[CPU cache#Flag bits|valid bit]]<ref name=":0" /> associated with it. If the valid bit is 0, the new memory block can be placed in the cache line, else it has to be placed in another cache line with valid bit 0.
* If the cache is completely occupied then a block is evicted and the memory block is placed in that cache line.
* The eviction of memory block from the cache is decided by the [[CPU cache#Replacement policies|replacement policy]].<ref>{{Cite web|url=http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/Memory/fully.html|title=Fully Associative Cache|archive-url=https://web.archive.org/web/20171224054857/http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/Memory/fully.html|archive-date=December 24, 2017|url-status=dead}}</ref>