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
| Process | Thread | |
|---|---|---|
| Memory | Shared within the process | Isolated, own address space |
| Creation cost | Cheap | Heavier |
| Communication | Shared memory (needs locks) | IPC (pipes, sockets) |
| Isolation/safety | One thread can crash all | Crash stays contained |
| Use | Parallel work in one app | Isolation, 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.