2022 CPU (Central Processing Unit) Detailed Guide Part 2
How does the CPU work?
The CPU can execute millions of instructions per second, but only one instruction at a time.
It first receives some type of input from an application/system software program (such as a web browser or operating system) or from memory, usually from an input device (such as a monitor display, keyboard, mouse, or microphone).
It is then responsible for four tasks: acquisition, decoding, execution, and storage. (This will be described in more detail in the next section.
Finally, there is some kind of output, such as printing something to the screen.
This process is called the acquire-execute cycle and occurs millions of times per second.

What are the main tasks of the CPU?
Let’s take a look at the four main tasks of the CPU.
Fetching includes getting instructions from memory, so the CPU knows how to process the input and knows the corresponding instructions for the particular input data it receives. Specifically, it looks up the address of the corresponding instruction and forwards the request to RAM (random access memory). the CPU and RAM are constantly working together in a process called “reading from memory”.
Decoding involves translating the instructions into a form that the CPU can understand, i.e. machine language.
Execution means executing the given instruction.
Storage is the result of the execution, if requested, for later retrieval. This is also called writing to memory.
Four Key CPU Terms
Clock Speed
Clock speed, expressed in gigahertz (GHz), is a rough indication of how many calculations the processor can perform per second. The higher the clock speed, the more calculations the processor can perform.
Threads
Threads are the virtual components that help deliver the workload to the CPU. The more threads you have, the faster the workload is delivered and the easier it is to organize, resulting in increased efficiency.
Threads are critical to the functionality of your computer because they determine the number of tasks your computer can perform at any given time.
The number of threads you have depends on the number of cores in the CPU. Each core may have two threads, depending on the particular processor and whether hyperthreading is supported. For example, a dual-core processor may have four threads, while a processor with four cores may have eight threads.
Hyper-Threading
Many modern CPUs support a technology called hyperthreading.
Hyperthreading works by making a single physical core appear as multiple physical cores, allowing the operating system (OS) to take advantage of concurrent instruction processing and increase computing power.
Cores
Think of a human body: if the threads are the hands, the core is the mouth.
The kernel is a separate physical device in the main CPU chip that acts as an independent processor, fetching data from threads and performing computational tasks. Software applications can be written so that multiple cores can process program data simultaneously, often referred to as multi-threading.
The speed at which a CPU can process data is affected by the number of available cores; the more cores a CPU has, the more computing power it has. Therefore, more tasks can be run and completed at the same time.
For example, a dual-core CPU has two cores, which means that there are essentially two CPUs on the same chip that can run two instructions at the same time. An octa-core processor will be able to run 8 instructions at the same time.
Most modern server class CPUs have at least 8 cores, with some configurations supporting more than 30 cores per processor. Motherboards can contain multiple processors connected together via UPI or Intel® Hyperpath Interconnect.
评论
发表评论