Process States in Operating System (5 States) | DIT Notes

Process States in Operating System (5 States) DIT Notes
DIT Operating System 3.2 - Process States (5 States)
DIT • SEMESTER 1 • OPERATING SYSTEM • ARTICLE 3.2

Process States (5 States)

A clear, exam-oriented guide to the five basic states of a process and the events that cause a process to move from one state to another.

Unit 3 Processes Article 3.2 5 Process States Exam Preparation 5 Short 2 Long 10 MCQs

Quick Access

Jump directly to any part of Article 3.2.

3.2.1 Process States Overview

Understanding the five-state process model.

During its lifetime, a process passes through different states. A basic process model contains five states:

  1. New
  2. Ready
  3. Running
  4. Waiting (Blocked)
  5. Terminated (Exit)
Core idea: A process changes its state according to events such as CPU allocation, I/O requests, I/O completion, preemption, and process completion or termination.
FIGURE 1 • PROCESS STATE MODEL
The Five States of a Process
1
NewProcess is being created.
2
ReadyWaiting for CPU allocation.
3
RunningInstructions execute on CPU.
5
TerminatedExecution has finished or is ended.
Running → Waiting: I/O or event wait
Waiting → Ready: I/O or event completion
Running → Ready: Preemption or time slice over
New → Ready: Admitted by the Operating System
Caption: The basic five-state model shows how a process moves through New, Ready, Running, Waiting (Blocked), and Terminated (Exit).
Exam focus: Learn both the names of the five states and the reason for each major transition.

3.2.2 New State

The state in which a process is being created.

A process is in the New state when it is being created.

The Operating System creates the necessary data structures and prepares the process for execution.

Definition: New means that the process is in the process of being created and prepared for execution by the Operating System.
Example: When a user opens a web browser, the Operating System creates a new process.

After the process is prepared, it can be admitted to the Ready state, where it waits for CPU allocation.

3.2.3 Ready State

Prepared for execution but waiting for the CPU.

A process is in the Ready state when it is prepared to execute but is waiting for the CPU.

Several processes may be in the ready queue at the same time. The CPU scheduler selects one of them for execution.

FIGURE 2 • CPU ALLOCATION
Ready Queue → CPU Scheduler → Running
Ready Queue Several processes can be prepared and waiting for their turn to use the CPU.
CPU Scheduler Selects a process from the ready queue and dispatches it for execution.
Running State The selected process receives CPU time and its instructions are executed.
Key Transition Ready → Running occurs when the CPU scheduler selects the process.
Caption: A ready process is prepared to run but does not execute until it receives CPU allocation.
Example: A word processor is ready to run but is waiting for its turn to use the CPU.

3.2.4 Running State

The process is currently being executed by the CPU.

A process is in the Running state when its instructions are currently being executed by the CPU.

Normally, a process moves from Ready to Running when the CPU scheduler selects it.

Definition: Running means that the CPU is currently executing the instructions of the process.
Example: When the CPU is actively executing instructions of a browser process, that process is in the Running state.

From the Running state, a process may move to Waiting (Blocked) when it must wait for an I/O operation or another required event. It may also return to Ready when it is preempted or its time slice is over, or move to Terminated when execution is completed or the process is ended.

3.2.5 Waiting (Blocked) State

Waiting for a particular event before execution can continue.

A process enters the Waiting or Blocked state when it cannot continue execution until a particular event occurs.

A common reason is waiting for an I/O operation, such as reading data from a disk or receiving input from a keyboard.

FIGURE 3 • WAITING CYCLE
I/O Event Causes a Temporary Wait
Running → Waiting The process requests an I/O operation or must wait for a required event.
Waiting → Ready When the required I/O or event is completed, the OS moves the process back to Ready.
Caption: A blocked process is not ready to receive the CPU until the event for which it is waiting has occurred.
Example: If a program requests data from a disk, it may wait until the disk operation is completed. After the required event occurs, the process usually moves back to the Ready state.

3.2.6 Terminated (Exit) State

The final state after execution finishes or the process is ended.

A process enters the Terminated state when its execution has finished or when the Operating System ends it.

When a process terminates, the Operating System releases the resources allocated to the process.

Definition: Terminated (Exit) means that the process has finished execution or has been terminated by the Operating System.
Example: When a user closes a program and its execution ends, its process enters the Terminated state.

The Terminated state represents the end of the process in the basic five-state model.

3.2.7 Process State Transitions

Why and when a process moves between the five states.

The process can move from one state to another depending on events such as CPU allocation, I/O requests, and completion.

From To Typical Event / Reason
New Ready The process is admitted by the Operating System and prepared for execution.
Ready Running The CPU scheduler selects the process and dispatches it.
Running Waiting (Blocked) The process requests I/O or must wait for an event.
Waiting (Blocked) Ready The required I/O operation or event is completed.
Running Ready The process is preempted or its time slice is over.
Running Terminated (Exit) The process completes execution or is terminated.
FIGURE 4 • TRANSITION MAP
Major Events That Change Process State
New → ReadyAdmitted by the OS.
Ready → RunningScheduler dispatches the process.
Running → WaitingI/O or event wait.
Waiting → ReadyI/O or event completion.
Running → ReadyPreemption or time slice over.
Running → TerminatedProcess completion or termination.
Caption: These are the major state transitions shown in the source process-state diagram.
Exam Tip: The most important transitions to remember are Ready → Running, Running → Waiting, Waiting → Ready, Running → Ready, and Running → Terminated.

