CPU scheduling is a fundamental operating system function to maximize CPU utilization. The techniques of multiprogram or multithread are introduced to keep the CPU running different processes and threads on a time-sharing basis. CPU scheduling is the basis of multiprogramming and multithreaded operating systems.