Processes move through states during their lifecycle.
States:
- Running (R): Executing on CPU
- Sleeping (S): Waiting for event (I/O, signal)
- Uninterruptible Sleep (D): Waiting for I/O, cannot be killed. Often disk/NFS issues.
- Stopped (T): Paused by signal (Ctrl+Z)
- Zombie (Z): Finished but parent hasn't collected exit status
Key concepts:
fork(): Creates child process by copying parentexec(): Replaces process with new programwait(): Parent waits for child to terminate
Interview: "What happens when you type ls?" Shell forks, execs ls, waits for completion.