1 of 4

Your RightSignal

Operating systems · 1 of 91 / 3

Processes and threads

The concept

How your laptop runs Spotify, Chrome and Zoom at once

A process is a running program. The operating system (OS) gives it its own private memory, a process ID number and its own list of open files. One process can't read another's memory, so Spotify can't see or overwrite what Zoom is doing.

A thread is one line of work inside a process. Each has its own stack (scratch space for function calls), registers and place in the code, but all threads in a process share its memory and files. Every process starts with one.

On a machine with 8 cores, up to 8 threads can run at the same moment. If there are more threads than cores, the OS swaps them on and off the cores many times a second. That's fast enough that everything looks like it's running at once.