Course Content
Operating Systems (OS)
Scheduling Criteria — CPU Scheduling

Scheduling criteria are the metrics used to evaluate and compare different CPU scheduling algorithms. These criteria help determine how efficiently the operating system handles multiple processes and ensures fairness, responsiveness, and system stability.

 

Understanding these criteria is essential to analyze trade-offs in different scheduling approaches.


1. CPU Utilization

Definition: The percentage of time the CPU is actively working on executing processes.

 

  • Goal: Maximize utilization.
  • Ideal range: Between 75% to 100% in real systems.
  • Why it matters: A CPU sitting idle wastes system resources and lowers overall efficiency.

 

Example: If the CPU is idle for 20 seconds in a 100-second interval, CPU utilization is 80%.


2. Throughput

Definition: The number of processes that complete execution per unit of time.

 

  • Goal: Maximize throughput.
  • Higher throughput means more work done in less time.
  • Influenced by process length, context switch overhead, and scheduling strategy.

 

Example: If 10 processes finish in 5 seconds, throughput is 2 processes/second.


3. Turnaround Time

Definition: The total time taken from process submission to process completion.

 

  • Formula: Turnaround Time = Completion Time – Arrival Time
  • Includes waiting, execution, and any I/O delays.
  • Used in batch processing systems to evaluate performance.

 

Goal: Minimize average turnaround time.


 4. Waiting Time

Definition: The total time a process spends in the ready queue, waiting to get the CPU.

 

  • Formula: Waiting Time = Turnaround Time – Burst Time
  • The lower the waiting time, the better the user experience and system responsiveness.

 

Goal: Minimize waiting time to reduce perceived delays.


5. Response Time

Definition: The time between a process’s submission and its first response/output.

 

  • Especially relevant in interactive and real-time systems.
  • Measures how quickly the system reacts to user input.

 

Goal: Minimize initial response time to ensure faster system feedback.

 

Note: For non-preemptive scheduling, response time = waiting time. In preemptive, they differ.


Trade-offs Among Criteria

Not all criteria can be optimized simultaneously. For example:

 

  • Increasing throughput might raise waiting time.
  • Reducing turnaround time may lower CPU utilization if more context switches occur.

 

Designers must prioritize based on system goals:

 

  • Real-time systems → prioritize response time.
  • Batch systems → prioritize turnaround and throughput.
  • Time-sharing systems → balance response and fairness.
 
0% Complete
WhatsApp Icon

Hi Instagram Fam!
Get a FREE Cheat Sheet on System Design.

Hi LinkedIn Fam!
Get a FREE Cheat Sheet on System Design

Loved Our YouTube Videos? Get a FREE Cheat Sheet on System Design.