There are three types of scheduler:
Long term scheduler
Short term scheduler
Medium term scheduler
1. Long term scheduler: It selects programs from job pool and loads them into the main memory. It controls the degree of multiprogramming. The degree of multiprogramming is the number of processes loaded (existing) into the main memory. System contains I/O bound processes and CPU bound processes. An I/O bound process spends more time for doing I/O operations whereas CPU bound process spends more time in doing computations with the CPU. So It is the responsibility of long term scheduler to balance the system by loading some I/O bound and some CPU bound processed into the main memory. Long term scheduler executes only when a process leaves the system, so it executes less frequently. When long term scheduler selects a process from job pool, the state of process changes from new to ready state.
2. Short term scheduler: It is also known as CPU scheduler. This scheduler selects processes that are ready for execution from the ready queue and allocates the CPU to the selected process. Frequency of execution of short term scheduler is more than other schedulers. When short term scheduler selects a process, the state of process changes from ready to running state.
3.Medium term scheduler: When a process is in running state, due to some interrupt it is blocked. System swaps out blocked process and store it into a blocked and swapped out process queue. When space is available in the main memory, the operating system looks at the list of swapped out but ready processes. The medium term scheduler selects one process from that list and loads it into the ready queue. The job of medium term scheduler is to select a process from swapped out process queue and to load it into the main memory. This scheduler works in close communication with long term scheduler for loading process into the main memory.