7. Scheduling: Introduction Flashcards
What are two basic performance scheduling metrics? What other metric is there?
Turnaround time (time at which process completed - time at which it arrived) and response time (time at which processes got scheduled - time at which it arrived)
Another metric is fairness metric.
What is the first and most basic scheduling algorithms? What problem does it introduce?
FIFO. It might introduce a problem of convoy effect, where short-running jobs are queued behind long-running job.
What is another basic scheduling algorithms that does well with turnaround time, considering all jobs arrive at the same time? What is its downside?
SJF (Shortest Job First), as name suggest, it runs first the job which is shortest. If we relax an assumption that jobs arrive at the same time, it also struggles with a convoy effect
What is it that new schedulers have that schedulers in batch processing system didn’t?
Preemptive approach
What is the scheduler that fixes an issue with SJF when it has a convoy effect issue? What issues does it have?
STCF (Shortest-Time-to-Completion-First). It fixes an issue by adding a preemptive logic so it can preempt longer processes and let shorter ones run. The downside of this scheduler (as with FIFO and SJF) is low response time.
What is the first scheduling algorithm to solve an issue with response time? What is its issue?
Round-Robin or time-slicing scheduler. It runs a job for a time slice and then switched to another. Time slice has to be a multiple of timer interrupt.
It results in bad turnaround time metric and the time slice value has to be picked carefully. Basically any scheduler that is fair introduces bad turnaround time.