Explain like I'm five · Systems

What are Processes and Threads?

Processes and threads, told as a story about hands sharing one car versus mechanics working on separate cars.

one big job: tear down the whole engineone mechanic alone takes far too long

Tearing down the engine alone takes far too long.One mechanic alone takes far too long.

you could bring in a whole second car insteadbut each car needs its own full toolbox and trunk set up — a lot of overhead

You could bring in a whole second car instead.Each car needs its own full toolbox and trunk — a lot of overhead.

same car, sharing the same trunk (threads)a completely separate trunk (a process)threads = hands working inside the same car, processes = separate cars entirelyhands in one car share the trunk — but a different car can't see into it at all

Threads = many hands in one car; processes = separate cars entirely.Hands in one car share the trunk — a different car can't see into it.

Processan independent car, an independent memory space
Threadhands working inside the same car
Context Switchswitching cars costs time
Shared-Memory Risksharing one trunk means you can collide
PROCESS vs THREADProcess: its own car, its own trunkProcess: heavy to set up, slowThread: same car, shared trunkThread: light to spin up, fastwhether memory (the trunk) is shared is the key differencea thread runs inside a process — it's the real unit the scheduler moves

Whether memory (the trunk) is shared is the key difference.A thread runs inside a process — the real unit the scheduler moves.

sharing the trunk beats setting up separate onestwo hands touch the same part at once, and they collidethat's why a shared trunk always needs a synchronization rule

Two hands sharing the trunk beat setting up separate ones — but a collision ruins the work of both.That's why a shared trunk always needs a synchronization rule.

In one breath

Process = each its own independent car (independent memory). Thread = several hands working inside the same car, sharing its trunk (memory).

A process is an execution unit with its own OS-allocated memory space — it can't peek directly into another process's memory. A thread is a lighter execution unit living inside a process, sharing its code, data, and heap, while keeping its own stack and registers. Creating or switching processes is costly; threads are comparatively light, but their shared memory means synchronization is needed. In practice, the CPU scheduler often moves threads, not whole processes.

When grown-ups say it

Process
One independent car. Has its own memory space.
Thread
Hands working inside the same car. Shares code and the trunk (memory); keeps its own stack.
Context Switch
The time cost of switching to a different car. Much lighter for threads than for whole processes.
Synchronization
The rule for handing out the lift key. Especially important for threads sharing one trunk. → there's only one lift key
Deadlock
Frozen forever, each waiting on the other's key. Can happen between threads or between processes. → the garage frozen waiting on each other's keys
Virtual Memory
A fake map that makes the whole warehouse look like mine. Each process gets its own copy of this fake map. → the fake map that makes the whole warehouse yours
CPU Scheduling
The rule that sets the car order on the board. What actually lands on the board is usually a thread. → who gets the lift first
The GPU's Many Hands
A crew doing the same simple task all at once. Both split work among many hands, but a GPU specializes in running the same calculation at once. → the hundred-hand helper crew
Next story
The Shelf Map That Halves the Search at Every Fork →
Want another term as a picture book? Request →