shortest first scheduling
Concept
Shortest Job First(SJF)
- select task with smallest total CPU time
- need to know CPU time required in advance
- minimize average waiting time
Predicting CPU time
- guess the future CPU time by the previous CPU-bound phases
- simple average
previous runs need to be
- exponential average
- full history is stored in one value
- full history is stored in one value
Shortest Remaining Time(SRT)
- variation of SJF to handle new jobs dynamically
- new jobs with shorter remaining time can preempt current job
- serve short job first even if it arrives late