Role of cache cache
Most of the CPUs now have a cache - Cache, some even integrate multi-pole cache; and when we choose motherboards, the number of Cache on the board is also an important consideration. Early 486 integrates 4 ~ 8k-level Cache, and the current Pentium II to strong processor not only integrates 32K-level Cache, but also integrates 512K ~ 2M secondary cache full speed Cache. So what is Cache's role in the system? Why integrate more and more cache?
High-speed DRAM (Dynamic RAM) chip is now used as the main memory in the computer system. The early CPU speed is relatively slow, and the CPU is in a wait state during the data exchange between the CPU and the memory. With early 8MHz 286 as an example, the clock cycle is 125ns, while the access time of DRAM is generally 60 ~ 100 ns. Therefore, the CPU is not waiting for the main memory switching data, which is called zero waiting state. Therefore, the CPU is directly dealing with the memory that does not affect speed at all. However, in recent years, the CPU's clock frequency has far exceeded the progress of DRAM read and write speed. In just a few years, the CPU clock cycle accelerates several NS from 100ns, while DRAM has experienced fpm, edo, SDRAM several development phases, and the speed is only increased from dozens of NS to around 10NS, between DRAM and CPUs. The speed difference allows the CPU to insert a waiting cycle in the memory read and write bus cycle; because the CPU is frequently exchanged with the data, this greatly affects the performance of the entire system. This makes the memory of the memory have become the bottleneck of the entire system. Of course, another solution is to match high-speed static RAM (SRAM) as the main memory and CPU, the problem is complex, not only larger, but also expensive. Therefore, in addition to vigorously accelerating the access speed of DRAM, the best solution currently solving this problem is to adopt Cache technology. Cache is a cache, which is a small speed fast memory between the CPU and DRAM main memory, usually consists of SRAM. The working principle of Cache is to save the most common data of the CPU; when the CACHE holds the data to be read, the CPU directly accesses Cache. Since the speed of Cache is equivalent to the CPU, the CPU can quickly implement data access in a zero-waiting state. The CPU is only available when the data required for the CPU is not included in the cache. Cache eliminates and updates data in accordance with the protocol in the CPU, you can view cache as a buffer adapter between the main memory and the CPU, which can efficiently complete the speed match between the DRAM memory and the CPU by means of cache.
386 previous chips generally have cache, for later 486 and Pentium-level or even higher chips, the Cache has been integrated into the interior of the chip, called the on-chip Cache. The in-chip Cache has a relatively small, which can store the most common instructions and data of the CPU. Don't look at the capacity, the in-chip Cache is flexible and convenient, and it has considerable improvement in system efficiency. You can try to check your CPU's internal cache in the BIOS, you can find that this may make your system performance fell half even more.
However, the in-chip Cache capacity is limited, integrated with a large number of SRAMs in the CPU will greatly reduce the yet rate of the CPU, increase the cost of the CPU. In this case, the measures taken are Cache and DRAM in the CPU chip, called the secondary Cache (SECONDARY CACHE). The outer secondary Cache is actually true buffering between the CPU and the main memory. Since the response time of the motherboard DRAM is much lower than the speed of the CPU, if there is no secondary Cache, it is impossible to reach the ideal speed of the CPU. The capacity of the secondary Cache is usually more than one order level in the tablet Cache. The outer cache on the motherboard works in the outer frequency of the CPU, and is several times average to the CPU's frequency speed. In order to further improve system performance, a true secondary Cache can be added between Cache and motherboard Cache in the CPU tablet. This is the secondary Cache in the tablets. It usually works half-speed or full speed in CPU, with a total capacity of 128K to 512K, while the new to strong processor reaches 2m or more. Full-speed secondary Cache can greatly accelerate the running speed of large intensive procedures, with the Pentium II of Cache with the same speed, and the Pentium Pro series processor is the preferred CPU for large servers. However, the integrated high-density secondary cache also increases the cost of the CPU; so the processor of this class is an expensive product; while the processor performance of the second-level Cache has a little decline, but the price can be reduced a lot of. The classroom processor on the market is a good example. When using this CPU with secondary Cache, the motherboard Cache has become a actual three-stage Cache.
Today's high-end machines, cache is an important part of the system, understanding some of the basic principles of Cache, which is extremely important to system optimization and configuration for us.