Shortest-Job-First (SJF) Scheduling:
- Associate with each process the length of its next CPU burst.Use these lengths to schedule the process with the shortest time
- Two schemes:
- l nonpreemptive – once CPU given to the process it cannot be preempted until completes its CPU burst
- l preemptive – if a new process arrives with CPU burst length less than remaining time of current executing process, preempt. This scheme is know as the Shortest-Remaining-Time-First (SRTF)
- SJF is optimal – gives minimum average waiting time for a given set of processes
No comments:
Post a Comment