A CPU runs the main program and handles tasks that benefit from low latency, such as complex logic and work that must happen step by step. Unlike a GPU’s thousands of simple processing units, a CPU has fewer, more capable cores. section 1.10 section 1.2
Imagine assigning students to grade exams. Many graders can work at once if each exam is independent, but they may sit idle if they must wait for one shared answer key. More processors help only when the work can be divided. section 1.2 section 1.10
Table 1.2 Contrasting CPU and GPU design philosophies.
|
|
CPU (Master
Chef)
|
GPU
(Thousand Cooks)
|
|
Cores
|
6–24 on
typical desktops
|
Thousands
of simple processing units
|
|
Design Goal
|
Low Latency
(Finish each task fast)
|
High
Throughput (Finish many tasks at once)
|
|
Analogy
|
A chef
preparing a complex 7-course meal
|
1,000
workers rolling 1,000 burritos at once
|
|
Best For
|
OS, Web
Servers, Complex Logic, and any single-threaded task where one fast core wins
|
Matrix
Math, Image Processing, AI, and many more parallel patterns you’ll discover
in this book
|
Compare CPU and GPU design goals and the kinds of work each handles well. section 1.6








