CPU
Central Processing Unit
- In Turkish
- işlemci
- Pronunciation
- see-pee-YOO
In short
A CPU (central processing unit) is the processor that executes a program's instructions, doing the arithmetic, logic and control work all software runs on.
What is a CPU?
A CPU runs a simple cycle billions of times per second: fetch the next instruction from memory, decode it, execute it, for example by adding two numbers or jumping to another instruction, and store the result. Its clock speed, measured in gigahertz, is how many cycles it completes per second, but modern CPUs also run several instructions at once and predict which way a program will branch.
Today's processors contain several cores, each a complete CPU able to run its own thread, and many cores can run two threads at once with simultaneous multithreading. Small, very fast caches (L1, L2 and L3) sit between the cores and the much slower main memory, because waiting for RAM would otherwise waste most of the CPU's time.
The instructions a CPU understands are defined by its architecture. x86-64, from Intel and AMD, dominates PCs and servers; ARM dominates phones and is now common in laptops, such as Apple's M-series chips, and in cloud servers; RISC-V is an open architecture growing in embedded devices. Compiled programs must be built for the architecture they run on.
A common misconception is that a higher clock speed always means a faster computer. Performance also depends on how much work each cycle does, the number of cores, cache sizes and memory speed, and many programs can only use one core at a time, so a chip with fewer but faster cores can beat one with many slower cores.
Key takeaways
- The CPU executes program instructions: fetch, decode, execute.
- Clock speed in GHz is cycles per second, but not the whole story.
- Modern CPUs have multiple cores and small, fast caches.
- x86-64 and ARM are the main architectures; RISC-V is growing.
- Speed depends on cores, caches and work per cycle, not only GHz.
Readers ask
What is the difference between a CPU and a GPU?
A CPU has a few powerful cores designed for varied, sequential work with lots of decisions. A GPU has thousands of simpler cores designed to do the same operation on large amounts of data in parallel, such as graphics or neural network math.
What is a CPU core?
An independent processing unit inside the CPU that can run its own stream of instructions. A processor with eight cores can work on eight threads truly at the same time, or more with simultaneous multithreading.
What is the difference between x86 and ARM?
They are different instruction set architectures. x86 is used by Intel and AMD in most PCs and servers. ARM designs are licensed to many manufacturers and are known for energy efficiency, which is why they power phones and many newer laptops and servers.
Often compared
See also
- GPUOperating Systems, p. 13A GPU (graphics processing unit) is a processor whose thousands of small cores run the same calculation on lots of data at once, for graphics and AI.
- RAMOperating Systems, p. 25RAM (random access memory) is a computer's fast, temporary working memory, holding the programs and data in use; its contents are lost when power goes off.
- CPU CacheOperating Systems, p. 5A CPU cache is a small, very fast memory on the processor that keeps copies of recently used data from RAM, so the CPU spends less time waiting for memory.
- ThreadOperating Systems, p. 33A thread is the smallest unit of execution an operating system can schedule, running inside a process and sharing that process's memory with other threads.
- CPU SchedulingOperating Systems, p. 6CPU scheduling is how an operating system decides which ready process or thread runs on each CPU core next, and for how long, so the processor is shared fairly.
- Assembly LanguageProgramming Languages, p. 1Assembly language is a low-level language whose instructions map almost one-to-one onto a processor's machine code, written as short mnemonics like mov and add.
Spotted a mistake or something missing on this page?Suggest an edit