SUBMITTED
TO:
Dr. Sonal Jain
SUBMITTED BY:
Chandrika Singh
Ritu Sharma
Riya Choudhary
Introduction
Incomputer science,schedulingis the
method by whichprocessesor
dataflowsare given access to system
resources. This is usually done to share
system resources effectively or achieve a
targetquality of service. The need for a
scheduling algorithm arises from the
requirement for most modern systems to
performmultitasking(executing more than
one process at a time).
Scheduling Levels
Long-term scheduling
Medium-term scheduling
Short-term scheduling
Long-term scheduling
Long-term scheduling is done when
a new process is created. It initiates
processes and so controls the degree
of multi-programming (number of
processes in memory).
Preemptive
Currently running process may be
interrupted and moved to the ready
state by the OS.
User-Based Scheduling
Goals:
Turnaround time time to execute a process:
from start to completion i.e. sum of
Waiting time,
Executing time
Blocked waiting for an event, for example waiting
for I/O
System-Based Scheduling
Goals:
Throughput number of processes
that complete their execution per
unit time
CPU utilization percent time CPU is
busy
Fairness all processes should be
treated equal, until priority is set
Balance there should be a balance
between I/O bound and CPU bound
processes.
Shortest-Job-First
Scheduling, SJF
The idea behind the SJF algorithm is to
pick the quickest fastest little job that
needs to be done, get it out of the way
first, and then pick the next smallest
fastest job to do next.
Technically this algorithm picks a
process based on the next shortestCPU
burst, not the overall process time.
Priority Scheduling
The processes are executed according to
the priority.
1.Priority number based scheduling
In it preference is given to the processes,
based on a priority number assigned to it.
2.Shortest Process Next(SPN)
The process with the shortest execution
time is executed first . It is non-preemptive scheduling algorithm.
Multilevel Feedback-Queue
Scheduling
Multilevel feedback queue scheduling is similar to the ordinary
multilevel queue scheduling described above, except jobs may be
moved from one queue to another for a variety of reasons:
If the characteristics of a job change between CPU-intensive and I/O intensive,
then it may be appropriate to switch a job from one queue to another.
Aging can also be incorporated, so that a job that has waited for a long time
can get bumped up into a higher priority queue for a while.
Fair-share scheduling
Fair-share schedulingis a
scheduling strategy for
computeroperating systemsin which
theCPUusage is equally distributed
among system users or groups, as
opposed to equal distribution among
processes.
Lottery scheduling
In Lottery Scheduling processes are each assigned
some number oflottery tickets, and the scheduler draws
a random ticket to select the next process. The
distribution of tickets need not be uniform; granting a
process more tickets provides it a relative higher chance
of selection.
Lottery scheduling solves the problem ofstarvation.
Giving each process at least one lottery ticket guarantees
that it has non-zero probability of being selected at each
scheduling operation.
There are two good features of lottery scheduling:
o Ticket transfer
o Ticket inflation