Engineer Atlas
OverviewLearnJourneysOS LabFinderRoadmapPracticeInterviewCheat SheetCompareConnections
OverviewLearnJourneysOS LabFinderRoadmapPracticeInterviewCheat SheetCompareConnections
Operating Systems
  • How Programs Run
  • Processes
  • Threads, Async & Event Loops
  • CPU Scheduling
  • System Calls & Kernel Mode
  • Stack & Heap
  • Virtual Memory & Paging
  • Files, File Systems & Descriptors
  • I/O
  • Concurrency, Synchronization & Deadlocks
  • Inter-Process Communication
  • Sockets
  • Containers & the OS
  • OS Internals Lab
  • OS Debugging & Capstone
OS + Networking
  • OS + Networking Together
OS/Learn/Processes
Operating Systems

Processes

A process is a running program with an identity, an address space, a state, open resources and a parent. The process table, the state machine, fork and exec.

The question this module answers · How does one executable become three isolated running instances?
The Anatomy of a Process
▶ interactive

Everything a process "is" lives in one kernel record — identity, parent, state, address space, descriptor table, credentials, accounting and scheduling data — and every tool from `ps` to `top` to `/proc` is a view of those fields.

Process States
▶ interactive

A process is always in exactly one state — new, ready, running, waiting or terminated — and the transitions are driven by four things: the scheduler taking the CPU away, the process asking for something that is not ready, that thing arriving, and exit.

Creating Processes: fork, exec, wait
▶ interactive

Unix-style systems create processes by cloning the caller (`fork`) and then optionally replacing the clone’s program (`exec`); the parent collects the result with `wait`; Windows does it in one `CreateProcess` call, and every language’s "run a subprocess" API is a thin wrapper over one of the two.

Engineer Atlas
GitHub·LinkedIn