- A we know that one of the responsibilities of the Operating System is to use all hardware resources efficiently.
- To achieve this, a fast access time and disk bandwidth is required.
- The access time is affected by two major components: seek time and rotation latency.
The seek time is the time taken for the disk arm to move the disk head 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.
Bandwidth is the total no of bytes transferred directly between the first request for service and the completion of last transfer.
- Both access time and Bandwidth can be improved by scheduling the servicing of disk input output request in an efficient manner.
- A system call to the Operating System is made whenever any process requires performing input output to or from the disk.
- This request specifies the following information.
- What type of operation is it? Input or output?
- What is the disk address to transfer?
- What the memory address for transfer is?
- What no. of bytes is to be transfer?
- The request can be serviced immediately if desired disk drive and controller are available
- If the drive or controller is busy, any new request for service will be placed on the waiting queue for that drive.
- For a multi-programming system the disk queue may have often several pending request.
- Thus when one request is completed the Operating System selected the next service which is pending.
- There are various algorithms available for the disk scheduling.
- Some commonly used disk scheduling algorithms are as follow:
- First Come First Serve (FCFS)
- Shortest Seek Time First (SSTF)
- Scan Algorithm
- C-Scan Algorithm
- Look and C-Look Algorithm
- We will try to understand each of these algorithms in our up coming posts. so stay tuned.