Cache Replacement & Cache Write Policy
Hi guys~
Now i am going to introduce the cache replacement and its write policy.
Cache replacement is meant some existing cache memory will be delete to create space for the new entry when the cache is full already.
Here are the replacement algorithm:
1) Direct mapping
-No choice
-Replace line
-Each block only maps to one line
2) Associative & Set Associative
-Hardware implemented algorithm (speed)
-Least recently Used(LRU)
-First In First Out (FIFO)
-Least Frequently Used (LFU)
-Random
Write Policy
- Must not overwrite a cache block unless main memory is up to date.
- Multiple CPUs may have individual caches.
- I/O may address main memory directly.
There is 2 type of the write policy:
1)Write though
-Slows down write.
-Lots of traffic.
-All writes go to main memory as well as cache.
2)Write back
-Updates initially made in cache only.
-Updates bit for cache slot is set when update occurs.
-Other caches get out of sync.
-I/O must access main memory through cache.
Ya, that's all for the cache replacement & cache write policy.
Next post will be discuss about the CMOS & External Memory.
Thank you for viewing~~ :)
Written by--®æŋ
0 comments: