---
title: "Process states and process hierarchy"
subject: "Operating System"
chapter: 2
key: "semester_6/operating_system:process-states-hierarchy"
source: https://www.bctengineer.com/q/semester_6/operating_system/process-states-hierarchy
site: BCT Engineering
---

# Process states and process hierarchy

Operating System · Chapter 2: Process Management

- Asked in: 2073 Magh, 1+2+2 marks
- Video: [Process State Transition Diagram and various Schedulers | Operating System](https://www.youtube.com/watch?v=-ddfZ0atNAU) — Jenny's Lectures CS IT
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/operating_system/process-states-hierarchy
- Whole chapter: https://www.bctengineer.com/md/semester_6/operating_system/chapter-2

## Question

Define process. Describe the various states of process. How significant is the process hierarchy?

## Short answer

A process is a program in execution that transitions among ready, running, and blocked states. Process hierarchy (parent-child tree) enables resource inheritance, control, signal grouping, and organized system startup, as in UNIX where init is the root.

## Answer

#### Process

A **process** is a program in execution, together with its current activity (program counter, registers, stack, data) and resources.

#### States of a process

A process changes state while it executes. The three basic states are:

- **Running**: the process is actually using the CPU.
- **Ready**: the process can run but is waiting for the CPU because another process is running.
- **Blocked (waiting)**: the process cannot continue until an external event occurs, such as I/O completion.

```text
          (1) dispatch
     +--------------------+
     |                    v
 +-------+  (2) timeout +---------+
 | Ready |<-------------| Running |
 +-------+              +----+----+
     ^                       | (3) waits for I/O
     |   (4) event occurs    v
     +----------------- +---------+
                        | Blocked |
                        +---------+
```

Transitions: (1) the scheduler picks the process; (2) the time slice ends or the process is preempted; (3) the process blocks for input or an event; (4) the event occurs, so the process becomes ready. Extended models add **New** (being created), **Terminated** (exit) and suspended (swapped-out) states.

#### Significance of the process hierarchy

In systems such as UNIX, a process can create child processes with `fork`; this builds a **tree** of processes with `init` as the root. Windows has no such hierarchy; the parent only holds a handle to the child.

Importance of the hierarchy:
- The parent can **control and wait** for its children (`wait`), collect their exit status and terminate them.
- Signals can be delivered to a whole process group (for example, Ctrl-C kills every process of a foreground job), and some systems terminate all children when the parent ends (cascading termination); in UNIX, orphans are adopted by `init`.
- It gives a natural way for **resource inheritance** (open files, environment) and for the shell to run commands.
- At boot, `init` creates the login processes, each of which starts user shells, so the system is organised and every process has an owner.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which description of the basic process states is correct?
   A. Ready: using the CPU; Running: waiting for I/O
   B. Running: using the CPU; Ready: waiting for the CPU; Blocked: waiting for an external event
   C. Blocked: using the CPU; Ready: finished
   D. Running: waiting for CPU; Blocked: terminated
   Answer: B. Running uses the CPU, Ready only lacks the CPU, and Blocked cannot proceed until an event such as I/O completion. (Key point: Three basic states)

2. What moves a process from Blocked to Ready?
   A. The scheduler dispatches it
   B. Its time slice ends
   C. The awaited event (e.g. I/O completion) occurs
   D. It calls fork
   Answer: C. When the event occurs the process can run again, but it must first wait in the Ready state for the CPU. (Key point: Blocked to ready)

3. Why is the process hierarchy significant in UNIX?
   A. Windows uses the same tree
   B. Parents can wait for and control children, signals can reach a whole group, and resources are inherited
   C. It makes all processes equal
   D. It prevents any parent from terminating children
   Answer: B. fork builds a tree rooted at init, letting parents wait for children, collect status, signal groups and pass inherited resources. (Key point: Process hierarchy)

## Related in Operating System

- [Preemptive vs non-preemptive; process states](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Apreemptive-nonpreemptive-process-states) — Operating System, chapter 2

## Related in other subjects

- [Process vs thread and task states](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Aprocess-thread-and-task-states) — Embedded System, chapter 6
- [Three-process gas cycle: net work, heat, type](https://www.bctengineer.com/question.md?key=semester_2%2Ffundamental_of_thermodynamics_and_heat_transfer%3Athree-process-cycle-pv-sketch) — Fundamental of Thermodynamics & Heat Transfer, chapter 4, asked 2×
