 Hello everyone, today we are going to learn about process scheduling. The learning outcome of this session are student will be able to demonstrate how process scheduling takes place, list and explain different types of scheduler, differentiate between types of scheduler. The objective of multi-programming is to maximize the CPU utilization. For this purpose, number of processes must be present in the system. Whenever new process enters into the system, that process is added into the job queue. Job queue contains all processes present in the system. The processes which are ready for execution and present in memory are kept in ready queue. Ready queue is represented as a linked list which contains two pointer head and tail. Head points to the first PCB and tail points to the last PCB and each PCB in the system points to its next PCB. Along with ready queue, number of device queue are present in the system. As shown here, we have magnetic device queue for two units, disk queue for one unit and terminal device queue for one unit. So as shown here, the processes can wait for a disk. As shown here, the ready queue contains two processes that is P7 and P2 while the process P3, P14 and P6 are waiting for the device disk. Common representation of process scheduling is queuing diagram. In queuing diagram, each rectangular box represents queue. Circle represents the resource that serve the queue. Ellipse represents the processes. Arrow represents the flow of the process in the system. Another new process enters into the system that process is added into the ready queue. Then scheduler selects the process for execution and give that process to the CPU. During execution, the process may wait for input-output event. Then that process entered from ready state to waiting state and process can wait for IO request queue. This IO request queue is a device queue. Once IO completes, process can again enter into the ready queue. Similarly, if operating system is using round-robin scheduling algorithm, then process may be preempted from the CPU and it can be added into the ready queue when its time slice gets expired. Similarly, during execution, process may execute a fork system call and child process may be created. So that process can wait till the execution of the child. So after child execution, the process can again re-enter into the ready queue. Similarly, during execution, interrupt may occur. If interrupt occur, then again process entered into the waiting state and it service the interrupt. Once interrupt finish, process again entered into the ready queue. All the processes which are preempted from CPU are entered into the ready queue. Then again scheduler selects the process from ready queue and process eventually terminates, means it completes its execution. Now pause the video and think and write the answer for different types of queue used by the processes and also differentiate between ready queue and device queue. Let us see for the answer, there are two types of queue present in the system, ready queue and device queue. Processes uses ready queue along with IO queue, interrupt queue, time slice expire queue and fork queue. Ready queue is the queue where processes are in ready state and waiting for CPU allocation, whereas device queue are queues where processes are in waiting state and waiting for particular IO event. Let us see scheduler. Process migrates between the various scheduling queue throughout its lifetime. Application of these processes is done by appropriate scheduler. There exist three types of scheduler, first short term scheduler, then long term scheduler and medium term scheduler, short term scheduler. Short term scheduler is also called as a CPU scheduler. It selects the processes from among the process that are ready to execute, means the processes which are ready in ready queue. This scheduler is fastest as it selects a new process for CPU frequently. It has less control over degree of multiprogramming. The degree of multiprogramming is termed as the number of process leaving the system is equal to the number of process entering to the system. Short term scheduler is minimal in time sharing operating system. Short term scheduler is CPU scheduler because it takes processes from ready queue and assign it to the CPU. Next type of scheduler is long term scheduler. This scheduler is also called as a job scheduler. This selects the processes from the job pool and loads them into the memory for execution. As we already studied, whenever new process enters into the system, that process is entered into the job pool. Then the processes from the job pool are given into the ready queue. That task is performed by long term scheduler. The speed of long term scheduler is less than CPU scheduler. It controls degree of multiprogramming. We can say that the degree of multiprogramming is stable if number of processes departs from the system is equal to number of processes which arrives into the system. So long term scheduler controls degree of multiprogramming means if it keep track of the number of processes leaving the CPU and then selecting the processes from the job pool and give that processes into the ready queue. Long term scheduler must select a good process mix that is IO bound and CPU bound. Processes are categorized as IO bound process and CPU bound process. The processes which uses maximum time for IO operation are called as IO bound process and the processes which uses maximum time for computation are called as a CPU bound process. So if long term scheduler selects a process of CPU bound then IO queue may remain empty. Similarly, if long term scheduler selects maximum IO bound process then ready queue may remain empty. So this should not happen as the maximum CPU utilization is goal of current operating system. So long term scheduler must select a good proper process mix of the processes. It should select the combination of IO bound and CPU bound processes. Long term scheduler is absent in time sharing operating system. The next type of scheduler is medium term scheduler. Medium term scheduler is also called as a swapper. It removes the processes from memory and stores them on swap device. Speed is in between both that is short term scheduler and long term scheduler. Medium term scheduler reduces degree of multi programming as it selects the processes which are executing in CPU and stores that processes back on swap device. It reduces it automatically reduces the degree of multi programming. It is part of time sharing operating system. The operating system which supports time sharing feature it uses medium term scheduler. Now this is what the schedulers and scheduling queue. As we studied here the processes have different types of queue that is ready queue and different device queues. So this is the role of the different scheduler which takes place between these different types of queue. Whenever new process enters into the system that process is given to the job pool. Then it is the task of long term scheduler to select the processes from job pool and enter it into the ready queue. Then the CPU scheduler which is also called as short term scheduler selects the processes from the ready queue and give that processes for the execution. During execution that processes may be swapped on swap device by medium term scheduler. The swapping of the processes is done based on different criteria. When there is a space again in ready queue then that processes are again re-enter into the ready queue. Once that process re-enter into the ready queue again short term scheduler selects the processes for execution once process finish its execution that process terminates. So this is all about different scheduling queue used by the processes and different types of schedulers. How they play important role in scheduling different processes in the operating system. These are the references. Thank you.