shortest first scheduling

Work in Progress

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
  1. simple average
    • previous runs need to be
  1. exponential average
    • 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