Operating Systems
Unit 3: CPU Scheduling
From FCFS to Multilevel Feedback Queues โ master every scheduling algorithm with fully worked numerical problems, Gantt charts, and step-by-step solutions.
โฑ๏ธ 8 hrs theory + 6 hrs lab | ๐ฐ Earning Potential: โน5,000โโน20,000/month | ๐ 30 MCQs (Bloom's Mapped)
๐ผ Jobs this unlocks: Performance Engineer (โน6โ10 LPA) | SRE โ Site Reliability Engineer (โน8โ15 LPA) | Systems Programmer (โน7โ12 LPA)
Opening Hook โ The 60-Second Window That Breaks India's Internet
๐ IRCTC Tatkal Booking โ 12 Lakh Users, 60 Seconds Each
Every morning at 10:00 AM sharp, over 12 lakh (1.2 million) users simultaneously hit the IRCTC servers trying to book Tatkal tickets. Each user gets roughly a 60-second window before their session times out. The server must decide: Who gets CPU time first? How long? What if someone's request is more urgent?
This is CPU scheduling in action. IRCTC uses a variant of Round Robin scheduling โ each user request gets a fixed time quantum, ensuring no single request hogs the server. Priority queues ensure Tatkal requests (higher revenue) get processed before general waitlist queries.
The result? On a good day, 15,000 tickets are booked per minute. On a bad day? The entire system crashes because the scheduler couldn't handle the load. The difference between success and failure is the scheduling algorithm.
Could YOU have designed a better scheduler? By the end of this chapter, you'll know exactly how โ and you'll be able to prove it with numbers.
Learning Outcomes โ Bloom's Taxonomy Mapped
| Bloom's Level | Learning Outcome |
|---|---|
| ๐ต Remember | Define scheduling criteria (CPU utilization, throughput, turnaround time, waiting time, response time) and list all 7 scheduling algorithms |
| ๐ต Understand | Explain the difference between preemptive and non-preemptive scheduling, and describe the convoy effect, starvation, and aging |
| ๐ข Apply | Solve numerical problems for FCFS, SJF, SRTF, Priority, and Round Robin โ compute Gantt charts, waiting time, and turnaround time |
| ๐ข Analyze | Compare scheduling algorithms on the basis of average waiting time, throughput, and fairness using computed results |
| ๐ Evaluate | Evaluate which scheduling algorithm is optimal for given real-world scenarios (e.g., IRCTC, trading systems, batch processing) |
| ๐ Create | Design a multilevel feedback queue scheduling policy for a given workload mix and implement a CPU scheduler simulator in Python |