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 Keller嘉宾
频道
Lex Fridman Podcast
视频
17:19
阅读
5 分钟
原文
英语
在 YouTube 打开
往下滚动阅读时,视频会缩到右下角继续播放。字幕跟随阅读语言。
阅读语言共 1 种语言可读
这篇文章还没有简体中文译文,先显示英语原文。
摘要

30 秒看懂

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.
全文

按章节阅读完整文稿

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.

同频道的其他文章

3:36:56EN → 简体中文
Lex Fridman· 2026年9月16日播客精神病学至今没有属于自己的青霉素主持 Lex Fridman历史学家 Andrew Scull 与 Lex Fridman 谈到,这门学科对症状有所缓解,但没有哪一种重大精神疾病真正被根治;过度自信的时候,代价要由病人来扛。Mental HealthPublic HealthNeuroscience
5:15:51EN → 简体中文
Lex Fridman· 2026年8月26日播客 · 2 人对谈DHH 没有亲手写一行 Omarchy Quattro 的代码嘉宾 DHH · 主持 Lex Fridman与莱克斯·弗里德曼一次充满怀疑的对话过去十三个月后,Rails 的创造者讲述了 Opus 4.5、一群编码智能体(Agent)和一个一分钟的 Linux 安装器,如何结束了他一凿一凿手写 Ruby 的时代。编程智能体Vibe Coding智能体工程+3
3:12:58EN → 简体中文
Lex Fridman· 2026年8月12日播客 · 2 人对谈一个冷水澡,二十位冠军:Khabib Nurmagomedov 是如何炼成的嘉宾 Khabib Nurmagomedov · 主持 Lex Fridman在马哈奇卡拉的一间学校体育馆里,七十个人共用一个淋浴间,而且只有冷水。Martial ArtsCombat SportsCoaching+3
3:46:18EN → 简体中文
Lex Fridman· 2026年7月28日播客 · 2 人对谈抽掉奴隶制,就没有美国内战嘉宾 Gary Gallagher · 主持 Lex Fridman1860 年,美国奴隶主名下的奴隶价值,超过了全美所有铁路和工厂的总和。Political PhilosophyLeadershipHistory
3:51:47EN → 简体中文
Lex Fridman· 2026年6月30日播客 · 2 人对谈46% 的皇帝被暴力推翻,帝国照样延续下来嘉宾 Anthony Kaldellis · 主持 Lex Fridman历史学家 Anthony Kaldellis 与 Lex Fridman 一起走过 2200 年的罗马史,并主张我们所说的拜占庭,其实就是罗马本身。Political PhilosophyGeopoliticsLeadership
2:53:42EN → 简体中文
Lex Fridman· 2026年5月29日播客 · 2 人对谈月亮一直在下落,却总也落不到地球上嘉宾 Biggest Mysteries in Physics · 主持 Lex Fridman费米实验室(Fermilab)物理学家 Don Lincoln 在与 Lex Fridman 的对谈中说,物理学的历史就是一部统一的历史;反物质(antimatter)、暗能量(dark energy)和万物理论(theory of everything)依然远在我们能做的实验之外。Quantum MechanicsScience CommunicationPhilosophy of Science