From Atoms to Data Centers: How a Modern Processor Finds Parallelism in a Serial Program

Jim Keller walks through the layers of abstraction in computer design, from transistors to out-of-order execution, branch prediction and deterministic answers.

JKJim KellerInvité
Chaîne
Lex Fridman Podcast
Vidéo
17:19
Lecture
5 min
Original
anglais
Ouvrir sur YouTube
En faisant défiler, la vidéo se réduit en bas à droite et continue. Les sous-titres suivent votre langue de lecture.
Langue de lectureDisponible en 1 langues
Cet article n’est pas encore disponible en français ; il s’affiche dans l’original en anglais.
RÉSUMÉ

En 30 secondes

Jim Keller explains computing as a stack of stable abstraction layers, then dives into how modern CPUs fetch hundreds of instructions, build dependency graphs and predict branches with near-neural-network sophistication. He closes on a puzzle: why programmers insist on deterministic answers when both the hardware's execution and the data it processes are so noisy.

  1. 1Computing is built on abstraction layers running from the atom to the data center: materials, transistors, logic gates, functional units, processing elements, instruction sets, and then software languages.
  2. 2About 90% of execution time is spent on roughly 25 instructions, which is why instruction sets like x86 and Arm stay stable for decades.
  3. 3Found parallelism versus given parallelismis the core difference between CPUs and GPUs: a CPU discovers pockets of parallelism in a serial narrative, while a GPU is simply told that a million pixels are independent.
  4. 4Branch prediction went from remembering the last outcome (about 85%) to counters (92%) to history-based, neural-network-like predictors. Getting to 99% accuracy cost three or four orders of magnitude more bits.
  5. 5Design is 99% perspiration and 1% inspiration: good teams mix people who make intuitive leaps with people who are excellent at evaluating alternatives.
  6. 6A program can give the same answer every run even though its execution flow never repeats, and Keller wonders why determinism is so demanded when modern AI inputs are already noisy.
TRANSCRIPTION

Lire la transcription complète par chapitre

01

Computers are a stack of abstraction layers, and the instruction set is the stable middle

Keller starts from the bottom: atoms are assembled into materials such as doped silicon and metal, on which engineers build transistors, then logic gates, then functional units like adders or instruction parsers. Those units are assembled into processing elements, and a modern computer contains perhaps 10 to 20 coherent ones. On top of that sit the instruction set, assembly language, and higher-level languages such as C, C++, Java and JavaScript.

Building a computer begins with a target: what is it for, and how fast does it need to be? An organization of a thousand people then works across many disciplines to hit that target. Asked where the magic enters the hierarchy, Keller says he is agnostic about it and enjoys every layer.

Instruction sets, he notes, stay stable for long stretches. They encode a small set of basic operations such as load, store, multiply, add, subtract and conditional branch, and about 90% of execution time falls on just 25 or so opcodes. An architecture that has been around for 25 years works because those basics were defined long ago.

02

Modern CPUs find parallelism inside a serial program; GPUs are simply handed it

An old computer fetched instructions and executed them in order. A modern one fetches large numbers of instructions, say 500, finds the dependency graph between them, and runs independent pieces on separate units, deeply out of order. Keller jokes that the market for simple, clean, slow computers is zero, so the machine people buy may be built cleanly but must be complicated underneath.

To keep results correct, the machine carries bookkeeping tables and rules about memory ordering so operations appear to finish in the right order. Keller contrasts this with GPUs, which run simple programs over a million pixels where the order does not matter. He calls one kind "found parallelism" and the other "given parallelism": the screen does not care which pixel is processed first, so you can declare it parallel up front.

He illustrates with reading a book. A human reads sentence after sentence as one serial narrative, but if you diagrammed it, you could see that "tall and smart" can be reordered without changing meaning, while "the tall man is wearing the red shirt" creates dependencies. Found parallelism means discovering those reorderable pockets, which in real programs turn out to be large. How hard it is, he says, comes down mostly to transistor count.

03

Branch prediction is why found parallelism pays off, and it now resembles a neural network

Keller says out-of-order execution gains about 10x: an in-order machine takes around three cycles per instruction because of operation latency, while a modern one reaches roughly 0.3 to 0.5. That depends on both the amount of found parallelism and the predictability of the program. Branches occur about every six instructions, so to keep a 600-instruction window useful the predictor must get about 99 of 100 branches right.

Predicting a branch means guessing which way a decision will go before it is resolved. In a loop that runs a million times, for example, the machine can bet that the value is still greater than one. Host Lex Fridman is stunned that this works so accurately, and Keller says the real story behind it is surprisingly simple at first.

04

Predictors grew from one remembered bit into a neural-style engine that costs megabits

