Current location - Loan Platform Complete Network - Big data management - How does a cpu work?
How does a cpu work?
Central Processing Unit intel and AMD mainstream CPUs and CPU slots,

[edit]Introduction

CPU is an abbreviation for Central Process Unit (Central Processing Unit), which can be shortened to microprocessor. (Microprocessor), although it is often referred to directly as a processor (processor). Do not ignore its role because of these abbreviations, the CPU is the core of the computer, its importance is like the heart for people. In fact, the role of the processor is more similar to the brain, because it is responsible for processing and computing all the data inside the computer, while the motherboard chipset is more like the heart, which controls the exchange of data. the type of CPU determines the operating system you use and the corresponding software. the CPU is mainly composed of operators, controllers, registers and internal buses, etc., is the core of the PC, and then matched with the storage, input/output interfaces and system buses to form the core of the PC, and the storage, input/output interfaces and system buses. The CPU is the core of the PC, together with the memory, input/output interfaces, and system buses that make up the complete PC.

The basic structure, functions, and parameters of the CPUThe CPU is mainly composed of an operator, a controller, a group of registers, and an internal bus. The registers are used to store the operands and intermediate data after the instructions are executed, and the operator completes the operations and operations specified in the instructions.

The main performance indicators of CPU are:

1. Main Frequency

Main Frequency is also called Clock Frequency, the unit is MHz, which is used to indicate the CPU's computing speed.CPU's Main Frequency = External Frequency × Multiplier Factor. Many people believe that the main frequency determines the operating speed of the CPU, which is not only a one-sided, but also for the server, this understanding also appeared to be biased. So far, there is no definitive formula to achieve a numerical relationship between the main frequency and the actual computing speed, even the two major processor manufacturers Intel and AMD, there is a great deal of controversy on this point, we can see from the development trend of Intel's products, Intel is very much focused on strengthening its own development of the main frequency. Like other processor manufacturers, someone once took a piece of 1G Allmax to make a comparison, it is equivalent to the running efficiency of the 2G Intel processor.

So, the CPU's main frequency is not directly related to the actual computing power of the CPU, and the main frequency indicates the speed of the digital pulse signal oscillation within the CPU. In Intel's processor offerings, we can also see examples where a 1 GHz Itanium chip can perform almost as fast as a 2.66 GHz Xeon/Opteron, or where a 1.5 GHz Itanium 2 is about as fast as a 4 GHz Xeon/Opteron. performance metrics of the CPU's pipeline.

Of course, there is a correlation between CPU frequency and actual compute speed, which means that CPU frequency is only one aspect of CPU performance, not the overall performance of the CPU.

2. The external frequency is the base frequency of the CPU, and the unit is also MHz. The external frequency of the CPU determines the speed of the whole motherboard. To be clear, in desktop computers, what we call overclocking is overclocking the CPU's external frequency (of course, in general, the CPU's multiplier is locked), and I believe that this is very well understood. But for the server CPU, overclocking is absolutely not allowed. As mentioned earlier, the CPU determines the operating speed of the motherboard, and the two are running in sync. If the server CPU is overclocked and the external frequency is changed, it will produce asynchronous operation, (many desktop motherboards support asynchronous operation), which will result in the instability of the entire server system.

The vast majority of current computer systems in the external frequency is also the speed of synchronous operation between the memory and the motherboard, in this way, can be understood as the external frequency of the CPU directly connected to the memory to achieve synchronous operation between the two states. External frequency and front-side bus (FSB) frequency is easily confused, the following front-side bus introduction we talk about the difference between the two.

3. Front Side Bus (FSB) Frequency Front Side Bus (FSB) frequency (i.e., bus frequency) is a direct impact on the CPU and memory direct data exchange speed. There is a formula can be calculated, that is, the data bandwidth = (bus frequency × data bit width) / 8, the maximum bandwidth of data transmission depends on the width of all simultaneous transmission of data and transmission frequency. Let's say that the current Xeon Nocona with 64-bit support has a front-end bus of 800MHz, and according to the formula, its maximum bandwidth for data transfer is 6.4GB/sec.

