7. Scheduling: Introduction Flashcards

1
Q

What are two basic performance scheduling metrics? What other metric is there?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the first and most basic scheduling algorithms? What problem does it introduce?

A

FIFO. It might introduce a problem of convoy effect, where short-running jobs are queued behind long-running job.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is another basic scheduling algorithms that does well with turnaround time, considering all jobs arrive at the same time? What is its downside?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is it that new schedulers have that schedulers in batch processing system didn’t?

A

Preemptive approach

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the scheduler that fixes an issue with SJF when it has a convoy effect issue? What issues does it have?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the first scheduling algorithm to solve an issue with response time? What is its issue?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly