CACHE

CPUs run much faster than everything else in the computer, which means that a computer is designed to ensure that the processor is not slowed down by the devices it works with. Slowdowns mean wasted processor cycles, where the CPU can’t do anything because it is sitting and waiting for data. There is a special kind of fast RAM, like SRAM, that a CPU needs; it is usually referred to as the cache. The cache holds the data that is likely to be needed next by the CPU. The cache operates as a buffer between the CPU that is very fast and the system RAM (memory), which is slow – it’s not really slow, the CPU is just very fast.

There are different types of cache in a computer, all acting as a buffer for often-used data to enhance the computer’s performance. Each layer is closer to the CPU and faster than the layer below it and each layer caches the layers below it, due to its increased speed relative to the lower levels. By utilizing this cache system, when the CPU needs something from memory, it gets it as soon as possible. Here is how it works: The CPU gets a data request and it goes to the L1 cache because it’s the fastest. If it finds the data there it uses it and there is no performance delay. If not, the CPU goes to the L2 cache and if it finds it there the CPU goes on with little delay. If the CPU doesn’t find the needed data, it sends a “read request” to the system RAM where the data may be stored or the system RAM may have to go to a disk (Hard, floppy, CD-ROM) to retrieve the data thereby slowing the CPU’s performance.

Level 1 (L1) Cache (sometimes referred to as internal cache) consists of the high-speed memory that is built into most CPUs. It is small, generally from 8 KB to 64 KB, but fast, it runs at the same speed as the CPU. By using L1 cache, the CPU can access often-used data more quickly. The amount of L1 varies but is not upgradeable.

Level 2 (L2) Cache, also called the “burst” or the “pipeline” cache; and when “cache” is referred to without qualifiers or as “system cache” or “external cache”, it means the Level 2 cache that is placed between the processor and the system RAM. The L2 is usually separate from the CPU and situated on the Motherboard. It is larger and a little slower than the L1 Cache, the size varies (usually between 512 KB to 2 MB) and, unlike the L1, it is usually upgradeable. The L2 works in conjunction with the CPU’s internal cache (L1) to provide maximum performance. This cache is where oft-used data is retained in memory as a way to help the CPU so that it seems to run even faster when this oft-used data is accessed. When considering the L2, remember that the rule of thumb is “the bigger the better.”

Disk cache is the part of the system RAM used to cache reads and writes to a drive (hard or external). It is not the size of disk cache that is important, but the organization of the cache itself (“write/read cache” or “look ahead cache”). Disk cache has the slowest speed since system RAM is slightly slower than the L1 or L2 and the drives themselves are much slower than the system RAM.



The Complete E-Commerce Book. Design, Build & Maintain a Successful Web-based Business
The Complete E-Commerce Book, Second Edition: Design, Build & Maintain a Successful Web-based Business
ISBN: B001KVZJWC
EAN: N/A
Year: 2004
Pages: 159

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net