The difference between the external frequency and the frequency of the front-side bus (FSB): the speed of the front-side bus refers to the speed of data transmission, and the external frequency is the speed of synchronous operation between the CPU and the motherboard. In other words, a 100MHz external frequency refers to the digital pulse signal oscillating 100 million times per second; while a 100MHz front-side bus refers to the amount of data transfer that the CPU can accept per second, which is 100MHz x 64bit ÷ 8bit/Byte = 800MB/s.

In fact, now that the "HyperTransport" architecture has been implemented, it is more likely that the CPU will not be able to transfer the data from the motherboard to the motherboard, but will be able to do so.

In fact, now with the advent of the "HyperTransport" architecture, this actual front-side bus (FSB) frequency has changed. Before we know that IA-32 architecture must have three important building blocks: Memory Controller Hub (MCH), I/O Controller Hub and PCI Hub, like Intel's very typical chipset Intel 7501, Intel 7505 chipset, tailored for the dual Xeon processors, they contain the MCH for the CPU to provide the frequency of 533MHz The MCH included in these chipsets provides the CPU with a 533MHz front-side bus, and with DDR memory, the front-side bus bandwidth can reach up to 4.3GB/second. However, the increasing performance of the processor also brings many problems to the system architecture. The "HyperTransport" architecture not only solves the problem, but also improves the bus bandwidth more effectively, such as the AMD Opteron processor, flexible HyperTransport I/O bus architecture allows it to integrate the memory controller, so that the processor does not pass through the system bus to the chipset, but directly with the memory controller. The flexible HyperTransport I/O architecture of the AMD Opteron processor allows it to integrate a memory controller, allowing the processor to exchange data directly with the memory instead of passing it through the system bus to the chipset. In this case, the Front Side Bus (FSB) frequency on AMD Opteron processors is nowhere to be found.

4, CPU bit and word length

Bit: In digital circuits and computer technology using binary, the code is only "0" and "1", which is either "0" or "1". "0" or "1" in the CPU is a "bit".

Word length: The number of bits of a binary number that the CPU can process at one time in a unit of time (at the same time) is called the word length in computer technology. So a CPU that can handle 8-bit word length data is usually called an 8-bit CPU, and similarly a 32-bit CPU can handle 32-bit binary data in a unit of time. Difference between byte and word length: Since common English characters can be expressed in 8-bit binary, 8-bit is usually called a byte. The length of the word length is not fixed, for different CPUs, the length of the word length is not the same. 8-bit CPUs can only handle one byte at a time, while 32-bit CPUs can handle 4 bytes at a time, and the same word length of 64-bit CPUs can handle 8 bytes at a time.

5. Multiplier factor

The multiplier factor refers to the relative proportion between the main CPU frequency and the external frequency. At the same external frequency, the higher the multiplier, the higher the frequency of the CPU. However, in reality, the higher the multiplier, the less significant the CPU itself is, given the same external frequency. This is because the data transfer speed between the CPU and the system is limited, the pursuit of high multiplier and get a high frequency CPU will appear obvious "bottleneck" effect - the CPU from the system to get the data limit speed can not meet the speed of the CPU computing. In general, except for the engineering sample version of Intel's CPU is locked multiplier, and AMD did not lock before, and now AMD launched a black box version of the CPU (i.e., do not lock the multiplier version, the user is free to adjust the multiplier, adjust the multiplier overclocking way than adjusting the external frequency of the much more stable.)

6. Cache

Cache size is also one of the most important indicators of a CPU, and the structure and size of the cache has a very large impact on CPU speed. The cache within the CPU operates at a very high frequency, and generally operates at the same frequency as the processor, with a much higher efficiency than the system memory and hard disk. In practice, the CPU often needs to repeatedly read the same block of data, and the increase in cache capacity can significantly improve the CPU internal read data hit rate, without having to go to memory or hard disk to find, in order to improve system performance. However, due to CPU chip size and cost considerations, caches are very small.

