Short Term Scheduler (STS) apply CPU schedule in ready state. STS will make you to apply one of the CPU scheduling algo in ready state in order to select the process.
When will you apply CPU scheduling?
- When new→Ready- When process is moving from new to ready, the process executed in run state may have less priority compares to newly arrived process and therefore the process has to be selected.
Run→Termination- When process goes to completion, run state is empty and process must be selected for run state.
- Run→Wait- During IO operation, run sate is again empty and selects another process.
- Wait→Ready- If from wait to ready the process has high priority as compared to executed process in run sate, then we have to select the process.
- Run→Ready- Run becomes empty.
Goals of CPU Scheduling
- To minimise (↓) TAT, Average WT
- To ↑ throughput of system and ↑ CPU utilisation.
- Be fair to all processes.