Linux Process States
At any moment, every process is in one of a handful of states. Reading these states from ps or top is one of the first things you do when diagnosing a problem.
The Process States
| Code | Name | Meaning |
|---|---|---|
| R | Running/Runnable | On CPU, or ready and waiting for CPU time |
| S | Interruptible Sleep | Waiting for event (I/O, timer). Can be woken by signals. |
| D | Uninterruptible Sleep | Waiting for I/O. Cannot be killed — not even SIGKILL. |
| Z | Zombie | Finished, parent hasn't called wait() yet. |
| T | Stopped | Paused by SIGSTOP or Ctrl+Z. Resumes with SIGCONT. |
| I | Idle kernel thread | Similar to D but for kernel threads, truly idle |
S vs D — The Critical Difference
Both S and D are "sleeping" — but they're very different:
Common causes of D state: slow NFS mount, failing disk, kernel bug. If many processes are stuck in D, look for disk issues first:
Zombie Processes
wait(), the zombie is cleaned up.
A few zombies are normal. Thousands of zombies means a parent process is leaking — it's forking children but never calling wait().
State Modifiers in ps Output
| Modifier | Meaning |
|---|---|
s | Session leader (controls a terminal) |
+ | In the foreground process group |
l | Multi-threaded |
N | Low priority (nice > 0) |
< | High priority (nice < 0) |
Frequently Asked Questions
What will I learn here?
This page covers the core concepts and techniques you need to understand the topic and progress confidently to the next lesson.
How should I use this page?
Start with the overview, then follow the section links to deepen your understanding. Use the table of contents on the right to jump to specific sections.
What should I read next?
Use the navigation below to continue to the next lesson or explore related topics.