Step 02

Process Life Cycle & States

A process does not run from start to finish in one go. It moves between five states. Play the animation, then click any state to study it in detail.

The five states
StateDescription
New (Start)The process is actively being created by the OS.
ReadyThe process is prepared to run and is waiting for CPU allocation.
RunningThe CPU is actively executing the process instructions.
Waiting (Blocked)The process is paused until a resource becomes available (e.g., waiting for input or file access).
Terminated (Exit)Execution is completed or stopped, and the process is removed from memory.
AdmittedDispatcher(CPU allocated)ExitRequest I/O orwait for a resourceResource available /I/O completeInterrupt / time quantum expired1. START (NEW)Being created2. READYWaiting for CPU3. RUNNINGExecuting on CPU5. TERMINATEDProcess finished4. WAITING (BLOCKED)Waiting for I/O
The five-state model: a process goes through five different states during its lifetime, and each arrow is labelled with the event that causes that transition.
Ready queue — list of all processes waiting for the CPU
Dispatch — the act of giving the CPU to a chosen ready process
Preemption — forcibly taking the CPU away from a running process
Time quantum — fixed slice of CPU time given in Round Robin

Real-world analogy: The doctor's clinic

Registering at the desk is New; sitting in the waiting hall is Ready; being examined by the doctor is Running; being sent for a blood test is Waiting; walking out with the prescription is Terminated. After the blood test you return to the waiting hall — not directly to the doctor. That is exactly Waiting → Ready.
Experiment: Animated state transition diagram
Speed
AdmittedDispatcher(CPU allocated)ExitRequest I/O orwait for a resourceResource available /I/O completeInterrupt / time quantum expired1. START (NEW)Being created● P1 is here2. READYWaiting for CPU3. RUNNINGExecuting on CPU5. TERMINATEDProcess finished4. WAITING (BLOCKED)Waiting for I/O
Step 1 / 7
P1 enters New

Event responsible: User launches the program (fork/exec system call).

Process P1 is created — the OS builds its PCB.

Events responsible for each transition
TransitionTriggering eventWho causes it
New → ReadyAdmitted — memory allocated and PCB builtLong-term scheduler
Ready → RunningDispatch — CPU allocated to the processShort-term scheduler / dispatcher
Running → WaitingI/O request or wait for a resource / eventThe process itself (system call)
Waiting → ReadyI/O complete or resource availableHardware interrupt handled by the OS
Running → ReadyTime quantum expired or higher-priority arrivalTimer interrupt (preemption by OS)
Running → Terminatedexit() called, or killed / fatal errorThe process itself or the OS

Running state

Definition: The process's instructions are actually being executed by the CPU.

What happens: Only one process per CPU core can be in this state at a time.

Example: The media player is decoding and playing your song right now.

Typical OS action: Runs it until it finishes, blocks for I/O, or its time quantum expires.

Transition condition: Running → Waiting (I/O request), Running → Ready (time quantum expired / preemption), Running → Terminated (finished).

All valid transitions (and one common trap)
  • New → Ready — admitted by the long-term scheduler.
  • Ready → Running — dispatched by the short-term scheduler.
  • Running → Waiting — the process requests I/O or waits for an event.
  • Waiting → Ready — the I/O or event has completed.
  • Running → Ready — preempted (time quantum over or a higher-priority process arrived).
  • Running → Terminated — execution completed or the process was killed.
Common exam trap: Waiting → Running is not a valid transition. A blocked process must always pass through Ready first, because the CPU is given only by the scheduler.
Quick quiz

1. A running process requests data from a hard disk. Which transition occurs?

2. How many processes can be in the Running state on a single-core CPU?

3. Which transition is IMPOSSIBLE?

Practice problem

Process P executes 4 ms of CPU work, then reads a file (6 ms), then executes 3 ms more and finishes. With a Round Robin quantum of 3 ms, list the sequence of states P passes through.