CPU scheduling

How the scheduler picks the next process: the measures that judge it, FCFS, SJF and HRRN, and the preemptive methods SRTF, priority and round robin.

About 5 hours of study

Learning objectives

Lessons

  1. 1

    CPU scheduling: FCFS and SJF

    How the scheduler picks the next process, the measures that judge it (turnaround, waiting and response time), first come first served, and shortest job first.

  2. 2

    Round robin, SRTF and priority Intermediate

    Preemptive scheduling with the timer: shortest remaining time first, priority scheduling with aging, round robin and the choice of time quantum, and the multilevel feedback queue, with Gantt charts.

Module practice

Module quiz

1. A process arrives at 3, needs 4 units of CPU, and finishes at 15. What is its waiting time?
2. Which problem does FCFS suffer from when one long process arrives first?
3. Which non-preemptive algorithm gives the smallest average waiting time?
4. What happens to round robin when the quantum becomes very large?
5. What is the response ratio of a process that has waited 6 units and needs 3 units of CPU?
6. In SRTF, a process with 7 units left is running when a new process with burst 4 arrives. What happens?

‹ How an operating system worksSynchronization and deadlock ›