OS - Unit 6
OS - Unit 6
Head pointer 53
FCFS (First Come First Served)
FCFS algo serves disk I/O requests in the
order they arrive as shown in figure.
Advantages
Easy to implement
[Fairness]: Every request has same
priority
Preferred when simplicity is crucial
despite its potential inefficiency
Disadvantages
Do not consider underline hardware
characteristics
If requests are far apart we face long
waiting times due to high seek time
Illustration shows total head movement of 640 cylinders.
SSTF (Shortest Seek time first)
Pick the request from the queue with the
minimum seek time from the current head
position as shown in Figure.
Advantages:
By definition reduces total seek time
More efficient than FCFS in minimizing
seek time.
Disadvantages:
Can cause starvation and leads to unfairness
More complex to implement than FCFS.
Advantages:
More efficient than FCFS and SSTF in
terms of overall seek time.
Provides a more uniform wait time.
Disadvantages:
Can still cause long wait times for requests
just missed on the sweep.
More complex to implement than FCFS.
Advantages:
More efficient than C-SCAN as it avoids
unnecessary traversal.
Provides a uniform wait time similar to C-
SCAN.
Disadvantages :
Complex to implement.
May have slightly longer seek times than
SSTF for some requests.
Selecting a Disk-Scheduling Algorithm
SSTF is common and has a natural appeal
SCAN and C-SCAN perform better for systems that place a heavy load on the disk.
Performance depends on the number and types of requests.
Requests for disk service can be influenced by the file-allocation method.
The disk-scheduling algorithm should be written as a separate module of the operating
system, allowing it to be replaced with a different algorithm if necessary.
Either SSTF or LOOK is a reasonable choice for the default algorithm.
Thank You
19