Concept of Caching
Need for Cache has come about due to reasons : The concept of Locality of reference.
-> 5 percent of the data is accessed 95 percent of the times, so makes sense to cache the 5 percent of the data.
0.5 MB - 8 MB
SRAM
Hardware
DRAM Magnetic
Cache organization
When the processor needs to read or write a location in main memory, it first checks whether that memory location is in the cache. This is accomplished by comparing the address of the memory location to all tags in the cache that might contain that address. If the processor finds that the memory location is in the cache, we say that a cache hit has occurred; otherwise, we speak of a cache miss.
Cache Performance
Cache Size Cache Handling Replacement Strategy Automatic pre fetching
References
Wikipedia : http://en.wikipedia.org/wiki/CPU_cache ArsTechnica : http://arstechnica.com/ http://software.intel.com What Every Programmer Should Know About Memory - Ulrich Drepper, Red Hat, Inc.
Q/A