Processors & L1/L2 cache ::::

househead

Senior member
Oct 7, 2001
236
0
0
Is there a specific purpose of the L1 and L2 cache?

Advantages of being on the processor, and off-the-chip?

PIII, P4, Athlon, Celeron - do they all have integrated L1/L2? and what are they're sizes (L1/L2)?


thanks ;-)
 

AndyHui

Administrator Emeritus<br>Elite Member<br>AT FAQ M
Oct 9, 1999
13,141
17
81
The L1 and L2 caches are areas of very fast memory located close to the processor. They store the most frequently used data and instructions for fast access by the CPU. Accessing the caches is MUCH faster than accessing RAM.

Having the cache on-board means that it is closer to the processor, clocked at a higher speed and allows faster access. It also costs less to have it onboard as opposed to discrete chips, as in the case of the Pentium II and Katmai Pentium III.

All current processors have L1 and L2 cache onboard.

For the Intel Pentium 4 (Willamette), the L1 cache is 8KB, 256KB for the L2 cache. This does not include an execution trace cache of approximately 96KB (which is really another form of L1 cache, so don't let the 8KB fool you).

For the Coppermine Pentium III, the L1 cache is 32KB and 256KB for the L2 cache.
For the Coppermine Celeron, the L1 cache is 32KB and 128KB for the L2 cache.

For the AMD Athlon, the L1 cache is 128KB and 256KB for the L2 cache.
For the AMD Duron, the L1 cache is 128KB and 64KB for the L2 cache.

Performance is more than just sizes though; there is the bus width (it's 64-bits wide on the AMD processors and 256-bits wide on the Intel processors), Inclusive vs Exclusive cache, and set associativity.

For an indepth look at caching, check out the article The Fundamentals of Cache.

Hhmm...perhaps this article is more appropriate since it is less advanced.
 

MadRat

Lifer
Oct 14, 1999
11,967
280
126
Think of your digestive tract and how it breaks down food. The L1 cache is like your mouth, the lowest form of food (glucose) can be absorbed through the walls of the mouth and throat as it approaches the stomach. More complex food moves on to the next step of digestion. The more complex the further it moves down the digestive tract. The body reorders the food into the form it needs, storing it as either sugars, fats, proteins, etc. This is like how the caches take anywhere from specific bytes (no pun intended), to specific chunks (words), to general chunks (lines) of data and re-orders them however it deems necessary.

The L1, L2, and L3 caches seem to be much more complex than simple "data indexes" or "fast memory". In the simplest sense they can be viewed upon as high speed memory. In the most complex form they'd require tomes to explain. You might want to venture over to the "Highly Technical Forum" and ask for links about caches. I'm no expert on the caches, but some of the EE's around here sent me alot of links. Its pretty interesting material.