CPU Scheduling Criteria in OS
What is CPU scheduling?
CPU Scheduling is a process of determining which process will own CPU for execution while another process is in the waiting state.
CPU scheduling aims to make the system efficient, quick, and unbiased.
Types of CPU scheduling:
There are two types of scheduling methods:
- Preemptive scheduling
In this scheduling, tasks are assigned with their priorities. Sometimes the lower priority task will be held till the high priority task finishes its execution and resume thereafter.
- Non-preemptive scheduling
In this scheduling, the CPU is assigned to a specific process. This method is used for various hardware platforms because it doesn’t need any additional hardware.
CPU Scheduling criteria:
CPU scheduling criteria is as follows:
- CPU Utilization
The main objective of CPU scheduling algorithm is to keep the CPU busy. CPU utilization varies from 49% to 90% depending on the load upon the system.
- Throughput
Throughput is the number of processes being executed and completed per unit time. Throughput varies depending on the length of each process.
- Turnaround time
The time elapsed from the time of submission of a process to the time of completion is known as the turnaround time. It is the total time spent by the system on waiting and executing.
- Response time
Response time is the time taken from the submission of a process request until the first response is produced.
- Waiting time
Waiting time is the time spent by the process in the waiting queue.
Scheduling criteria of Operating system