Lecture 05: CPU Scheduling Algorithms
- Scheduling Criteria & Goals (What do we optimize for?)
- FCFS: First-Come, First-Served (Simplicity, but with a catch)
- SJF: Shortest Job First (Optimality vs. Practicality)
- Round Robin (RR) (Fairness in Time-Sharing)
- Algorithm Comparison & Evaluation (Understanding the Trade-offs)
- Summary & Discussion
Slide Deck
Key Takeaways
- CPU scheduling is essential for managing concurrent processes and balancing various system performance criteria (e.g., CPU utilization, throughput, turnaround, waiting, response time, fairness).
- FCFS is simple but can suffer from the convoy effect and high average waiting times.
- SJF (including SRTF) is theoretically optimal for average waiting time but impractical due to the need for future burst time prediction and prone to starvation.
- Round Robin provides fairness and good response time for interactive systems but introduces context switch overhead, highly dependent on the time quantum.
- No single scheduling algorithm is perfect; understanding their trade-offs is crucial for OS design.