Appearance
8. Process States
NEW → READY → RUNNING → TERMINATED
↑ ↓
└── WAITING (blocked on I/O)- NEW: process is being created.
- READY: loaded, waiting for CPU time.
- RUNNING: actually executing (one process per core at a time).
- WAITING/BLOCKED: waiting for I/O or an event.
- TERMINATED: finished or killed; PCB briefly persists so the parent can read the exit status via
wait(), then it's deleted.
Zombie & orphan processes:
- Zombie: the process has finished, but the parent hasn't called
wait()yet — the PCB (holding the exit status) still exists. Shows asZinps. Too many zombies fills the PID table. - Orphan: the parent dies before the child. The child is reparented to
init(PID 1), which regularly reaps children viawait().