Scheduling Criteria in OS

Learn via video courses
Topics Covered

Overview

There are different CPU scheduling algorithms with different properties. The choice of algorithm is dependent on various different factors such as waiting for time, efficiency, CPU utilization, etc. In this blog, we will learn about Scheduling criteria in OS and its different criteria in detail.

What is scheduling in OS with examples?

Scheduling is a process of allowing one process to use the CPU resources, keeping on hold the execution of another process due to the unavailability of resources CPU. Example:

What are the Scheduling Criteria in OS?

what is scheduling criteria in os

The aim of the scheduling algorithm is to maximize and minimize the following:

Maximize:

  • CPU utilization - It makes sure that the CPU is operating at its peak and is busy.
  • Throughoutput - It is the number of processes that complete their execution per unit of time.

Minimize:

  • Waiting time- It is the amount of waiting time in the queue.
  • Response time- Time retired for generating the first request after submission.
  • Turnaround time- It is the amount of time required to execute a specific process.

Types of Scheduling Criteria in an Operating System

There are different CPU scheduling algorithms with different properties. The choice of algorithm is dependent on various different factors. There are many criteria suggested for comparing CPU schedule algorithms, some of which are:

  • CPU utilization
  • Throughput
  • Turnaround time
  • Waiting time
  • Response time

CPU utilization- The object of any CPU scheduling algorithm is to keep the CPU busy if possible and to maximize its usage. In theory, the range of CPU utilization is in the range of 0 to 100 but in real-time, it is actually 50 to 90% which relies on the system’s load.

Throughput- It is a measure of the work that is done by the CPU which is directly proportional to the number of processes being executed and completed per unit of time. It keeps on varying which relies on the duration or length of processes.

Turnaround time- An important Scheduling criterion in OS for any process is how long it takes to execute a process. A turnaround time is the elapsed from the time of submission to that of completion. It is the summation of time spent waiting to get into the memory, waiting for a queue to be ready, for the I/O process, and for the execution of the CPU. The formula for calculating TurnAroundTime=CompilationtimeArrivaltime.Turn Around Time= Compilation time- Arrival time.

Waiting time- Once the execution starts, the scheduling process does not hinder the time that is required for the completion of the process. The only thing that is affected is the waiting time of the process, i.e the time that is spent by a process waiting in a queue. The formula for calculating KaTeX parse error: Expected 'EOF', got '–' at position 31: …urnaround Time –̲ Burst Time.

Response time- Turnaround time is not considered as the best criterion for comparing scheduling algorithms in an interactive system. Some outputs of the process might produce early while computing other results simultaneously. Another criterion is the time that is taken from process submission to generate the first response. This is called response time and the formula for calculating it is, KaTeX parse error: Expected 'EOF', got '–' at position 79: …for the first) –̲ Arrival Time.

Conclusion

  1. Scheduling is a process of allowing one process to use the CPU resources, keeping on hold the execution of another process due to the unavailability of resources CPU.
  2. Example:
    • First-Come-First-Serve Scheduling, FCFS.
    • Shortest-Job-First Scheduling, SJF.
    • Priority Scheduling.
    • Round Robin Scheduling.
    • Multilevel Queue Scheduling.
    • Multilevel Feedback-Queue Scheduling.
  3. Types of Scheduling criteria in OS
    • CPU utilization
    • Throughput
    • Turnaround time
    • Waiting time
    • Response time