CPU scheduling is a process that allows a process to use the CPU, while the execution of any other process is
on hold(in waiting state) due to unavailability of any resource like I/O etc, thereby making full use of CPU. The aim of CPU scheduling is to make the system efficient, fast and fair.
Whenever the CPU becomes inactive, the operating system must select one of the processes in the ready queue to be executed. The selection process is done by the short-term scheduler (or the CPU scheduler). The scheduler selects from among the processes in memory that are ready to execute, and allocates the CPU to one of them.