AlgoViz
Operating Systems
Operating Systems · EasyLesson 2 of 12

Process vs. program

People say 'program' and 'process' like they mean the same thing — but they don't, and the difference is the key to understanding everything the OS does. A program is a file on your disk: a recipe, just sitting there. A process is what you get when the computer actually RUNS that recipe — a living thing with its own memory, doing work right now.

Recipe vs. cooking

📄ProgramlaunchProcess #1running nowProcess #2running nowProcess #3running now
One program (the recipe) can be launched into several processes (several cooks each making the dish right now).

A program is like a recipe in a cookbook. It's a set of instructions, written down, not doing anything — it just exists as a file on the disk. A process is what happens when a cook actually follows that recipe: ingredients on the counter, pots on the stove, real cooking happening now. The moment you double-click an app, the OS loads the program off the disk and starts a process — a running, living instance of it. And here's the neat part: one recipe can be cooked by many cooks at once. That's why you can open THREE browser windows from one browser program — one program, three processes, each with its own memory and its own place in the instructions.

What a process carries that a program doesn't

A program is just the instructions. A process is the instructions PLUS everything needed to actually run them: • its own chunk of memory (where its variables and data live), • a marker showing which instruction it's on right now (so it can be paused and resumed), • a list of files and devices it's using. That bundle is why the OS can pause a process, let another run, then come back exactly where it left off — the process remembers its whole state.

A process is always in some state

A process doesn't just 'run' from start to finish without interruption — on a busy computer it's constantly being paused and resumed. So at any moment it's in one of a few states: NEW (being created), READY (waiting for its turn on the CPU), RUNNING (using the CPU right now), WAITING (paused because it needs something, like a file to load), and TERMINATED (finished). It bounces between Ready and Running over and over as the OS shares the CPU. Press Run on the animation to watch one process travel through its whole life.

Questions you might have

So a program becomes a process when I open it?

Exactly. The program is the file on disk. When you launch it, the OS copies the instructions into memory, gives it its own workspace, and starts running it — and that running instance is the process. Close it, and the process ends, but the program file stays on disk for next time.

Can one program have many processes?

Yes — that's a key idea. Open three windows of the same app and you (often) get three processes from one program. Each has its own memory, so a crash in one window doesn't have to take down the others.

Why does a process need its own memory?

So processes can't trample each other. If two processes shared one pile of memory, one could overwrite the other's data and cause chaos (or read its secrets). Giving each process its own walled-off memory keeps them safe and independent.

What does 'state' mean for a process?

It's what the process is doing right now: waiting for its turn (Ready), actually running (Running), paused for something it needs (Waiting), and so on. A process moves between these states constantly as the OS shares the CPU — see the animation.

🧠A program is the recipe on disk; a process is the live cooking — instructions plus its own memory and a marker of where it is. One program can spawn many processes, and each process is always in some state (Ready, Running, Waiting…).
✅ Check yourself3 quick questions — prove the idea stuck.Start →▶ Now watch it moveOpen the animation →

Best read after: What is an operating system?