# Cores and threads

> Why a CPU is really several processors, and why it can juggle even more tasks.

- Level: Intermediate
- Topics: Hardware
- URL: https://tidbit.legios.com.ar/cpu-cores-and-threads/
- In Spanish: [Núcleos e hilos](https://tidbit.legios.com.ar/es/cpu-cores-and-threads/)

A **core** is a complete processor: it can fetch instructions and execute them on its own. For decades a CPU had one. Since the mid-2000s, chipmakers have put several cores on the same chip instead of making a single core ever faster, so a laptop processor might have 8 or more and a server processor many dozens. Each core can run a different program, or a different piece of the same program, at the same time.

A **thread** is a sequence of instructions waiting to be run. Software creates threads, the operating system hands them to cores, and switches between them so quickly that dozens of apps seem to run at once. Many CPUs also offer **simultaneous multithreading** (Intel calls it **Hyper-Threading**): each core presents itself as two, so it can work on a second thread while the first is waiting for data. That is where specs like "8 cores, 16 threads" come from. The two threads share one core's machinery, so it is a useful boost, not double the speed.

More cores help only when the work can be split. Rendering video, compiling code or running many users' requests on a server split well, and get much faster with more cores. A single long chain of steps, where each step needs the previous result, cannot be split, and runs at the speed of one core. That is why both the number of cores and the speed of each one matter.

## An analogy

Cores are cooks in a kitchen; threads are the orders on the rail. Hyper-Threading is a cook who keeps two pans going, stirring one while the other heats. Ten cooks will not make one soufflé rise faster.

## Keep in mind

- A core is an independent processor; modern CPUs have several to many.
- A thread is a stream of instructions the operating system assigns to a core.
- Simultaneous multithreading lets one core handle two threads, sharing its parts.
- More cores speed up work that can be split, not single-chain tasks.

## Go deeper

- [Multi-core processor on Wikipedia](https://en.wikipedia.org/wiki/Multi-core_processor)
- [Simultaneous multithreading on Wikipedia](https://en.wikipedia.org/wiki/Simultaneous_multithreading)
- [Thread (computing) on Wikipedia](https://en.wikipedia.org/wiki/Thread_(computing))

## Related terms

- [CPU](https://tidbit.legios.com.ar/cpu/): The chip that runs your programs, one instruction after another, very fast.
- [Chip](https://tidbit.legios.com.ar/semiconductor-chip/): A sliver of silicon carrying billions of tiny switches that compute and remember.
- [Server](https://tidbit.legios.com.ar/server/): A computer whose job is to answer requests from other computers, all day, every day.
- [Operating system](https://tidbit.legios.com.ar/operating-system/): The base software that runs a device and lets every app share its hardware.
- [Intel](https://tidbit.legios.com.ar/intel/): The American company behind most PC and server processors for decades.
