A process is an isolated program with its own memory; a thread is a unit of execution that shares memory with other threads in the same process. One process can contain many threads.
How it works
- Process: own address space, file descriptors, and heap. Isolated by the OS — a crash or memory bug in one process cannot corrupt another. Context switching and communication (IPC) are relatively expensive.