Quick Revision

Fast review of Article 3.2 before attempting the questions.

NewProcess is being created.
ReadyPrepared but waiting for CPU.
RunningInstructions are being executed.
WaitingWaiting for I/O or an event.
TerminatedExecution finished or ended.
Exam Focus
  • Memorize the five states in order: New, Ready, Running, Waiting (Blocked), Terminated (Exit).
  • Understand that Ready means waiting for CPU, while Waiting means waiting for a particular event or I/O completion.
  • Remember Ready → Running through scheduler dispatch.
  • Remember Running → Waiting for an I/O or event wait.
  • Remember Waiting → Ready after the required I/O or event is completed.
  • Remember Running → Ready when preemption or time-slice expiration occurs.
  • Remember Running → Terminated when execution is completed or the process is terminated.

5 Short Questions & Answers

Concise exam-oriented questions from Article 3.2.

Q1. What are the five basic states of a process?

The five basic process states are New, Ready, Running, Waiting (Blocked), and Terminated (Exit).

Q2. What is the Ready state?

The Ready state is the state in which a process is prepared to execute but is waiting for the CPU. The CPU scheduler selects a process from the ready queue for execution.

Q3. What is the Running state?

A process is in the Running state when its instructions are currently being executed by the CPU.

Q4. Why does a process enter the Waiting (Blocked) state?

A process enters the Waiting (Blocked) state when it cannot continue until a particular event occurs, commonly while waiting for an I/O operation such as disk data or keyboard input.

Q5. What happens when a process enters the Terminated state?

The process has finished execution or has been ended by the Operating System. The OS releases the resources allocated to the process.

2 Long Questions & Answers

Structured approximately 5-mark exam-style answers.

Q1. Explain the five states of a process in the basic process model.

A basic process model contains five states through which a process may pass during its lifetime:

  • New: The process is being created. The OS creates necessary data structures and prepares it for execution.
  • Ready: The process is prepared to execute but is waiting for the CPU. Several processes may wait in the ready queue.
  • Running: The process instructions are currently being executed by the CPU.
  • Waiting (Blocked): The process cannot continue until a particular event occurs, commonly an I/O operation is completed.
  • Terminated (Exit): The process has finished execution or has been ended by the OS. The OS releases its allocated resources.

Thus, the five-state model describes the main stages of a process from creation to completion or termination.

Q2. Explain the major transitions between process states.

A process moves between states because of events such as CPU allocation, I/O requests, and completion. The major transitions are:

  • New → Ready: The process is admitted by the OS after creation and preparation.
  • Ready → Running: The CPU scheduler selects the process and dispatches it.
  • Running → Waiting: The process requests I/O or waits for a particular event.
  • Waiting → Ready: The required I/O operation or event is completed.
  • Running → Ready: The process is preempted or its time slice is over.
  • Running → Terminated: The process completes execution or is terminated.

These transitions allow the Operating System to manage CPU allocation, waiting processes, and process completion efficiently.

10 Important MCQs

Open each question to view its options, then use Show Answer to check your response.

1. How many basic states are included in the process model discussed in this article?
A) Three
B) Four
C) Five
D) Six
Show Answer
Correct Answer: C) Five
2. In which state is a process being created?
A) New
B) Ready
C) Running
D) Waiting
Show Answer
Correct Answer: A) New
3. A process in the Ready state is waiting for which resource?
A) Disk only
B) CPU
C) Keyboard only
D) Printer only
Show Answer
Correct Answer: B) CPU
4. Which state means that the process instructions are currently being executed by the CPU?
A) New
B) Ready
C) Running
D) Terminated
Show Answer
Correct Answer: C) Running
5. Which state is commonly entered when a process waits for an I/O operation?
A) New
B) Ready
C) Running
D) Waiting (Blocked)
Show Answer
Correct Answer: D) Waiting (Blocked)
6. What normally causes a Waiting (Blocked) process to move to Ready?
A) The required I/O or event is completed
B) The process is newly created
C) The process is terminated
D) The CPU is permanently disabled
Show Answer
Correct Answer: A) The required I/O or event is completed
7. Which component selects a process from the ready queue for execution?
A) File manager
B) CPU scheduler
C) Keyboard controller
D) Disk only
Show Answer
Correct Answer: B) CPU scheduler
8. Which transition can occur when a running process is preempted or its time slice is over?
A) Running → Ready
B) Ready → New
C) Waiting → New
D) Terminated → Running
Show Answer
Correct Answer: A) Running → Ready
9. When does a process enter the Terminated (Exit) state?
A) When it is waiting for CPU
B) When it is waiting for disk input
C) When execution has finished or the OS ends it
D) When it is first created
Show Answer
Correct Answer: C) When execution has finished or the OS ends it
10. Which transition represents the normal movement after the CPU scheduler selects a ready process?
A) Ready → Running
B) Running → New
C) Waiting → Terminated
D) Terminated → Ready
Show Answer
Correct Answer: A) Ready → Running

Final Exam Reminder

Last-minute checklist for Article 3.2.

No comments