AlgoPlus//structures / process-thread
Read the theory

Process vs Thread

Threads share their process's address space; only stack, registers, and PC are private.

Threads
1
Step
1/1
Legend
Shared (code/data/heap)
Private (stack/regs/PC)
AI Tutor Workspace
In a nutshell
A process is a running program with its own private workspace of memory — its code, its data, and room to grow. A thread is a single worker doing the actual running inside that workspace. One process can have several threads sharing the same memory, so they coordinate cheaply and quickly; separate processes each get their own walled-off memory, which is safer but heavier to create and slower to talk between.
Ready
Press play to begin the cinematic walkthrough.
A process owns an address space (code, data, heap); a thread is a unit of execution inside it with private stack, registers, and PC. Threads share memory so they are cheap to switch and communicate, but shared state must be synchronized.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for Process vs Thread.