0% found this document useful (0 votes)
16 views

CPU Scheduling Criteria

...........

Uploaded by

technicaljach
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

CPU Scheduling Criteria

...........

Uploaded by

technicaljach
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CPU Scheduling Criteria

GeeksforGeeks

CPU scheduling is essential for the system’s performance and ensures that processes are executed
correctly and on time. Different CPU scheduling algorithms have other properties and the choice of a
particular algorithm depends on various factors. Many criteria have been suggested for comparing CPU
scheduling algorithms.

What is CPU scheduling?


CPU Scheduling is a process that allows one process to use the CPU while another process is delayed due
to unavailability of any resources such as I / O etc, thus making full use of the CPU. In short, CPU
scheduling decides the order and priority of the processes to run and allocates the CPU time based on
various parameters such as CPU usage, throughput, turnaround, waiting time, and response time. The
purpose of CPU Scheduling is to make the system more efficient, faster, and fairer.

Criteria of CPU Scheduling


CPU scheduling criteria, such as turnaround time, waiting time, and throughput, are essential metrics used
to evaluate the efficiency of scheduling algorithms. For a deeper understanding of how these criteria are
applied in real-world scenarios, the GATE CS and IT – 2025 course offers detailed lessons on CPU
scheduling algorithms, helping students master these concepts through practical examples and exercises

Now let’s discuss CPU Scheduling has several criteria. Some of them are mentioned below.

1. CPU utilization

The main objective of any CPU scheduling algorithm is to keep the CPU as busy as possible.
Theoretically, CPU utilization can range from 0 to 100 but in a real-time system, it varies from 40 to 90
percent depending on the load upon the system.

2. Throughput

A measure of the work done by the CPU is the number of processes being executed and completed per
unit of time. This is called throughput. The throughput may vary depending on the length or duration of
the processes.
CPU Scheduling Criteria

3. Turnaround Time

For a particular process, an important criterion is how long it takes to execute that process. The time
elapsed from the time of submission of a process to the time of completion is known as the turnaround
time. Turn-around time is the sum of times spent waiting to get into memory, waiting in the ready queue,
executing in CPU, and waiting for I/O.

Turn Around Time = Completion Time – Arrival Time.

4. Waiting Time

A scheduling algorithm does not affect the time required to complete the process once it starts execution.
It only affects the waiting time of a process i.e. time spent by a process waiting in the ready queue.

Waiting Time = Turnaround Time – Burst Time.

5. Response Time

In an interactive system, turn-around time is not the best criterion. A process may produce some output
fairly early and continue computing new results while previous results are being output to the user. Thus
another criterion is the time taken from submission of the process of the request until the first response is
produced. This measure is called response time.

Response Time = CPU Allocation Time(when the CPU was allocated for the first) – Arrival
Time

6. Completion Time

The completion time is the time when the process stops executing, which means that the process has
completed its burst time and is completely executed.

7. Priority
If the operating system assigns priorities to processes, the scheduling mechanism should favor the higher-
priority processes.

8. Predictability

A given process always should run in about the same amount of time under a similar system load.

Importance of Selecting the Right CPU Scheduling Algorithm for


Specific Situations
It is important to choose the correct CPU scheduling algorithm because different algorithms have different
priorities for different CPU scheduling criteria.Different algorithms have different strengths and
weaknesses. Choosing the wrong CPU scheduling algorithm in a given situation can result in suboptimal
performance of the system.

Example: Here are some examples of CPU scheduling algorithms that work well in different situations.

Round Robin scheduling algorithm works well in a time-sharing system where tasks have to be completed
in a short period of time. SJF scheduling algorithm works best in a batch processing system where shorter
jobs have to be completed first in order to increase throughput.Priority scheduling algorithm works better
in a real-time system where certain tasks have to be prioritized so that they can be completed in a timely
manner.

Factors Influencing CPU Scheduling Algorithms


There are many factors that influence the choice of CPU scheduling algorithm. Some of them are listed
below.

• The number of processes.


• The processing time required.
• The urgency of tasks.
• The system requirements.

Selecting the correct algorithm will ensure that the system will use system resources efficiently, increase
productivity, and improve user satisfaction.

CPU Scheduling Algorithms


There are several CPU Scheduling Algorithms, that are listed below.

• First Come First Served (FCFS)


• Shortest Job First (SJF)
• Longest Job First (LJF)
• Priority Scheduling
• Round Robin (RR)
• Shortest Remaining Time First (SRTF)
• Longest Remaining Time First (LRTF)

Conclusion
In Conclusion, CPU scheduling criteria play an important role in improving system performance. CPU
scheduling techniques encourage efficient use of system resource and effective task processing by
analysing and prioritising criteria such as CPU Utilization, Throughput, Turnaround Time, Waiting Time,
and Response Time. Selecting the appropriate algorithm for a given situation is crucial for increasing
system efficiency and production.

Question for Practice


Which of the following process scheduling algorithm may lead to starvation?

(A) FIFO

(B) Round Robin

(C) Shortest Job Next

(D) None of the above


Correct option is (C)
Explanation: Shortest job next may lead to process starvation for processes which will require
a long time to complete if short processes are continually added.

Frequently Asked Question on CPU Scheduling Criteria – FAQs


How does CPU utilization affect scheduling algorithms?

CPU utilization indicates the efficiency of utilizing the CPU’s processing power. Scheduling
algorithms aim to keep the CPU as busy as possible to achieve high utilization. However,
excessively high CPU utilization can lead to poor system responsiveness and potential
resource contention.

What is throughput in the context of scheduling algorithms?

Throughput refers to the number of processes that are completed and leave the system within
a given time frame. Scheduling algorithms that maximize throughput often prioritize short
processes or those that require minimal CPU time, allowing more processes to be completed
in a given period.

Why is turnaround time an important criterion for scheduling algorithms?

Turnaround time measures the overall time a process takes to complete, from submission to
termination. Lower turnaround time indicates efficient process execution. Scheduling
algorithms that minimize turnaround time generally prioritize processes with shorter burst
times or high priority.

What trade-offs are involved in selecting a scheduling algorithm?

Some trade-off may include that the improving in throughput may lead to increment in
waiting time.

Improve

You might also like