codingstuff.io
ExploreTutorialsProblemsCS Subjects
Get Started
ExploreTutorialsProblemsCS Subjects
Get Started
codingstuff.io

Master the art of building software through interactive tutorials, real-world problems, and guided projects.

Pune, Maharashtra, India

codingstuffmail@gmail.com

Product

  • Explore
  • Tutorials
  • Problems
  • CS Subjects

Company

  • About
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Sitemap

© 2026 codingstuff.io. All rights reserved.

Built with ❤️ for developers everywhere

/
/
All Subjects
🖥️

Operating Systems

25 chapters

1Intro to OS & Kernel Architecture2Process Concept & Lifecycle3System Calls & Interrupts4Process Management & PCB5Inter-Process Communication (IPC)6CPU Scheduling (FCFS, SJF, RR)7Threads (User vs Kernel Level)8Process Synchronization9Critical Section Problem10Producer-Consumer Problem11Dining Philosophers Problem12Deadlock Conditions & Prevention13Banker's Algorithm (Avoidance)14Memory Management & Paging15Memory Allocation (First Fit, Best Fit)16Paging and Segmentation17Translation Lookaside Buffer (TLB)18Virtual Memory & Demand Paging19Page Replacement Algorithms20Thrashing21File Systems & Directory Structure22File Allocation Methods23Disk Scheduling Algorithms24I/O Systems & DMA25OS Protection & Security
SubjectsOperating Systems

Process Concept & Scheduling

Updated 2026-05-02
3 min read

Process Concept & Scheduling

A program is merely a passive entity (a file containing code stored on disk). A process, on the other hand, is an active entity: a program in execution. The Operating System is responsible for managing these processes, ensuring they execute fairly and securely.

1. The Process State

As a process executes, it changes state. The state of a process is defined by its current activity:

  • New: The process is being created.
  • Running: Instructions are being executed on the CPU.
  • Waiting (Blocked): The process is waiting for some event to occur (such as an I/O completion).
  • Ready: The process is waiting to be assigned to a processor.
  • Terminated: The process has finished execution.

2. Process Control Block (PCB)

Each process is represented in the operating system by a Process Control Block (PCB), also called a task control block. It contains many pieces of information associated with a specific process:

  • Process State: The current state (running, ready, waiting, etc.).
  • Program Counter: Indicates the address of the next instruction to be executed for this process.
  • CPU Registers: The registers vary in number and type depending on the architecture. They include accumulators, index registers, stack pointers, and general-purpose registers.
  • CPU-Scheduling Information: Includes a process priority, pointers to scheduling queues, and any other scheduling parameters.
  • Memory-Management Information: Includes information such as the value of the base and limit registers and the page tables.
  • I/O Status Information: Includes a list of I/O devices allocated to the process, a list of open files, and so on.

3. CPU Scheduling

The objective of multiprogramming is to have some process running at all times to maximize CPU utilization. The objective of time-sharing is to switch the CPU among processes so frequently that users can interact with each program while it is running.

To meet these objectives, the Process Scheduler selects an available process for program execution on the CPU.

Common Scheduling Algorithms:

  1. First-Come, First-Served (FCFS): The simplest scheduling algorithm. Processes are assigned the CPU in the order they request it.
  2. Shortest-Job-First (SJF): Associates with each process the length of its next CPU burst. When the CPU is available, it is assigned to the process that has the smallest next CPU burst.
  3. Round Robin (RR): Similar to FCFS, but preemption is added to switch between processes. A small unit of time, called a time quantum or time slice, is defined.
  4. Priority Scheduling: A priority is associated with each process, and the CPU is allocated to the process with the highest priority.


PreviousIntro to OS & Kernel ArchitectureNextSystem Calls & Interrupts

Recommended Gear

Intro to OS & Kernel ArchitectureSystem Calls & Interrupts