Comparisons

Process vs Thread

A process is an isolated program with its own memory; a thread is a lighter unit of execution that shares memory with other threads in the same process.

1 min read·7 sections
Open the interactive version → diagrams, practice & more

Overview

A process has its own address space, so one crashing process cannot corrupt another — but creating processes and communicating between them (IPC) is heavier. Threads live inside a process and share its memory, which makes them cheap to create and fast to communicate, at the price of needing locks and being able to corrupt each other.

Process vs Thread: key differences

ProcessThread
MemoryShared within the processIsolated, own address space
Creation costCheapHeavier
CommunicationShared memory (needs locks)IPC (pipes, sockets)
Isolation/safetyOne thread can crash allCrash stays contained
UseParallel work in one appIsolation, separate programs

When to use Process

Concurrency within one application where sharing data is convenient and you can manage synchronization — e.g. a web server handling many requests.

When to use Thread

Strong isolation and fault containment, or running independent programs — e.g. browser tabs as separate processes.

Verdict

Threads for cheap, shared-memory concurrency inside an app; processes for isolation and fault containment. Many systems combine them (process-per-core, threads within).

Common questions

What is the main difference between a process and a thread?

A process has its own isolated memory; threads share the memory of their parent process. Threads are lighter and faster to communicate, but less isolated.

Why do browsers use processes per tab?

For isolation and security: a crash or exploit in one tab’s process cannot directly corrupt or read another tab.

Part of Comparisons on SystemLore — system design explained with 148 deep topics, interactive diagrams, and a build-it-yourself game. Build this one →