Cache memory on a computer is a storage container for data recently used by the central processing unit (CPU). The CPU can retrieve the information extremely fast and use it to process the next batch of information. A prime example of a common use of a cache would be the many pages, images and web addresses that your browser routinely gathers and stores in a folder on your hard drive.
Video of the Day
Cache memory is a smaller but faster compartment of memory that supports main memory. Cache memory is designed to accelerate the memory function. Your computer checks the cache to see if the data it needs is in storage. If the item is there, it is called as a "cache hit." In cases when the information is not stored in the cache, which is referred to as a "cache miss," in almost the same instant, the request is routed to the slower memory location to retrieve the data.
Even with faster microprocessors and main memory (RAM) with greater capacities, bottlenecks still occur when information moves between the CPU and RAM. Cache memory is a type of supplemental memory built for faster conveyance of information between these two components of the computer. The computer builds a library of frequently used information into the cache memory. The role of "caching" is to accelerate the speed of your system. Caching not only helps reduce logjams at the CPU and RAM, but enables users to perform tasks faster because data transmits more rapidly from cache memory to CPU.
Level 1 Cache
Typically, a high-speed cache is integrated right into the processor. This is the level 1 cache. One of the main motivations behind this concept is the "locality of reference." It means that a location just accessed by the CPU has a higher probability of being revisited in the short term. So the L1 cache holds the most recent data. When it needs the data again, the microprocessor first checks the L1 cache. Since the data is there, it eliminates the need to go back to the slower main memory. The process is usually two times faster than with the main memory.
Level 2 Cache
Level 2 cache memory, or the secondary cache, on a computer is usually located on a memory card situated close to the processor. It links directly to the central processing unit, and a circuit that is integrated into the motherboard controls it. The circuit is called the L2 controller. The level 2 cache catches recently used data not in the level 1 cache. The L2 cache on many personal computers enables the processor to get about 95 percent of the information it needs from the cache memory.
Other Cache Memory
Disk cache is another type of cache memory. It operates at a much slower speed than the other caches, because it reads data from the computer's hard drive and stores it on RAM. Software programs like DOS use it. Just as RAM is slower than L1 and L2 cache, the disk is much slower than RAM.
Often, personal computer peripherals are cached using the computer's RAM. This is a peripheral cache and operates much the same way as disk cache. For example, a DVD-ROM may be cache using the system's RAM or even the disk. Either caching method may be faster than the DVD-ROM drive.