CPSC 313 Lecture Notes - Lecture 2: Virtual Memory, Web Cache
Document Summary
Fundamental principles behind the memory hierarchy: programs access instructions/data at level k more than he ones that only appear at levels > k, k+1 is, slower, larger, cheaper, level k acts as cache for k+1. Cache hit: block b is already in the cache at level k. Cache miss: block b is not in the cache at level k. Go and fetch it from level k+1 cache (gotta cache"m all!) Where we place the block at level k cache could depend on b"s address or every location is ok. We need to eject a block to make room for b. Ideally: the one needed furthest in the future (the one we don"t need to use for a while/forever) Reality: least recently used, least frequently used, randomly select one. Occurs when active cache blocks are larger than the cache block is active when it has been used and will be used again later.