L1 Cache is the first level of CPU cache, divided into data cache and instruction cache. The capacity and structure of the built-in L1 cache have a greater impact on CPU performance, but the cache memory is composed of static RAM, the structure is more complex, in the case of the CPU core area can not be too large, the capacity of the L1 level cache can not be made too large. The general server CPU L1 cache capacity is usually 32-256KB.

L2 Cache (L2 cache) is the CPU's second layer of cache, divided into internal and external two chips. The internal chip L2 cache runs at the same speed as the main frequency, while the external L2 cache is only half of the main frequency.The L2 cache capacity also affects the performance of the CPU, and the principle is that the bigger the better, the largest capacity of the CPU for home use was 512KB, and now the laptop can also reach 2M, while the L2 cache of the CPU for servers and workstations is even higher, and can reach more than 8M.

L3 cache is the most powerful cache in the world.

L3 Cache (L3 cache), divided into two kinds, the early is external, now are built-in. The actual role of the L3 cache is to further reduce memory latency and improve processor performance for large data-volume calculations. Reducing memory latency and increasing the ability to compute large amounts of data are both very helpful for gaming. And in the server space adding L3 cache still provides a significant performance boost. For example, a configuration with a larger L3 cache utilizes physical memory more efficiently, so its slower disk I/O subsystem can handle more data requests. Processors with larger L3 caches offer more efficient file system caching behavior and shorter message and processor queue lengths.

In fact, the earliest L3 cache was used in AMD's K6-III processors, where the L3 cache was limited by the manufacturing process and was not integrated into the chip, but rather on the motherboard. At that time, the L3 cache was not integrated into the chip due to the manufacturing process, but was integrated into the motherboard. The L3 cache, which was only able to synchronize with the system bus frequency, was not much different from the main memory. L3 cache was later used in Intel's Itanium processors for the server market. Intel also intended to introduce a 9MB L3 cache Itanium2 processor, and later a 24MB L3 cache dual-core Itanium2 processor.

But basically, the L3 cache isn't that important to the performance of the processor. For example, a Xeon MP processor with 1MB of L3 cache is still no match for an Opteron, which shows that an increase in the front-side bus is much more effective than an increase in the cache to bring about a higher level of performance.

7. CPU Extended Instruction Set

CPUs rely on instructions to compute and control the system, and each CPU is designed with a series of instructions to match its hardware circuitry. The strength of the instructions is also an important indicator of the CPU, and the instruction set is one of the most effective tools for improving the efficiency of microprocessors. From the mainstream architecture at this stage, the instruction set can be divided into two parts: complex instruction set and streamlined instruction set, and from the specific use, such as Intel's MMX (Multi Media Extended), SSE, SSE2 (Streaming-Single instruction multiple data- Extensions 2), SEE3 and AMD's 3DNow! are all CPU extension instruction sets, which enhance the CPU's multimedia, graphics and Internet processing capabilities. We usually refer to the CPU extended instruction set as the "instruction set of the CPU". SSE3 is also the smallest instruction set at present, after MMX contains 57 commands, SSE contains 50 commands, SSE2 contains 144 commands, and SSE3 contains 13 commands. SSE3 is also the most advanced instruction set, with Intel Prescott processors already supporting SSE3, AMD adding support for SSE3 in future dual-core processors, and Ameda processors supporting this instruction set.

8. CPU core and I/O voltage

Starting from the 586 CPU, the CPU operating voltage is divided into two kinds of core voltage and I/O voltage, and usually the CPU core voltage is less than or equal to the I/O voltage. The size of the kernel voltage is based on the CPU's production process, generally the smaller the production process, the lower the kernel operating voltage; I/O voltage is generally in the range of 1.6~5 V. Low voltage can solve the problem of excessive power consumption and high heat.