DSSSB TGT Computer Science: Process States & Transitions (Notes, PYQs & 100 Practice Questions)

DSSSB / KVS / EMRS Computer Science Revision

Process States & State Transitions in Operating Systems: Notes, PYQs & 100-Question Practice Sets

In Operating Systems, a Process is formally defined as a program under execution. Understanding how processes move through execution states, how the CPU scheduler dispatches threads, and how the kernel handles swapping is one of the highest-weightage topics in the DSSSB TGT/PGT Computer Science recruitment exam.


1. Standard 5-State Process Model

During its execution lifecycle, a process transitions through standard states maintained in main memory and managed by the operating system kernel:

  • New (Created): The program is being initialized and loaded from secondary storage by the Long-Term Scheduler.
  • Ready: The process is loaded in RAM and waiting in the Ready Queue for CPU time allocation.
  • Running: Instructions are actively executing on the CPU core.
  • Waiting / Blocked: The process is suspended waiting for an event or I/O request (such as disk read, keyboard input, or lock acquisition).
  • Terminated (Exit): The process finishes execution and its resources are deallocated.
📌

2. Process State Transition Matrix

Understanding which component triggers state transitions is crucial for competitive exams. The following matrix summarizes standard transitions:

From State To State Triggering Event / Mechanism Transition Nature
New Ready Admitted to main memory (Job Scheduler) Admitted
Ready Running CPU allocation by Short-Term Scheduler (Dispatcher) Dispatched
Running Ready Time quantum expiry (timer interrupt) or higher-priority preemption Involuntary
Running Waiting Blocking system call or waiting for I/O event Voluntary
Waiting Ready I/O operation complete or event signal received Interrupt
Running Terminated Normal exit system call or abort signal (SIGKILL, SIGSEGV) Exit / Deallocate
📌

3. The 7-State Model & Swapped Processes

When physical memory (RAM) is exhausted, the Medium-Term Scheduler (Swapper) swaps waiting processes out to secondary storage (Swap Space), introducing two suspended states:

  • Blocked-Suspend: A process that is waiting for an I/O event and currently resides on secondary storage.
  • Ready-Suspend: A process in secondary storage that is ready to execute as soon as space is made available in main memory.
Operating System Process States Diagram and Execution Context
Figure 1: Conceptual representation of Process Execution Context and Operating System Kernel Queues.
📌

4. Process Control Block (PCB) & Context Switching

Every active process is represented in the operating system by a Process Control Block (PCB) (also called a Task Control Block):

  • Process State: Ready, Running, Blocked, etc.
  • Program Counter (PC): Address of the next machine instruction to be fetched.
  • CPU Registers: Accumulators, index registers, stack pointers saved during context switches.
  • CPU Scheduling Metadata: Process priority and queue pointers.
  • Memory Management Info: Page tables, segment tables, and base/limit registers.
  • I/O Status: List of allocated devices and open file descriptor tables.
📌

5. Practice Quiz (100 Questions in 10 Sets)

Test your knowledge with 10 sets of previous year and high-probability practice questions. Note: You can select an answer only once per question; complete the set to view your total score and detailed explanations, or restart the set to try again.

DSSSB Practice Module
Question 1 of 10
Loading...

Score: 0 / 10

Set Completed!

Detailed Review & Explanations:

📌

6. Frequently Asked Questions (Quick Revision)

Q1: Can a process move directly from Waiting (Blocked) to Running?
Answer: No. In standard operating systems, when a waiting process finishes its I/O or event wait, it must transition into the Ready state. Only the Short-Term Scheduler can move a process from Ready to Running.
Q2: What is the primary difference between an Orphan process and a Zombie process?
Answer: An Orphan process is still executing after its parent terminates (it is adopted by PID 1, init or systemd). A Zombie process has terminated execution, but its exit entry remains in the Process Table because its parent has not yet executed the wait() system call.
Q3: Which component directly controls the Degree of Multiprogramming?
Answer: The Long-Term Scheduler (Job Scheduler) determines how many total processes are admitted to main memory simultaneously.
Q4: What causes the transition from Running to Ready in preemptive systems?
Answer: A hardware timer interrupt signaling that the process's allocated Time Quantum has expired, or the arrival of a higher-priority task.

Post a Comment

Please do note create link post in comment section

Previous Post Next Post