Please enable JavaScript.
Coggle requires JavaScript to display documents.
The 5 Types Of Processor Scheduling :spiral_calendar_pad: (What is…
The 5 Types Of Processor Scheduling :spiral_calendar_pad:
What is processor scheduling? :stopwatch:
A
scheduler
is used in
multitasking
and
multi-user
environments and it manages which process to execute next and how much
time
the process can execute for.
The scheduler is necessary to
maximise throughput
, be
fair
to all users on a
multi-user system
, provide
acceptable response time
to all users and ensures
hardware resource
are kept as busy as possible.
Preemption
:hand: is is the act of temporarily interrupting a task being carried out by a computer system and resuming the task later.
These 5 ways of scheduling are sorted in most fair first.
Round Robin :bird:
The operating systems sets up an
interval timer
to generate interrupts at specific times :mantelpiece_clock:. Each process is given a maximum length of processing time, called a '
time slice
' or a '
quantum
:cake: . If a process runs out of processing time, or a higher priority interrupt occurs, it is put back into the ready queue. This dispatcher then give the CPU the next proceeds. This is
preemptive
.
Round Robin is the
fairest
but the most
inefficient
. it does guarantee a responsible response time to all users in a system, and some systems allow high priority jobs to have more than one consecutive time slice.
First Come First Serve :squid::squid::squid:
The first job in the queue is the first to enter the
running state
. This is not
preemptive
.
This may not be very efficient since long processes can cause the others to wait a long time. There is
no system of priorities
.
Shortest Job First :chicken: :chicken: :hatched_chick:
The jobs are sorted int the ready queue according to the estimated processing time. This means that
the shortest job will be processed first
. This is
not preemptive
.
Provided that the system can calculate estimated processing times, it will
maximise throughput
.
Shortest jobs first can be used in a University :school:, where students can get their short programmes run quickly before larger research and administration programs which are not time critical, which would otherwise make them longer to complete.
Shortest remaining time :penguin: :recycle:
Firstly, the
ready queue
is sorted in order of the estimated processing time needed (just like in SJF). However, if a process that arrives has a shorter time to complete than the process that is currently running, the shorted process will move to the running state. This is basically
preemptive
version of SJF.
Although this
maximises throughput
, longer processes may go into '
starvation
' as the shorter ones keep coming. The system also needs to have knowledge on how long a job will take (the user has to estimate its job time :thinking_face:).
This is used for
batch jobs
:money_with_wings:or jobs that
run regularly
such as
payroll
which are usually performed overnight,
scientific
or
commercial jobs
.
Multi-level feedback queue :pancakes:
This is where
several ready queues
with
different scheduling algorithms
are used. Jobs are allowed to move between queues as their priorities change. This is
preemptive
.
This is considered to
most efficient
way since it maximises processor use, but it is only used in
modern operating systems
. The algorithms used in MFQ usually give preference short processes and I/O bound processes and sort processes into categories based on their need for the processor.
A real life example of this is when a user is trying to print something :printer:. The multi-level feedback queue tries to keep the input or output devise as busy as possible to avoid a
bottleneck
occurring when several programs suddenly need to send data to the printer, because the I/O has a slower processing speed. So,
whilst one job is printing, other jobs can use the processor
.
Key Terms :bookmark:
Backing Store Management:
This is
where files and applications are kept
before they are transferred into the main memory to be used by the CPU. The operating system needs to know where the files are stored so that they can be
quickly accessed
and it needs to know which area of
storage is free
so that new files and applications can be saved. Most operating systems usually have a
file management
system to enable users to move and delete files and protect others from unauthorised access.
Peripheral Management:
:check: This is the process where the operating system checks an input/ output device is switched on, is online or that it is the correct device.
The Buffer:
:tornado:An area where the data that is not in use is put in so that the CPU can continue with another task. The buffer compensate for the
difference in speed
between in an I/O device and the CPU.