π§ What are Scheduling Criteria?
These are quantitative goals used to evaluate how effective a CPU scheduling algorithm is at handling processes.
They help answer:
π§© Is the CPU being used well?
π Are processes waiting too long?
π― Is the system responsive for users?
π― Key Scheduling Criteria
1. βοΈ CPU Utilization
Definition: Percentage of time the CPU is actually busy (i.e., not idle).
π Goal: Maximize it β keep CPU as busy as possible doing useful work.
-
Ideal: 100%
-
Real-world: 80β90% is considered good
Example: In a loaded system, if the CPU is active for 9 out of 10 seconds β CPU Utilization = 90%
2. π Throughput
Definition: Number of processes completed per unit of time (e.g., per second or per minute)
π Goal: Maximize β Complete more work in less time
-
Good for batch systems (e.g., print jobs, simulations)
-
Tied closely to turnaround time
Example: If 20 processes are completed in 10 seconds β Throughput = 2 processes/sec
3. π Turnaround Time (TAT)
Definition: Time taken from process submission to completion
TAT = Completion Time β Arrival Time
π Goal: Minimize β Users and systems prefer faster completion
Example:
Arrival Time = 0
Completion Time = 10
β TAT = 10 seconds
Used for: Performance comparison of scheduling algorithms in batch systems
4. β³ Waiting Time
Definition: Total time a process spends in the ready queue, waiting for CPU
Waiting Time = Turnaround Time β CPU Burst Time
π Goal: Minimize β No one likes to wait
Example:
TAT = 10
CPU Burst = 4
β Waiting Time = 6 seconds
Fairness metric β if one process waits too long, scheduling may be unfair.
5. β‘ Response Time
Definition: Time from process submission until the first time it gets the CPU
Response Time = First CPU Allocation β Arrival Time
π Goal: Minimize β Essential for interactive systems (e.g., UI, games)
Example:
Process arrives at t = 0
Gets CPU at t = 5
β Response Time = 5 seconds
Note: This is not completion time β itβs when the process starts responding.
π Summary Table
| Metric | Goal | Relevance |
|---|---|---|
| CPU Utilization | Maximize | System efficiency |
| Throughput | Maximize | System productivity |
| Turnaround Time | Minimize | Job completion speed |
| Waiting Time | Minimize | User experience & fairness |
| Response Time | Minimize | Interactivity & responsiveness |
π§ Interview-Ready Summary:
Scheduling criteria include CPU Utilization, Throughput, Turnaround Time, Waiting Time, and Response Time. These metrics help evaluate the performance and suitability of scheduling algorithms based on system goals like speed, responsiveness, and fairness.