You are on page 1of 13

Comparative Difference between various Disk Scheduling

Algorithms

FCFS SSTF SCAN C-SCAN LOOK

First Shortest Elevator Circular LOOK


Come- Seek Time Algorithm SCAN
First Serve First

It services Selects the The disk The arm of The arm of


the IO disk I/O arm moves the disk the disk stops
requests request into a moves in a moving
in the which particular particular inwards or
order in requires the direction till direction outwards
FCFS SSTF SCAN C-SCAN LOOK

which they least disk the end, servicing when no


arrive. arm satisfying requests more
movement all the until it requests in
from its requests reaches that direction
current coming in the last exist.
position its path, cylinder,
regardless and then it then it
of the turns back jumps to
direction. and moves the last
in the cylinder of
reverse the
direction opposite
satisfying direction
FCFS SSTF SCAN C-SCAN LOOK

requests without
coming in servicing
its path. any
request
then it
turns back
and starts
moving in
that
direction
servicing
the
FCFS SSTF SCAN C-SCAN LOOK

remaining
requests.

There is It may Starvation It will never It avoids


no cause is still cause starvation of
starvation starvation possible in starvation any requests.
in this for some this to any
algorithm, requests. scheduling. requests.
every
request is
serviced.
FCFS SSTF SCAN C-SCAN LOOK

The It reduces It offers an It offers an It offers a


scheme the total improved improved more
does not seek time variance of variance of improved
optimize as seek time seek time variance of
the seek compared as as seek time as
time. to FCFS. compared compared compared to
to SSTF. to SCAN. C-SCAN.

It is a Under a Under a Under


reasonable light load, heavy load, extremely
solution for SCAN C-SCAN heavy load,
batch
FCFS SSTF SCAN C-SCAN LOOK

This is processing policy is policy is LOOK policy


acceptable systems best. best. is best.
when the but not
load on a applicable
disk is for
light and interactive
small systems.
systems
where
efficiency
is not
important.
FCFS SSTF SCAN C-SCAN LOOK

May not High Low Uniform Very low


provide variance is variance waiting variance
the best present in occurs in time & provided in
possible response & waiting & better waiting &
service in waiting response response response
terms of time. time. time is time.
good provided.
waiting &
response
time.
FCFS SSTF SCAN C-SCAN LOOK

It has It has It has It maintains It gives


extremely higher higher a high level extremely
low throughput throughput of high
throughput than FCFS. than throughput throughput by
due to FCFS, by avoiding avoiding
lengthy SSTF. discriminati unnecessary
seeks. on against seek
the operation.
innermost
and
outermost
cylinders.
FCFS SSTF SCAN C-SCAN LOOK

Disadvant Disadvant Disadvant Disadvant Disadvantag


ages: The ages: Ther ages: Lon ages: Mor es: Overhead
short e is an g waiting e seek of finding the
processes overhead of time movement end requests
which are finding out occurs for s are is present.
FCFS SSTF SCAN C-SCAN LOOK

at the the closest the caused in Cylinders that


back of request. cylinders C-SCAN are just
the queue Frequent which are compared visited by
have to switching of just visited to SCAN Head have to
wait for the Head’s by the Algorithm. wait for a
the long direction head. In In C-SCAN long time.
process at slows the SCAN the even if
the front to algorithm. head there are
finish moves till no
the end of requests
the disk left to be
despite the serviced
absence of the Head
FCFS SSTF SCAN C-SCAN LOOK

requests to will still


be travel to
serviced. the end of
the disk.

Example:
Consider a disk with 200 tracks (0-199) and that the disk request
queue has random requests in it. The following track requests for
I/O to blocks on cylinders:
60, 143, 15, 185, 85, 120, 33, 28, 146
Consider that the read/write head is initially at cylinder 70.
Compute the total head movements for a 200 track disk (0-199)
FCFS SSTF SCAN C-SCAN LOOK

Total Head Total Head Total Head Total Head Total Head
Movement Movement Movement Movement Movement
s = (70-60) s = (70-60) s = (199- s = (199- s = (185-
+ (143-60) + (85-60) + 70) + (199- 70) + (199- 70) + (185-
+ (143-15) (120-85) + 15)= 313 0) + (60-0) 15)= 285
+ (185-15) (143-120) + cylinders. = 388 cylinders
+ (185-85) (146-143) + cylinders
+ (120-85) (185-146) +
+ (120-33) (185-33) +
+ (33-28) + (33-28) +
(146-28) (28-15)
FCFS SSTF SCAN C-SCAN LOOK

= 736 = 305
cylinders cylinders

You might also like