Skip to content
Preptima
easyConceptEntry

Process versus thread: what is the difference? Give me one real example and one mistake people make about it.

A process is a running program with its own address space and OS resources; a thread runs inside a process with its own stack and registers but shares its memory and files. In a process vs thread answer, the trap is calling sharing a free win: it makes threads cheap and makes one thread's bug everyone's.

4 min readUpdated 2026-10-10Target archetype: Enterprise Captive

Answer

Short answer

A process is a running program with its own virtual address space and its own operating-system resources, such as open files. A thread is a single flow of execution inside a process. Each thread has its own stack, registers and program counter, but all threads in a process share its memory, globals, heap and open files. The process vs thread trade-off follows from that: threads are cheaper to create, switch and communicate between, and processes are isolated from each other.

Was this answer helpful?

Likely follow-ups

  • After fork, which things does the child share with the parent, and which does it get its own copy of?
  • Two threads increment the same counter a million times each and the total is short. Why, and what fixes it?
  • Why would a browser put each site in its own process when threads would use less memory?
  • On Linux, threads and processes are both created with clone. What differs between the two calls?

Related questions

Further reading

Related Topics