What CPU Scheduling
A Multi Programming operating system is designed to process more than one task at a time. A major task of an operating system is to manage a collection of processes. In some cases, a single process may consist of a set of individual threads. In both situations, a system with a single CPU or a multi-processor system with fewer CPU s than processes has to divide CPU time among the different processes/threads that are competing to use it. This process is called CPU scheduling. It is important, Because it can have a big effect on resource utilization and the overall performance of the system.
CPU scheduling is the task of selecting a waiting process from the ready queue and allocating the CPU to it. When more than one process is runable, the operating system must decide which one first. The part of the operating system concerned with this decision is called the scheduler, and algorithm it uses is called the scheduling algorithm. There are two types scheduler: Long term scheduler and Short term scheduler.