The document discusses scheduling criteria in operating systems, emphasizing CPU utilization, throughput, turnaround time, and waiting time. It outlines the optimization goals for scheduling algorithms, including maximizing CPU utilization and throughput while minimizing turnaround and waiting times. Additionally, it describes the types of schedulers: long-term, medium-term, and short-term, detailing their functions and importance in managing process execution in a multiprogramming environment.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
7 views
OS_07
The document discusses scheduling criteria in operating systems, emphasizing CPU utilization, throughput, turnaround time, and waiting time. It outlines the optimization goals for scheduling algorithms, including maximizing CPU utilization and throughput while minimizing turnaround and waiting times. Additionally, it describes the types of schedulers: long-term, medium-term, and short-term, detailing their functions and importance in managing process execution in a multiprogramming environment.
• Thegoal of a scheduling algorithm is to identify the process
whose selection will result in the best possible system performance. • CPU Utilization: • CPU utilization is the average fraction of time during which the processor is busy. • The level of CPU utilization depends on the load on the system. • CPU utilization may range from 0 to 100%. Throughput:
• Itrefers to the number of processes the system can
execute in a period of time. • For long processes, this rate may be 1 process per hour. • For short processes, throughput may be 10 processes per second. • Thus, evaluation of throughput depends on the average length of a process. Turnaround Time:
• This is the interval of time between the submission of
a process and its completion. • Thus,turnaround time is an average period of time it takes a process to execute. • Turnaround time includes actual execution time plus time spent waiting for resources and doing I/O. Waiting Time:
• Itis the average period of time a process spends
waiting. • Waiting time can be expressed as W(x) = T(x) – x
where, W(x) is the waiting time
T(x) is the turnaround time x is the actual execution time. Scheduling Algorithm Optimization Criteria
The optimization criteria is:
Max. CPU Utilization Max. Throughput Min. Turnaround Time Min. Waiting Time Min. Response Time CPU Scheduling • Schedulingrefers to selecting a process, from many ready processes, that is to be next executed on CPU. • In multiprogramming environment, multiple processes are kept in main memory. • When one process has to wait for I/O completion, operating system takes the CPU from that process and assigns it to another process. • Inthis way, CPU is never idle and has some process to work on. Scheduler and its Types • Scheduler is an operating system module that selects the next job or process to be assigned to CPU. • Thus, scheduler selects one of the many processes in memory that are ready to execute and allocates CPU to it. • Types of Scheduler: Scheduler has three types. 1)Long term scheduler 2)Medium term scheduler 3)Short term scheduler Long Term Scheduler • Long Term Scheduler selects the processes from secondary storage and loads them into memory for execution. • It is called “long term” because the time for which the scheduling is valid is long. • The frequency of execution of a long term scheduler is usually low, as there may be minutes between the creation of new processes in the system. • The primary objective of long term scheduler is to control the “degree of multiprogramming”. • Degree of multiprogramming refers to the total number of processes present in the memory. • Ifthe degree of multiprogramming is stable, then the average rate of process creation is equal to the average terminate rate. • This scheduler shows the best performance by selecting the good mixture of I/O bound and CPU bound processes. • I/O bound processes are those that spend most of their time in I/O. • CPU bound processes are those that spend most of their time in computations. Medium Term Scheduler • Themedium term scheduler is required at the time when a swapped-out process is to be brought into pool of ready processes. • A running process may be suspended because of I/O request. • Such a suspended process is then removed from main memory and stored in secondary memory. • Thisis done because there is a limit on the number of active processes that can reside in main memory. • Therefore, a suspended process is swapped-out from main memory. • At some later time, the process can be swapped-in into the main memory. Short Term Scheduler • Shortterm scheduler selects one process from many ready processes that are residing in main memory and allocates CPU to one of them. • Thus,it handles the scheduling of the processes that are in ready state. • Short term scheduler is also known as CPU Scheduler. • As compared to long term scheduler, a short term scheduler has to work very often. • The frequency of execution of short term scheduler is high. • It must select a new process for CPU frequently.