






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Book in hand
Book on table
Book on shelf
Book in system
L1/L2 cache RAM HDD network/optical disc
Data most recently accessed OR data near recently accessed data is likely to be accessed again in the near future
The purpose of a cache is to store such data in an area more easily accessed than, say, the hard drive
In a library, one will take related books off a shelf and bring them to a table, but will not return them to the shelves until either research is complete or the table is out of space
Least recently added
Removes items in the order which they entered the cache
Requires entry order to be stored
Easily implemented, but also easily ineffective
Least recently used Removes the item which was last used the longest time ago Requires last access time to be stored Efficient, but difficult to implement
Combines direct mapping and associative mapping
The cache is divided into N blocks of equal size
Data from memory address X is assigned a specific block X mod N
Each block then follows associative mapping
Note that associative mapping is like a set associative map with one block, and direct mapping is like a set associative map with each block having size 1