2. Disk Scheduling
• The operating system is responsible for using hardware efficiently — for the disk drives,
this means having a fast access time and disk bandwidth.
• Access time has two major components
Seek time is the time for the disk are to move the heads to
• the cylinder containing the desired sector.
• Rotational latency is the additional time waiting for the disk
• to rotate the desired sector to the disk head.
• Minimize seek time
• Seek time ≈ seek distance
• Disk bandwidth is the total number of bytes transferred,
• divided by the total time between the first request for
• service and the completion of the last transfer.
3. Disk Scheduling
• Recall, statistical average seek time is 9 ms
– randomly accessing all over disk
• Multiple requests to disk will arrive while
one is being serviced
• Can drastically reduce average seek time by
intelligent scheduling accesses
4. Elevator Algorithm
• Similar to SSTF
• One major difference
– next job scheduled is closest to current job but
in one particular direction
– all jobs in other direction are put at the end of
the list
• Similar to an elevator
– it goes up first and then comes back down
6. A. Frank - P. Weisberg
Elevator Algorithms
C-LookC-Scan
Scan Look
Go until the
last request
Go until the
last cylinder
Service in only
one direction
Service both
directions
Direction
Go until
• Algorithms based on the common elevator principle.
• Four combinations of Elevator algorithms:
– Service in both directions or in only one direction.
– Go until last cylinder or until last I/O request.
7. Elevator Algorithm
• Avoids starvation
• Provides very good performance
• Still has one major issue
– FAIRNESS
• Jobs in the middle of the disk get serviced
twice as much as jobs at the ends
8. One-Way Elevator Algorithm
• Exactly like elevator algorithm except
scheduling is done in only one direction
– for example, elevator always goes “up”
• This will require one long seek after
finished going up
– have to go back to the beginning
• This is okay because one long seek doesn’t
take very long
– IBM disk: 15 ms from one end to the other
• This long seek is done infrequently