The processor

A processor follows simple instructions, one at a time

You click: add up this columnTHE PROGRAM: a list of instructions1get the first number2get the second number3add them4keep the answer5move to the next rowone at a timeProcessorfetch thenext onedo itbillionsof these stepsevery secondA processor does only very simple things, such as adding two numbers. It does them one after another, extremely fast.Everything a program does, from drawing a window to checking spelling, is broken into steps this small.So a faster processor is one that gets through more of these steps each second.

A program is a list of small instructions. The processor does them one at a time, billions a second.

Cores and threads

A core does one thing at a time

Intel Core i7-14700K8 performance cores: large and fasttwo threads each: 16 threads12 efficient cores: small, one thread each: 12 threads20 cores, 28 threads8 × 2 + 12 × 1 = 28the operating system sees28 processorsA core runs one program at a time. More cores run more at once.A thread is a second queue on the same core, which lets the core fill its idle moments: useful, but well short ofa second core. Work that can be split, such as video export or running virtual machines, scales with cores.Work that cannot be split runs on one core however many there are.

This chip has 20 cores and 28 threads: 8 fast cores with two threads each, 12 small ones with one.

Clock speed

The GHz figure is how many billion steps it takes each second

The clock: a steady beat inside the processorstep 1step 2step 3and so on: one step on every beat1 Hz1 beat a second1 GHz1,000,000,000 beats a secondOn the box6 cores · 3.5 GHz3.5 billion steps a secondon each coreGHz is the clock speed: how many billion steps the processor can take each second.Higher is faster, but only between processors of the same family and age. A new 3 GHz chip can beat an old 4 GHz one,because it gets more done in each step. Use GHz to compare two versions of one chip, not two different chips.

Clock speed is measured in GHz: billions of steps a second. Compare it only between similar chips.

Clock speed · Going deeper · 1 of 2

Five billion steps a second, while it stays cool

one tick: 0.2 ns5 GHz = 5 billion ticks a secondIn one tick light travels 6 cm. A signal has to cross the chip in that time.The same chip, two speedsbase3.4 GHzturbo5.6 GHzIt runs at turbo while it stays cool anddrops back toward base when it does not.Clock speed is how many steps a core takes each second.Gigahertz compares chips of the same family only: a newer design does more work in each tick. The number onthe box is the turbo speed, reached for as long as the cooling can keep up. Overclocking pushes beyond itby raising speed and voltage, at the cost of heat and stability.

Gigahertz counts steps per second. The box shows turbo speed, which needs cooling.

Clock speed · Going deeper · 2 of 2

x86, x64 and ARM

ArchitectureFound inWhat it meansx86 (32-bit)older Intel and AMD PCsaddresses at most 4 GB of memoryx64 (64-bit)almost every PC and server todayruns 64-bit and 32-bit programsARM (64-bit)phones, tablets, Apple silicon Macs, some Windows laptopslow power; needs ARM builds or translation32 bits can number 4,294,967,296 bytes: exactly 4 GB. That is the 32-bit memory limit.Virtualisation support (Intel VT-x, AMD-V) is a processor feature switched on in the firmware settings.Integrated graphics means the processor draws the picture itself, sharing main memory.The architecture decides which software will run at all.A 64-bit operating system needs a 64-bit processor, and a program built for x64 does not run on ARM withouttranslation. Check the architecture before the speed.

x64 runs most PCs; ARM runs phones and Apple silicon; 32-bit stops at 4 GB.

Memory

Memory is the desk. Storage is the filing cabinet.

Storagethe filing cabinetholds everything you haveslow to reachkeeps it with the power offopensaveMemorythe deskholds only what is open nowfast to reachcleared when the power goes offProcessorworks only onwhat is on the deskStorage is the filing cabinet. Memory is the desk. The processor can only work on what is on the desk.That is why a program takes a moment to open, and why work you have not saved is lost when the power fails.A bigger desk does not make you work faster. It lets you keep more open at once without putting things away.

The processor works only on what is in memory. Storage keeps it; memory is fast and forgets at power-off.

Memory · Going deeper · 1 of 2

Cache: a small, fast memory inside the processor

Processor coreCachea notepad inside the chipholds what is in use right nowMemorythe deskholds everything that is openTime to fetch one item, to scalefrom the cacheabout 1 nanosecondfrom memoryabout 100 nanosecondsEven memory is slow next to the processor, so the chip keeps a small copy of what it is using right now.That copy is the cache. It is tiny, built into the processor, and about a hundred times quicker to reach than memory.You never manage it yourself. It is listed on a specification as L1, L2 and L3, which the next page sets side by side.

The cache keeps what the processor is using right now, about 100 times closer than memory.

Memory · Going deeper · 2 of 2

The memory hierarchy: every step away from the processor costs time

