liveBook · Manning

CPU

As explained in Grokking Concurrency

A processor, or central processing unit (CPU), is hardware that executes machine instructions and performs general-purpose computation.

Imagine a recipe: source code provides the steps, input data supplies the ingredients, and the CPU acts as the chef carrying out machine instructions. A CPU, or central processing unit, is hardware that executes those instructions and performs general-purpose computation. It cannot independently sort or search; programs give its limited operations useful direction. Before execution, a compiler translates source code into machine code the CPU can understand. section 2.1

Two CPU components divide the work of executing instructions:

  • The control unit (CU) interprets machine instructions. section 3.1
  • The arithmetic logic unit (ALU) performs arithmetic and bitwise operations. section 3.1

A CPU may execute instructions serially, one after another, or exploit parallel hardware. Multiple arithmetic units can divide mathematical work into subparts through instruction-level parallelism; arranging bits for simultaneous processing is bit-level parallelism. Multiple processor chips form a multiprocessor, while a multicore processor places independently working processors, called cores, on one chip. The operating system can perceive each core as a separate processor. section 2.1 section 3.6

Choosing hardware for concurrent work

A concurrent algorithm depends on the computer system that executes it. Understanding the CPU and other hardware helps you select operations that use available processing resources effectively and make informed performance decisions. section 3.0

Components of the CPU

Use the CPU-components figure to see how the control unit and arithmetic logic unit contribute to instruction execution. section 3.1

A multicore processor

Use the multicore-processor figure to visualize independently working cores on a single chip. section 3.6

How Grokking Concurrency covers it

How deep it goes
Defines instruction execution, introduces CPU components, and surveys parallelism without detailing memory behavior or low-level circuitry.
Examples
Uses a recipe analogy, CPU component diagrams, serial execution, instruction-level parallelism, multiprocessors, and multicore processors.
What it assumes
Assumes familiarity with programs and source code while building the CPU, compiler, and machine-code model from basic analogies.
What you can do after
Evaluate hardware capabilities and choose processing resources that better support concurrent algorithm performance.
How it connects
Connects CPUs with programs, machine code, compilers, control units, arithmetic logic units, operating systems, and parallelism.

Also explained in

Compare how 4 books explain CPU →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Concurrency. The section links point to the parts of the book it draws on.