Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Process

A process is a program being executed by the kernel. Each process has a unique PID which is allocated at creation.

State

A process can have the following states:

NameShorthandDescription
RunningRThe process is currently running or is ready to be resumed by the scheduler
IntSleepingSThe process is waiting on a resource to become available, but can get resumed by a signal
SleepingDThe process is waiting on a resource to become available, ignoring signals (usually during I/O)
StoppedTThe process has been paused by a signal
ZombieZThe process has been terminated and cannot resume, ever

The Running state is the only state in which a process can be executed.

The following state transitions are valid:

stateDiagram-v2
    [*] --> Running

    Running --> IntSleeping
    Running --> Sleeping
    Running --> Stopped
    Running --> Zombie

    IntSleeping --> Running
    Sleeping --> Running
    Stopped --> Running

    Zombie --> [*]