Operating System - Various Scheduling criteria

Scheduling criteria are the principles or metrics used to evaluate and compare different CPU scheduling algorithms in an operating system. These criteria help determine how efficiently and fairly processes are managed for execution. 

1. CPU Utilization

  • Definition: The percentage of time the CPU is actively working (i.e., not idle).

  • Goal: Maximize CPU utilization.

  • Explanation: High CPU utilization means the system is making effective use of the processor. Ideal utilization ranges from 40% (for lightly loaded systems) to 90% (for heavily loaded systems).

2. Throughput

  • Definition: The number of processes completed per unit of time.

  • Goal: Maximize throughput.

  • Explanation: Higher throughput indicates that more work is being done in less time. However, it can be affected by the type of processes (short vs. long).

3. Turnaround Time

  • Definition: The total time taken to execute a particular process, from submission to completion.

    Turnaround Time=Completion Time−Arrival Time\text{Turnaround Time} = \text{Completion Time} - \text{Arrival Time}
  • Goal: Minimize turnaround time.

  • Explanation: This includes all time spent waiting, executing, and doing I/O. It's a key measure from a user's perspective.

4. Waiting Time

  • Definition: The total time a process spends in the ready queue waiting to be executed.

    Waiting Time=Turnaround Time−Burst Time\text{Waiting Time} = \text{Turnaround Time} - \text{Burst Time}
  • Goal: Minimize waiting time.

  • Explanation: Reducing waiting time improves responsiveness and system performance, especially in interactive environments.

5. Response Time

  • Definition: The time from the submission of a request until the first response is produced.

    Response Time=First Run Time−Arrival Time\text{Response Time} = \text{First Run Time} - \text{Arrival Time}
  • Goal: Minimize response time.

  • Explanation: Critical in real-time and interactive systems. It's different from turnaround time because it doesn't wait for the process to finish—just to start responding.

6. Fairness

  • Definition: The equal treatment of all processes, preventing starvation.

  • Goal: Ensure no process is indefinitely postponed.

  • Explanation: Important in multi-user systems and long-running services to ensure that all processes get CPU time eventually.

7. Predictability

  • Definition: The consistency of a scheduling algorithm in terms of performance metrics.

  • Goal: Provide consistent response/turnaround times.

  • Explanation: Predictable systems are easier to manage and more user-friendly, especially in real-time environments.