short processes behind a long process → then long process does I/O, making short processes wait → wait burst time
shortest job first: CPU is allocated to the process having the shortest next-CPU burst time
can predict next burst time by using the length of previous CPU bursts
It is probably optimal scheduling algorithm
Could estimated by using the length of previous CPU bursts
Preemptive scheduling scheme:
for cases 2 and 3, there is a choice for scheduling as processes can be terminated mid-execution, they fight for CPU time
Algorithm:
Shortest Remaining Time First: CPU is allocated to the process closest to completion (execute process with the lowest arrival+burst time at any moment)
amount of time a process has been waiting in the ready queue
minimize Response time: t_serve - t_request (amount of time it takes from when a request was submitted until the first response is produced)
Algorithm evaluation for CPU:
Deterministic: practical comparision using criteria, ex: avg waiting time
simple fast
not generalized to every cases
Queueing models: use probabilistically, i.e., approximate the distribution of CPU and I/O bursts (commonly exponential, and described by mean; poisson distribution)
complex and approximation
Simulation: simulate the computer system state to reflect the activities of the devices, the processes, and the scheduler. Gather statistics indicating algorithm performance