the internal memory size the concept of bringing data into primary memory is called cachingand it is motivated by temporal locality forby bringing data into primary memorywe are hoping that it will be accessed again soonand we will be able to respond quickly to all the requests for this data that come in the near future the second design choice is motivated by spatial locality specificallyif data stored at secondary+level memory location is accessedthen we bring into primary+level memorya large block of contiguous locations that include the location (see figure this concept is known as blockingand it is motivated by the expectation that other secondary+level memory locations close to will soon be accessed in the interface between cache memory and internal memorysuch blocks are often called cache linesand in the interface between internal memory and external memorysuch blocks are often called pages figure blocks in external memory when implemented with caching and blockingvirtual memory often allows us to perceive secondary-level memory as being faster than it really is there is still problemhowever primary+level memory is much smaller than secondarylevel memory moreoverbecause memory systems use blockingany program of substance will likely reach point where it requests data from secondary+level memorybut the primary memory is already full of blocks in order to fulfill the request and maintain our use of caching and blockingwe must remove some block from primary memory to make room for new block from secondary memory in this case deciding how to do this eviction brings up number of interesting data structure and algorithm design issues caching algorithms there are several web applications that must deal with revisiting information presented in web pages these revisits have been shown to exhibit localities of referenceboth in time and in space to exploit these localities of referenceit is often advantageous to store copies of web pages in cache memoryso these pages