Chapter 6 Processor Scheduling
Chapter 6 Processor Scheduling
SCHEDULING
Processor Scheduling
Process scheduling queues help you to maintain a
distinct queue for each and every process states and
their PCBs. All the processes of the same execution state
are placed in the same queue. Therefore, whenever the
state of a process is modified, its PCB needs to be
unlinked from its existing queue and moved to the new
state queue.
Processor Scheduling
The important objectives of Process scheduling are:
1.Maximizes the number of interactive users within
acceptable response times.
2.Achieves a balance between response and utilization.
3.Avoids indefinite postponement and enforce priorities.
4.It also should give priority or preference to the processes
holding the key resources.
Processor Scheduling
• Processor scheduling is the task of selecting a waiting
process from the ready queue and allocating the
processor to it in the running queue.
• We will consider three scheduling levels
i. High-level /long-term/job scheduling
ii. Intermediate-level scheduling
iii. Low-level/short-term scheduling
High-level Scheduling
• Sometimes called job scheduling or long-term scheduling
determines which jobs the system allows to compete actively
for system resources by selecting processes from the process
pool (usually on disk) and loads them into memory.
• This level determines the total number of processes in a
system at a given time i.e. degree of multiprogramming
• Entry of too many processes at a time saturate the system’s
resources, leading to poor performance
High-level Scheduling
• This scheduler regulates the program and selects processes
from the queue and loads them into memory for execution.
• It also regulates the degree of multi-programming.
• The main goal of this type of scheduler is to offer a balanced
mix of jobs, like Processor, I/O jobs., that allows managing
multiprogramming.
Intermediate-level Scheduling
• Medium-term scheduling is an important part of swapping. It enables
you to handle the swapped out-processes.
• In this scheduler, a running process can become suspended if/when it
makes an I/O request. A suspended process cannot make any
progress towards completion. To remove the process from memory
and make space for other processes, the suspended process should
be moved to secondary storage.
Intermediate-level Scheduling
• Determines which processes should be allowed to compete for
processors.
• This policy temporarily suspends and resumes processes to achieve
smooth system operation
• Helps realize system-wide performance goals
Low-level Scheduling
• Also known as CPU scheduler, the main goal of this scheduler is to
boost the system performance according to set criteria.
• This helps you to select from a group of processes that are ready to
execute and allocates CPU to one of them. The dispatcher gives
control of the CPU to the process selected by the short term
scheduler.
Low-level Scheduling
• Determines which active process the system will assign to a processor
when one next become available
• Assigns priority to each process, reflecting its importance i.e. the
more important a process, the more likely the scheduling policy is to
select it to execute next. It selects processes from the ready queue
• Priorities may be statically assigned or be changed dynamically during
the course of execution.
Long-Term Vs. Short Term Vs. Medium-Term
Long-Term Short-Term Medium-Term
Long term is also known as a job Short term is also known as CPU Medium-term is also called swapping
scheduler scheduler scheduler.