Thread: hardware notes class 12th
- Join Date
- Feb 2010
- Rep Power
hardware notes class 12th
Chapter 11. The L2 cache
The level 2 cache is normally much bigger (and unified), such as 256, 512 or 1024 KB. The purpose of the L2 cache is to constantly read in slightly larger quantities of data from RAM, so that these are available to the L1 cache.
In the earlier processor generations, the L2 cache was placed outside the chip: either on the motherboard (as in the original Pentium processors), or on a special module together with the CPU (as in the first Pentium IIÃ¢â‚¬â„¢s).
Fig. 71. An old Pentium II module. The CPU is mounted on a rectangular printed circuit board, together with the L2 cache, which is two chips here. The whole module is installed in a socket on the motherboard. But this design is no longer used. As process technology has developed, it has become possible to make room for the L2 cache inside the actual processor chip. Thus the L2 cache has been integrated and that makes it function much better in relation to the L1 cache and the processor core.
The L2 cache is not as fast as the L1 cache, but it is still much faster than normal RAM.
Pentium, K5, K6
External, on the motherboard
Internal, in the CPU
Pentium II, Athlon
External, in a module
close to the CPU
Celeron (1st generation)
Celeron (later gen.),
Pentium III, Athlon XP,
Duron, Pentium 4
Internal, in the CPU
Fig. 72. It has only been during the last few CPU generations that the level 2 cache has found its place, integrated into the actual CPU.
Traditionally the L2 cache is connected to the front side bus. Through it, it connects to the chipsetÃ¢â‚¬â„¢s north bridge and RAM:
Attachment 371Fig. 73. The way the processor uses the L1 and L2 cache has crucial significance for its utilisation of the high clock frequencies. The level 2 cache takes up a lot of the chipÃ¢â‚¬â„¢s die, as millions of transistors are needed to make a large cache. The integrated cache is made using SRAM (static RAM), as opposed to normal RAM which is dynamic (DRAM).
While DRAM can be made using one transistor per bit (plus a capacitor), it costs 6 transistors (or more) to make one bit of SRAM. Thus 256 KB of L2 cache would require more than 12 million transistors. Thus it has only been since fine process technology (such as 0.13 and 0.09 microns) was developed that it became feasible to integrate a large L2 cache into the actual CPU. In Fig. 66 on page 27, the number of transistors includes the CPUÃ¢â‚¬â„¢s integrated cache.
The bus between the L1 and L2 cache is presumably THE place in the processor architecture which has the greatest need for high bandwidth. We can calculate the theoretical maximum bandwidth by multiplying the bus width by the clock frequency. Here are some examples:
frequencyIntel Pentium IIITheoretical bandwidth
64 bits1400 MHzAMD11.2 GB/sek.
64 bits2167 MHzAMD Athlon 6417.3 GB/sek.
64 bits2200 MHzAMD Athlon 64 FX17,6 GB/sek.
128 bits2200 MHzIntel Pentium 435,2 GB/sek.
256 bits3200 MHz102 GB/sek.
Fig. 74. Theoretical calculations of the bandwidth between the L1 and L2 cache.
There are a number of different ways of using caches. Both Intel and AMD have saved on L2 cache in some series, in order to make cheaper products. But there is no doubt, that the better the cache Ã¢â‚¬â€œ both L1 and L2 Ã¢â‚¬â€œ the more efficient the CPU will be and the higher its performance.
AMD have settled on a fairly large L1 cache of 128 KB, while Intel continue to use relatively small (but efficient) L1 caches.
On the other hand, Intel uses a 256 bit wide bus on the Ã¢â‚¬Å“inside edgeÃ¢â‚¬Â of the L2 cache in the Pentium 4, while AMD only has a 64-bit bus (see Fig. 74).
Fig. 75. Competing CPUÃ¢â‚¬â„¢s with very different designs. AMD uses exclusive caches in all their CPUÃ¢â‚¬â„¢s. That means that the same data canÃ¢â‚¬â„¢t be present in both caches at the same time, and that is a clear advantage. ItÃ¢â‚¬â„¢s not like that at Intel.
However, the Pentium 4 has a more advanced cache design with Execution Trace Cache making up 12 KB of the 20 KB Level 1 cache. This instruction cache works with coded instructions, as described on page 35.
L1 cacheAthlon XPL2 cache
128 KBAthlon XP+256 KB
128 KBPentium 4 (I)512 KB
20 KBPentium 4 (II, Ã¢â‚¬Å“NorthwoodÃ¢â‚¬Â)256 KB
20 KBAthlon 64512 KB
128 KBAthlon 64 FX512 KB
128 KBPentium 4 (III, Ã¢â‚¬Å“PrescottÃ¢â‚¬Â)1024 KB
28 KB1024 KB
Fig. 76. The most common processors and their caches.
A very important aspect of all RAM Ã¢â‚¬â€œ cache included Ã¢â‚¬â€œ is latency. All RAM storage has a certain latency, which means that a certain number of clock ticks (cycles) must pass between, for example, two reads. L1 cache has less latency than L2; which is why it is so efficient.
When the cache is bypassed to read directly from RAM, the latency is many times greater. In Fig. 77 the number of wasted clock ticks are shown for various CPUÃ¢â‚¬â„¢s. Note that when the processor core has to fetch data from the actual RAM (when both L1 and L2 have failed), it costs around 150 clock ticks. This situation is called stalling and needs to be avoided.
Note that the Pentium 4 has a much smaller L1 cache than the Athlon XP, but it is significantly faster. It simply takes fewer clock ticks (cycles) to fetch data:
Pentium IIAthlonL1 cache:Pentium 4
3 cycles3 cyclesL2 cache:2 cycles
18 cycles6 cycles5 cycles
Fig. 77. Latency leads to wasted clock ticks; the fewer there are of these, the faster the processor will appear to be.
Intelligent Ã¢â‚¬Âdata prefetchÃ¢â‚¬Â
In CPUÃ¢â‚¬â„¢s like the Pentium 4 and Athlon XP, a handful of support mechanisms are also used which work in parallel with the cache. These include:
A hardware auto data prefetch unit, which attempts to guess which data should be read into the cache. This device monitors the instructions being processed and predicts what data the next job will need.
Related to this is the Translation Look-aside Buffer, which is also a kind of cache. It contains information which constantly supports the supply of data to the L1 cache, and this buffer is also being optimised in new processor designs. Both systems contribute to improved exploitation of the limited bandwidth in the memory system.
Attachment 375Fig. 78. The WCPUID program reports on cache in an Athlon processor. Conclusion
L1 and L2 cache are important components in modern processor design. The cache is crucial for the utilisation of the high clock frequencies which modern process technology allows. Modern L1 caches are extremely effective. In about 96-98% of cases, the processor can find the data and instructions it needs in the cache. In the future, we can expect to keep seeing CPUÃ¢â‚¬â„¢s with larger L2 caches and more advanced memory management. As this is the way forward if we want to achieve more effective utilisation of the CPUÃ¢â‚¬â„¢s clock ticks. Here is a concrete example:
In January 2002 Intel released a new version of their top processor, the Pentium 4 (with the codename, Ã¢â‚¬Å“NorthwoodÃ¢â‚¬Â). The clock frequency had been increased by 10%, so one might expect a 10% improvement in performance. But because the integrated L2 cache was also doubled from 256 to 512 KB, the gain was found to be all of 30%.
L2 cacheClock freq.Intel Pentium 4Improvement
256 KBIntel Pentium 42000 MHz
512 KB2200 MHz+30%
Fig. 79. Because of the larger L2 cache, performance increased significantly.
In 2002 AMD updated the Athlon processor with the new Ã¢â‚¬ÂBartonÃ¢â‚¬Â core. Here the L2 cache was also doubled from 256 to 512 KB in some models. In 2004 Intel came with the Ã¢â‚¬Å“PrescottÃ¢â‚¬Â core with 1024 KB L2 cache, which is the same size as in AMDÃ¢â‚¬â„¢s Athlon 64 processors. Some Extreme Editions of Pentium 4 even uses 2 MB of L2 cache.
Xeon for servers
Intel produces special server models of their Pentium III and Pentium 4 processors. These are called Xeon, and are characterised by very large L2 caches. In an Intel Xeon the 2 MB L2 cache uses 149,000,000 transistors.
Xeon processors are incredibly expensive (about Euro 4,000 for the top models), so they have never achieved widespread distribution.
They are used in high-end servers, in which the CPU only accounts for a small part of the total price.
Otherwise, IntelÃ¢â‚¬â„¢s 64 bit server CPU, the Itanium. The processor is supplied in modules which include 4 MB L3 cache of 300 million transistors.
Several Xeon processors can be installed on the same motherboard, using special chipsets. By connecting 2, 4 or even 8 processors together, you can build a very powerful computer.
These MP (Multiprocessor) machines are typically used as servers, but can also be used as powerful workstations, for example, to perform demanding 3D graphics and animation tasks. AMD has the Opteron processors, which are server-versions of the Athlon 64. Not all software can make use of the PCÃ¢â‚¬â„¢s extra processors; the programs have to be designed to do so. For example, there are professional versions of Windows NT, 2000 and XP, which support the use of several processors in one PC.
See also the discussion of Hyper Threading, which allows a Pentium 4 processor to appear as an MP system. Both Intel and AMD also works on dual-core processors.
Last edited by $$$lover; 02-26-2010 at 12:36 PM.Laie_2
Nice sharing good work
Good Keep it up
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By $$$lover in forum Computer HardwareReplies: 0Last Post: 03-02-2010, 08:43 AM
By $$$lover in forum Computer HardwareReplies: 1Last Post: 03-01-2010, 10:45 PM
By $$$lover in forum Computer HardwareReplies: 1Last Post: 03-01-2010, 10:44 PM
By $$$lover in forum Computer HardwareReplies: 1Last Post: 03-01-2010, 10:43 PM