CPU¶
The Central Processing Unit is responsible for the bulk of the operations your computer performs - often being referred to as the 'brains of the computer'.
Components¶
For a CPU to be a CPU, there are a few key components of which it requires to function.
ALU¶
The Arithmetic Logic Unit performs arithmetic and bitwise operations on (integer) binary numbers. The ALU is also uses within GPUs and FPUs.
For non-integer numbers, an FPU (Floating-Point Unit) would be required.
CU¶
The Control Unit is the central part of the CPU, essentially acting as the director - dictating how things should go, telling all of the other components what to do.
Cache¶
The cache is well a cache, designed to prevent the speed of the RAM being a bottleneck to the speed of the CPU. It essentially acts as an intermediary between the RAM and the CPU. Commonly used resources will end up in cache, to avoid constant lengthy retrievals from slower RAM.
Characteristics¶
There are a number of characteristics that CPUs have that can affect their performance, these include:
- Clock Speed
- Core Count
- Cache Size
Some of these characteristics will be more important to fewer than others - depending on the intended use of the machine.
Clock Speed¶
CPUs have their own clocks, only unlike your typically clock they tick many more times per second. The clock speed is measured in a degree of Hertz, most modern chips will be measured in Gigahertz (GHz). How fast the CPU's clock is dictates how fast it can perform an instruction.
- Hertz is once (\(10^0\)) per second
- Kilohertz is 1 thousand (\(10^3\)) times per second
- Megahertz is 1 million (\(10^6\)) times per second
- Gigahertz is 1 billion (\(10^9\)) times per second
Core Count¶
Multi-core processors are effectively multiple CPUs bundled into typically one chip. The count of cores they contain is referred to as the core count and is effectively the count of CPUs in the chip.
If the processor has a clock speed of 4 GHz, then a dual-core machines would be able to perform 8 billion instructions per second (effectively making it an 8 GHz machine). it is worth mentioning however, that not all software is designed in such a way to make use of multiple cores.
Cache Size¶
While to a human RAM may seem fast - it is a huge bottleneck to the CPU. To counteract this, the CPU will have a small amount (we're talking mibibytes worth) of cache that will allow it to store commonly accessed data much more quickly.
There are many levels of cache, each with less speed than the previous but greater capacity:
- L1 Cache (often split into L1i (instructions) and L1d (data) in modern chips) There is typically only one L1 Cache on a multi-core chip.
- L2 Cache (not typically split) There is a dedicated L2 Cache for each core.
- L3 Cache (not split) Shared between the cores.
Except as otherwise noted, the content of this page is licenced under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Mozilla Public License 2.0.