Vadodara Institute of Engineering Active Learning Assignment Sub :- Operating Systems ( 2140702 ) Topic: - Scheduling Definition, objectives and types Presented by:- Kashyap Patel 15CE046 Krishna Patel 15CE047 Maitree Patel 15CE048 Computer Engineering - 1
Content Scheduling definition Scheduling objectives Types of schedulers
Scheduling Scheduling is a process which allows one process to use the CPU while the execution of another process is on hold due to unavailability of any resources. It’s aim is to make system efficient , fast and fair. Criteria for best scheduling algorithm: CPU Utilization : Computer usage of memory and processing resources or amount of work handle by a CPU. Throughput : It is the total number of process completed per unit time.
Response time : Amount time it taken from when a request was submitted until first response is produced is called response time. Turn around time : It is the total amount of time the process executed itself on the CPU. Waiting time : It is the amount of time a process waits to load itself on the CPU. Load average : average number of processes sitting in the ready queue waiting for that turn to get onto CPU. Fairness : All the jobs should get fair chance to get the use of CPU. Efficiency : scheduler should keep the system busy whole time, if CPU and all i/o devices can be kept running all the time more work can be done per second.
S cheduling Objectives When to schedule : When a new process is created , a decision needs to be made whether to run the parent process or child process. A scheduling decision must be made when a process exits. When I/O interrupt occurs , a scheduling decision may be made. Main objective of scheduling is : Be Fair Make the system fast Maximize throughput Increasing the profit. Increasing the output. Maximize number of users receiving acceptible response times. Reducing the manufacturing time. Minimizing the production costs Give better service to processes that have desirable behaviour patterns
Scheduler When a computer is multiprogrammed , it frequently has multiple process or threads competing for the CPU at the same time. This situation occurs whenever two or more of them are simultaneously in the ready state. If only one CPU is available , a choice has to be made which process to run next. The part of the operating system that makes the choice is called the scheduler.
Types of schedulers Schedulers are of 3 types : Long term scheduler Short term scheduler Medium term scheduler
Long term schedulers It is also called job scheduler It determine which program are admitted to a system for processing . It selects process from queue and loads them in to memory for execution . On some system it may not me available or may be minimal . Time sharing operating systems have no long term scheduler. When process changes the state from new to ready, then there is use of long term scheduler.
Short term schedulers It is also called CPU scheduler. Main objective is increasing system performance in accordance with the chosen set of criteria . CPU scheduler selects process among the processes that are ready to execute and allocates CPU to one of them. When process changes the state from ready to running, then there is use of long term scheduler. They are also called as dispatchers. Context switching is done by dispatchers. Faster than long term schedulers .
Dispatchers : It gives control of CPU to the process selected by short term scheduler. This involves switching context , switching of user mode , jumping to proper location in the user program to restart that program . Dispatcher latency : Time taken by dispatcher to stop one process and start another .
Medium term schedulers It is the part of swapping . It removes the processes from memory . A running process may become suspended if it does not get I/O resource needed. In this condition the process is move to the secondary storage until it gets the resources. It is the part of time sharing operating system.
Conclusion From this topic we learn how the scheduler works, and how scheduler allows one process to use the CPU while the execution of another process is on hold due to unavailability of any resources.
References http://staff.um.edu.mt/csta1/courses/lectures/csm202/os8.html https://www.tutorialspoint.com/operating_system/os_process_scheduling.html http://www.studytonight.com/operating-system/cpu-scheduling Book : Modern operating systems by Andrew S.Tanenbaum