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

Basic Concepts & Criteria of CPU Scheduling

Basic concepts of CPU Scheduling

Uploaded by

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

Basic Concepts & Criteria of CPU Scheduling

Basic concepts of CPU Scheduling

Uploaded by

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

Basic Concepts

CPU scheduling is the task performed by the CPU that decides the way and order in
which processes should be executed.

Alternating Sequence of CPU And I/O Bursts

CPU Scheduler
 Selects from among the processes in memory that are ready to execute, and
allocates the CPU to one of them.
 CPU scheduling decisions may take place when a process:
1. Switches from running to waiting state.
2. Switches from running to ready state.
3. Switches from waiting to ready.
4. Terminates.
 Scheduling under 1 and 4 is non preemptive.
 All other scheduling is preemptive.

Dispatcher
Dispatcher module gives control of the CPU to the process selected by the
short-term scheduler; this involves:
✦ switching context
✦ switching to user mode
✦ jumping to the proper location in the user program to restart that program
Dispatch latency – time it takes for the dispatcher to stop one process and start another
running.

Criteria of CPU Scheduling


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.

You might also like