Computer
The processor is fast; the real engineering is keeping it fed with data.
Open a desktop computer (in your imagination) and you find a processor under a large cooler, memory sticks beside it, a graphics card, storage and a power supply, all joined by one big circuit board. The processor can do billions of operations a second, but only if data arrives in time, so much of the design is a hierarchy of memories, from tiny and fast to huge and slow.
- 7 components
- 2 worked equations
- 1 live model
- 2 safe experiments
1Exploded view
Take the desktop computer apart.
Tab to a numbered part (or tap it) to jump to its description. The same parts as a list:
2Major components
What every part does, and how.
- 01
Motherboard
Connects everything: power delivery, memory slots, expansion slots and the wiring between them.
how →Fast signals travel on carefully matched copper traces; lengths and spacing are designed like transmission lines.
- 02
Processor (CPU)
Executes instructions: several cores, each with its own small caches, plus a shared larger cache.
how →Pipelining overlaps the steps of many instructions; caches keep recently used data close.
- 03
CPU cooler
A heat sink and fan that carry the processor's heat into the air.
how →Heat flows from hot to cold through a chain of thermal resistances: chip, paste, metal fins, air.
- 04
Memory (RAM)
Holds the programs and data in use, billions of bytes, but far slower to reach than cache.
how →Each bit is a tiny capacitor that leaks, so the memory is refreshed thousands of times a second.
- 05
Graphics card (GPU)
Thousands of simpler cores that do the same operation on lots of data at once.
how →Graphics and machine learning are full of independent arithmetic, so wide parallel hardware wins.
- 06
Solid-state drive
Keeps files when the power is off, in flash memory.
how →Flash stores charge on an insulated gate; reading is fast but erasing works on large blocks, so a controller manages wear.
- 07
Power supply
Converts mains AC into low-voltage DC rails.
how →A switch-mode supply chops the input at high frequency so its transformer can be small; efficiency is typically around 90%.
3System relationships
Where the energy and information go.
Each block is a part (or the world outside). Solid lines carry energy, dashed lines carry information, dotted lines carry matter such as water or air.
Flows, in order
- Mains sends energy to Power supplyenergy: AC
- Power supply sends energy to Motherboardenergy: DC rails
- Motherboard sends energy to CPU + cachesenergy: core voltage
- CPU + caches sends information to Storageinformation: save files
- RAM sends information to CPU + cachesinformation: data + instructions
- CPU + caches sends information to GPUinformation: draw commands
- GPU sends information to Displayinformation: frames
- CPU + caches sends energy to Coolerenergy: heat
Loops that close
- Cooler feeds back to CPU + cachesinformation: temperature limit
4Physical principles
The physics doing the work.
Locality
Programs reuse recent data and data near it. Caches exploit that, so most accesses hit a small fast memory.
Pipelining
Each instruction passes through stages; overlapping them lets a core finish about one (or more) instruction per cycle.
Pipelining, hazards and the Iron LawInstruction set architecture
Heat
Nearly every joule a processor uses becomes heat. Cooling, not transistors, often limits how fast a chip can run.
5Mathematical foundations
The equations, with real numbers in them.
The Iron Law of performance
T = N · CPI / f
- T
- run time [s]
- N
- instructions executed [–]
- CPI
- average cycles per instruction [–]
- f
- clock frequency [Hz]
Worked example
- 1.T = 2 × 10⁹ × 0.8 / (4 × 10⁹)
- 2.T = 0.4 s
- Run time
- 0.4 s
AssumesOne core, fixed frequency, and an average CPI that already includes cache misses.
Average memory access time
AMAT = t₁ + m₁ · (t₂ + m₂ · t_mem)
- t₁, t₂
- L1 and L2 hit times [ns]
- m₁, m₂
- L1 and L2 miss rates [–]
- t_mem
- main-memory latency [ns]
Worked example
- 1.L2 path: 4 + 0.2 × 80 = 20 ns
- 2.AMAT = 1 + 0.05 × 20 = 2.0 ns
- Average access time
- 2 ns
AssumesTwo cache levels and fixed latencies; real memory latency varies with traffic.
6Computing architecture
The computer inside the system.
Here the computer is the exhibit: cores, caches, memory controller and input/output, organised as a hierarchy from registers to storage.
Layer 1
Registers and L1
A few hundred bytes to tens of kilobytes, reached in about a nanosecond.
Layer 2
L2 / L3 caches
Megabytes, several to tens of nanoseconds.
Layer 3
RAM and storage
Gigabytes at around 100 ns; storage is terabytes at microseconds or more.
7Engineering trade-offs
Every choice costs something.
Bigger caches
Gain:Fewer slow trips to RAM.
Cost:More chip area and power, and a slightly slower hit time.
Higher clock frequency
Gain:More cycles per second.
Cost:Power rises steeply because voltage must rise too; heat limits it.
More cores
Gain:More work done in parallel.
Cost:Only helps programs that can be split; the serial part limits the speed-up (Amdahl's law).
8 · Try it · runs in your browser
Feed the processor
Change the cache miss rates and memory latency. Watch the average memory access time, and how a few per cent of misses can double it.
- Average access time
- 2.00 ns
- Slowdown vs. always hitting L1
- 2.00 ×
- L2 path cost
- 20.0 ns
Memory stalls at least double the access time: bigger or smarter caches would pay off.
ModelTwo cache levels with 1 ns (L1) and 4 ns (L2) hit times; every miss waits the full latency, with no overlap.
Go further with a related simulation: Cache hit rate vs size and associativity
9Suggested safe experiments
Things to try, safely.
Every experiment here is virtual or a household-safe observation. Never open real devices, batteries or power supplies, never work on mains electricity, and never look at the Sun.
Observation
Watch the task manager
- Open your computer's task manager or activity monitor.
- Note CPU and memory use while idle, then while a video plays.
- Explain which resource each task stresses.
Safety: Software only. Do not open a computer case or power supply: power supplies hold dangerous charge even when unplugged.
Virtual
Cache in the simulator
- Open the cache hit-rate model linked below.
- Double the cache size and record the hit rate.
- Find where extra size stops helping.
Safety: Runs entirely in your browser.
10Keep learning
Lessons, courses and videos.
Lessons
Courses
Concepts in the Atlas
- Memory hierarchy and caches
- Pipelining, hazards and the Iron Law
- Instruction set architecture
- Power, performance and area (PPA) trade-offs
Field Guide
Elsewhere on Tactiverge
- Inside a Computer Processor Inside Everything
- Create a Virtual Computer Build