Multicore, Coherence & Thread-Level Parallelism

a multicore processor

For decades, the way to make computers faster was to make one worker run faster — crank up the clock so the single brain on the chip did more steps per second. Then that road hit a wall: a faster clock burns more power and dumps more heat than a tiny chip can shed, so around 2005 the industry stopped racing the clock. Instead of one ever-faster worker, chip makers put several complete workers side by side on the same piece of silicon. A multicore processor is a single chip carrying two, four, eight, or many more complete CPUs — called cores — each able to run its own stream of instructions at the same time.

Each core is a full processor: it has its own program counter, its own registers, its own arithmetic unit, and usually its own small private caches. The cores typically share the larger last-level cache and the path to main memory. If you have four cores and four independent pieces of work, all four can run at once, finishing roughly four times as much work per second as one core could. The operating system schedules software threads onto the cores, deciding who runs where.

Be honest about the catch. More cores does not automatically mean a faster program. A single thread of work still runs on just one core at one core's speed — the extra cores sit idle unless the work is split into pieces that can run in parallel, and splitting work correctly is hard. Amdahl's law puts a hard ceiling on how much speedup more cores can buy, the cores must coordinate over shared memory (which costs time), and many everyday programs are stubbornly serial. Multicore was not a triumph so much as a forced retreat: when we could no longer make one core much faster, we made more of them and handed the parallelism problem to programmers.

A 4-core laptop chip. Open a browser, a music player, a download, and a virus scan: the OS can place each on its own core, so all four make progress at once. But run one program that does a long single chain of dependent calculations, and it uses just one core — the other three idle, and your '4x faster' chip is no faster at all for that task.

Independent work parallelizes across cores; a single dependent chain does not — which is the whole challenge of the multicore era.

The cores share an ISA but a multicore chip is a microarchitecture choice. Doubling cores rarely doubles real-world performance: most programs have a serial part that caps the gain (Amdahl's law), and coordinating shared memory costs real time.

Also called
multi-core CPUchip multiprocessorCMP多核心 CPU