Hardware Reference
In-Depth Information
Processor Cache
Sometimes the processor sits idle through one or more cycles because the motherboard hasn't
delivered any data to it to be processed. That happens for a variety of reasons. One of them is
that some data has to travel all the way from the memory to the processor and, even though
the motherboard's front-side bus is fast, it's not fast enough to keep up with the processor
in delivering that data. Although system memory is probably less than 50 millimeters away
from the processor, this could be 1,000 miles in terms of processor performance.
Therefore, to increase the instructions processed per second, computer manufacturers
have looked for ways to keep frequently used data closer at hand to the processor, so it
has to travel a shorter distance when it's called. That's the purpose of a cache. A cache is a
temporary storage area located very near the processor and connected to it by an extremely
high-speed pathway. It holds recently used data so the data doesn't have to be re-retrieved
from RAM every time.
Modern processors include multiple cache levels. The Level 1 (L1) cache is the
smallest, and it's on the processor die itself. In other words, it's an integrated part of the
manufacturing pattern that's used to stamp the processor pathways into the silicon chip. You
can't get any closer to the processor than that. The Level 2 (L2) cache is larger and almost
as close—it's in the processor chip, but it's not usually part of the die (see Figure 1.3). Some
processors also use a Level 3 (L3) cache. When the processor needs some data, it fi rst checks
the L1 cache and retrieves the data from there if possible. If not, the processor checks the
L2 cache and then the L3 cache. If the data is none of those places, the processor retrieves it
from RAM.
FIGURE 1.3
The L1 cache is on-die; the L2 cache is on-chip.
L1
cache
Processor
L2 cache
Processor Die
Processor Chip
The original Pentium processor had 16 KB of L1 cache. (The L2 cache was on the
motherboard, so the amount varied depending on the board.) In contrast, today's Intel
Core i7 processors can have up to 12MB of cache. (A megabyte , abbreviated MB , is
approximately one million byte s, or eight bits. A bit is a binary digit, either 0 or 1. You'll
learn more about these measurements later in the chapter.) When processor manufacturers list
cache sizes in their marketing materials, they typically list only the largest cache (that is, the
highest numbered one). On multicore systems, the largest cache is shared among all the cores.
Search WWH ::




Custom Search