The history of predictors is, in his words, a little sad. Twenty years ago machines recorded which way a branch went last time and predicted the same, which was about 85% accurate. Adding a small counter reached 92%, and using history of how the code got there improved it further.

Today's predictors look something like a neural network, doing deep pattern recognition over execution flows in several ways and choosing the best result; Keller calls it a little supercomputer inside the computer. Reaching 85% took about a thousand bits, while 99% takes tens of megabits, so going from a 50-instruction window to 500 required three or four orders of magnitude more bits.

Even a wrong guess can be partly salvaged. If the machine executed down the wrong path, it flushes the pipeline, but designers are looking at remembering results that did not depend on the branch, much as a reader's understanding of the next paragraph is sometimes unaffected by misreading the last. The hardware tracks whether data changed to decide whether to recompute.

05

Design mixes intuition and analysis, and it is mostly hard work

Asked how much of this is art and how much is science, Keller compares it to choosing a route: shortest, fastest or most scenic. Designing a computer means making hundreds of such decisions, each with hundreds of options that interact in complicated ways. He jokes that this is the Robert Frost road-less-taken problem for computer designers.

Some people are very good at making intuitive leaps, he says, while others cannot leap but excel at evaluating alternatives. A good team contains many kinds of people, and he suspects only a few would count as artistic. His summary is that computer design is 99% perspiration, with the 1% inspiration being really important.

06

Deterministic answers come from wildly non-deterministic execution, and noise may be acceptable

Does a program give the same result every time? For a correct C program, Keller says, that is a definitional statement. Early 3D graphics acceleration could produce different results across runs of the same scene, which some people accepted, but when the high-performance computing world began using GPUs for calculation, they thought it was a bad idea.

In modern AI, he notes, data precision is low and the input data is unbelievably noisy, so it is fair to ask why the computation should not be noisy too. People have experimented with algorithms that speed up by being noisy, such as stopping a network's narrowing computation graph early and starting the next iteration. Still, for developers a program that gives different answers each run is annoying to debug, so everybody wants a switch that forces determinism.

Keller finishes with the point that people often miss: hardware can deliver a deterministic answer even though its execution flow is highly non-deterministic. Run a program a hundred times and it never executes the same way twice, yet the same input produces the same answer every time.

Sur la même chaîne

3:36:56EN
Lex Fridman· 16 sept. 2026PodcastPsychiatry Has Never Found Its PenicillinAnime : Lex FridmanHistorian Andrew Scull tells Lex Fridman why the field can ease symptoms, has never cured a major mental illness, and keeps paying for overconfidence with patients' lives.Mental HealthPublic HealthNeuroscience
5:15:51EN
Lex Fridman· 26 août 2026Podcast · 2 voixDHH Did Not Write a Line of Omarchy QuattroInvité : DHH · Anime : Lex FridmanThirteen months after a skeptical conversation with Lex Fridman, the Rails creator describes how Opus 4.5, a swarm of coding agents, and a one-minute Linux installer ended his era of hand-chiseled Ruby.Agents de codeVibe CodingIngénierie d’agents+3
3:12:58EN
Lex Fridman· 12 août 2026Podcast · 2 voixOne Cold Shower, Twenty Champions: How Khabib Nurmagomedov Was ForgedInvité : Khabib Nurmagomedov · Anime : Lex FridmanIn a Makhachkala school gym, seventy men shared one shower, and the water was only cold.Martial ArtsCombat SportsCoaching+3
3:46:18EN
Lex Fridman· 28 juil. 2026Podcast · 2 voixIf You Take Slavery Out of the Picture, There Is No Civil WarInvité : Gary Gallagher · Anime : Lex FridmanIn 1860, enslaved people were worth more than every railroad and factory in the United States combined.Political PhilosophyLeadershipHistory
3:51:47EN
Lex Fridman· 30 juin 2026Podcast · 2 voixForty-Six Percent of Emperors Were Overthrown. The Empire Lasted AnywayInvité : Anthony Kaldellis · Anime : Lex FridmanHistorian Anthony Kaldellis walks Lex Fridman through 2,200 years of Roman history and argues that what we call Byzantium was Rome itself.Political PhilosophyGeopoliticsLeadership
2:53:42EN
Lex Fridman· 29 mai 2026Podcast · 2 voixThe Moon Is Falling. It Just Keeps Missing.Invité : Biggest Mysteries in Physics · Anime : Lex FridmanFermilab physicist Don Lincoln tells Lex Fridman that the history of physics is a history of unification, and that antimatter, dark energy, and a theory of everything still sit far beyond the experiments we can run.Quantum MechanicsScience CommunicationPhilosophy of Science