Hardware Reference
In-Depth Information
Internal Level 1 Cache
All modern processors starting with the 486 family include an integrated L1 cache and
controller. The integrated L1 cache size varies from processor to processor, starting at
8KB for the original 486DX and now up to 128KB or more in the latest processors.
Note
Multi-core processors include separate L1 caches for each processor core. Also, L1 cache is
divided into equal amounts for instructions and data.
Tounderstandtheimportanceofcache,youneedtoknowtherelativespeedsofprocessors
and memory. The problem with this is that processor speed usually is expressed in MHz
or GHz (millions or billions of cycles per second), whereas memory speeds are often ex-
pressed in nanoseconds (billionths of a second per cycle). Most newer types of memory
express the speed in either MHz or in megabyte per second (MBps) bandwidth (through-
put).
Both are really time- or frequency-based measurements, and a chart comparing them can
be found in Table 6.3 in Chapter 6 . In this table, you will note that a 233MHz processor
equates to 4.3-nanosecond cycling, which means you would need 4ns memory to keep
pace with a 200MHz CPU. Also, note that the motherboard of a 233MHz system typic-
ally runs at 66MHz, which corresponds to a speed of 15ns per cycle and requires 15ns
memory to keep pace. Finally, note that 60ns main memory (common on many Pentium-
class systems) equates to a clock speed of approximately 16MHz. So, a typical Pentium
233 system has a processor running at 233MHz (4.3ns per cycle), a motherboard running
at 66MHz (15ns per cycle), and main memory running at 16MHz (60ns per cycle). This
might seem like a rather dated example, but in a moment, you will see that the figures lis-
ted here make it easy for me to explain how cache memory works.
BecauseL1cacheisalwaysbuiltintotheprocessordie,itrunsatthefull-corespeedofthe
processor internally. By full-core speed, I mean this cache runs at the higher clock mul-
tiplied internal processor speed rather than the external motherboard speed. This cache
basically is an area of fast memory built into the processor that holds some of the current
working set of code and data. Cache memory can be accessed with no wait states because
it is running at the same speed as the processor core.
Using cache memory reduces a traditional system bottleneck because system RAM is al-
mostalwaysmuchslowerthantheCPU;theperformancedifferencebetweenmemoryand
CPU speed has become especially large in recent systems. Using cache memory prevents
theprocessorfromhavingtowaitforcodeanddatafrommuchslowermainmemory,thus
Search WWH ::




Custom Search