Process lifecycle
The stages a process moves through from creation to termination, including start, running, signals, and exit.
Definition
A process lifecycle is the sequence of states and events a process goes through: it starts, runs, may be interrupted by signals, and eventually terminates (cleanly or not).
A practical view of the lifecycle
Most applications experience the lifecycle as:
- process start: the OS creates the process and begins execution.
- Running: the process executes code and performs I/O.
- Interruption: the process may receive a signal (shutdown request, interrupt, etc.).
- Termination: the process exits with an exit code, or it ends via a crash / forced termination.
Why it matters
In production, many questions reduce to lifecycle questions:
- Did the process start successfully?
- Did it exit, and with what exit code?
- Was it terminated by a signal (graceful vs forced)?
- Did it crash (unexpected termination)?
Being precise about the lifecycle makes incidents less mysterious and speeds up debugging.