Where the data isTypical sizeTime to fetch (each step right is 10 times longer)If 1 ns were 1 secondL1 cache48 KB per core1 ns1 secondL2 cache2 MB per core4 ns4 secondsL3 cache33 MB, shared30 ns30 secondsMemory (RAM)32 GB100 ns1 min 40 sSSD (NVMe)1 TB100 µs28 hoursHard disk4 TB10 ms116 daysThe closer data sits to the processor, the faster it arrives and the less of it fits.A processor waits most of its life for data. Cache is tiny and immediate; memory is a hundred times slower;an SSD is a thousand times slower again. That last gap is why a machine that runs out of memory, and has touse the disk in its place, feels broken.

Cache answers in a nanosecond, memory in a hundred, an SSD in a hundred thousand.

Running out of memory

When memory is full, the disk stands in

16 GB of memoryOperating system: 4 GBBrowser, 40 tabs: 6 GBA game: 8 GB2 GB too manyPage file on the SSDstands in for memorymemory: 100 nsSSD: 100,000 ns4 + 6 + 8 = 18 GB wanted, 16 GB fittedthe last 2 GB live on the diskWhen memory is full, the disk stands in for it, a thousand times slower.This is virtual memory: the operating system moves the pages used least to a page file (Windows) or swap space(Linux, macOS) and brings them back when touched. Programs keep running, slowly. A machine that crawlswith its drive light on solid is usually short of memory, not short of processor.

The page file or swap holds what does not fit in memory, about a thousand times slower.

Memory types

DDR4 and DDR5 do not mix

DDR5 moduleDDR5 slot✓fitsDDR4 moduleDDR5 slot✗notch in the wrong placeNotch positions are illustrative.Memory comes in generations. A board takes one generation only, and a notch stops the wrong one going in.DDR5 is the current generation and DDR4 the one before. Check which the board takes before buying more memory.If a module will not seat with firm, even pressure, do not force it: it is the wrong kind or the wrong way round.

Memory comes in generations, DDR4 and DDR5. A board takes only one, and a notch enforces it.

Memory types · Going deeper · 1 of 2

One generation per board, keyed by a notch

TypeModule (notch position schematic)Desktop DIMMLaptop SODIMMVoltageTypical speedDDR3240 pins204 pins1.5 VDDR3-1600DDR4288 pins260 pins1.2 VDDR4-3200DDR5288 pins262 pins1.1 VDDR5-5600Each generation has its own notch, so the wrong type cannot be pushed in.The motherboard takes exactly one generation. DDR4 and DDR5 desktop modules both have 288 pins and stilldo not interchange. The number after the name is the speed: DDR5-5600 transfers 5,600 million times a second.Laptops use the shorter SODIMM, or memory soldered to the board.

DDR4 and DDR5 do not interchange. Desktops use DIMMs, laptops use SODIMMs.

Memory types · Going deeper · 2 of 2

Dual channel and ECC

Two modules, four slotsDual channelA1A2B1B2one module on each channel: both paths to the processor carry dataSingle channelA1A2B1B2both modules on channel A: half the paths, slower memoryECC memorydetects and corrects single-bit errors; used in servers and workstations, with a board that supports itFit memory in matched pairs, in the slots the manual names.On most four-slot boards a pair goes in the second and fourth slots. The modules should match in size andspeed; mixed modules run at the speed of the slowest.

Fit matched pairs in the right slots for dual channel. ECC corrects single-bit errors.

Finding the limit

The full gauge names the part

Task Manager, Performance tab, on a slow PCProcessor14%Memory15.5 of 16 GBDisk100% activeGraphics3%1 Memory is full.There is no room for anything new.2 So the disk is flat out.It is being used as memory.3 The processor is idle.A faster one would change nothing.Find the gauge that is full. That part is the limit; the others are waiting for it.Task Manager on Windows, Activity Monitor on macOS and top on Linux show the same four numbers. Readthem before buying anything: here the cure is to close programs or add memory, and a new processor orgraphics card would be money wasted.

Read processor, memory, disk and graphics use before choosing an upgrade.

Finding the limit · Going deeper

Which work needs which part

The slow taskLimited byBecauseMany browser tabs and programs openMemoryeach one holds memory whether in view or notExporting video, compiling code, virtual machinesProcessor coresthe work splits across every coreGames, 3D and video effectsGraphicsthe picture is drawn thereStarting up, opening programs and large filesStorageeverything is read from the drive firstOld or simple programs that use one coreClock speedone core, so only its speed countsAsk "slow at what?" before "which part?".The same computer can be short of memory for one person and short of graphics for another.

Ask slow at what: tabs need memory, exports need cores, games need graphics.

Lesson complete

You finished “The processor and memory”

Nicely done.

Open in a new tab