1. Workload Assumptions


  1. Each job runs for the same amount of time.
  2. All jobs arrive at the same time.
  3. Once started, each job runs to completion.
  4. All jobs only use the CPU (i.e., they perform no I/O)
  5. The run-time of each job is known.

1.1 Metrics

<aside> 💬 Turnaround Time

$$ T_{turnaround} = T_{completion} - T_{arrival} $$

</aside>

<aside> 💬 Response Time

$$ T_{response} = T_{firstrun} - T_{arrival} $$

</aside>

2. First In, First Out (FIFO)


First Come, First Served (FCFS)

<aside> 💬 Convoy Effect - a number of relatively-short potential consumers of a resource get queued behind a heavyweight resource consumer.

</aside>

Loses efficiency when Assumption 1 is relaxed

Problem of FIFO

Problem of FIFO

3. Shortest Job First (SJF)


It runs the shortest job first, then the next shortest, and so on.

Loses efficiency when Assumption 2 is relaxed

SJF With Late Arrivals From B and C

SJF With Late Arrivals From B and C

4. Shortest Time-to-Completion First (STCF)