Scheduling Metrics
In order to compare two scheduling policies, we may use metrics to measure.
Turnaround time. The turnaround time of a job (or process) is the duration between when the job arrives at the system and when the job completes.
Preemptive & Non-preemptive
Non-preemptive means that OS would run each job until its completion before considering whether to run a next job.
Non-Preemptive Scheduling
FIFO Scheduling
It’s simple enough. But in the case that short jobs queue behind long jobs, these short jobs will be waiting for too long.
Shortest Job First (SJF)
This scheduling algorithm always runs the shortest job first, greatly reducing the average turnaround time.