Rahul Devashish
Rahul DevashishCourseGENERAL PAPERPaper-2 : Academic
7 Oct 2025Β·4 min readΒ·

OS: Process State Diagram & Schedulers

1. Introduction to Operating Systems

The initial sketches show the OS as an interface between users and hardware, emphasizing resource management.

Here's a reproduction of the interface diagram (simple layered structure):

User
 ↓
OS
 ↓
Hardware (CPU, MM, SM, I/O devices)
  • Explanation: OS is an interface between user and H/W. The main important function of OS is Resource Management (CPU, MM, SM, I/O devices).

2. Process Concept (Slide 5)

This slide has bullet points with hand-drawn underlines and a small component diagram.

Reproduced as:

  • An operating system executes a variety of programs and this variety basically divided into two major systems:
    • Batch system - Jobs
    • Time-shared systems - user programs or tasks
  • We can use the terms job and process almost interchangeably.
  • Process - When a program is in execution; execution of processes must be in sequential fashion. (Depends on Scheduling algs).
  • A process includes following things:
    • program counter (PC/IP)
    • stack
    • data section
    • CPU (drawn as a box)

Simple ASCII reproduction of the components:

Process
 β”œβ”€β”€ Program Counter (PC/IP)
 β”œβ”€β”€ Stack
 β”œβ”€β”€ Data Section
 └── CPU-related elements

3. Process States (Slide 6)

This includes the 5 primary states with hand-drawn circles and arrows, plus queues.

Reproduced list:

  • 5 Primary States:
    1. new: The process is being created. (or C code with & Saved. It is in SM. New Queue)
    2. running: Instructions are being executed.
    3. waiting: The job/process is waiting for some event to occur. or I/O
    4. ready: The process/job is waiting to be assigned to a processor. It is in MM. Ready Queue (Queue of all Ready Jobs)
    5. terminated: The process has finished execution. (Release all the acquired resources).

Additional small diagrams:

  • MM β†’ Ready Queue β†’ CPU (with arrow to jobs)
  • SM β†’ Spooler / List

ASCII for queues:

SM --> New Queue --> MM --> Ready Queue --> CPU

4. Secondary States (Partial Slide)

  • 2 Secondary States:
    1. Suspended Ready (Also called as Backing Store).
    2. Suspended wait.

No complex diagram, just listed.

5. Process State Diagram (Slide 7)

This is the main diagram. I've reproduced it using Mermaid flowchart syntax for accuracy (you can copy-paste into a Mermaid renderer if needed, but it's described here visually).

Rendering diagram…
  • Explanation of Transitions:
    • From New (SM) to Ready (admitted).
    • Ready to Running (scheduler dispatch).
    • Running to Ready (interrupt).
    • Running to Waiting (I/O or event wait).
    • Waiting to Ready (I/O or event completion).
    • Running to Terminated (exit).
    • Ready/Waiting to Suspended (suspend).
    • Suspended back to Ready/Waiting (resume).

6. Job Execution Possibilities (Partial Slide)

When a Job is executing on CPU. 3 Possibilities:

ASCII tree reproduction:

Job on CPU
β”œβ”€β”€ (1) Finish / Exit / Terminated
β”œβ”€β”€ (2) Job issues an I/O interrupt --> Suspended (Forcibly Stopped)
└── (3) A High Priority comes / Time slice Expires --> Preemption of Interrupt.

7. Valid Process Transitions (Partial Slide)

Pro:

  • What is a valid Process Transition?
    1. Wakeup: Ready --> Running.
    2. Dispatch: Ready --> Running.
    3. Block: Running --> Waiting (Block).
    4. Timeout: Running --> Ready.

Small diagram reproduced in Mermaid:

Rendering diagram…

8. Schedulers in Transitions (Partial Slide)

Diagram with labels A, B, C, etc.

Reproduced:

Rendering diagram…
  • Transitions: A & B is done by MTS/STS, etc. (as noted).

9. Process Control Block (PCB) (Slides 8-9)

List with underlines.

  • When the process is created then there is information associated with each process. The information includes:
    • Process state
    • Program counter
    • CPU registers
    • CPU scheduling information
    • Memory-management information
    • Accounting information
    • I/O status information.

Detailed table from slide 9:

Field
Process-Id(Unique)
Process Name
Executable File Name
Saved Registers
Program Counter (PC)
Stack Pointer(SP)
Processor Status Word(PSW)
Memory Management Information
Status of Open Files
Status of Assigned Devices
Accounting Information
Pointer to Previous PCB
Pointer to Next PCB

These reproductions capture the hand-drawn style and content from the slides. If you need more details, adjustments, or actual image generations, let me know!