What are Disk Scheduling Algorithms?

A process needs two type of time, CPU time and IO time. For I/O, it requests the Operating system to access the disk.However, the operating system must be fare enough to satisfy each request and at the same time, operating system must maintain the efficiency and speed of process execution.The technique that operating system uses to determine the request which is to be satisfied next is called disk scheduling.Disk scheduling is done by operating systems to schedule I/O requests arriving for the disk. Disk scheduling is also known as I/O Scheduling.

disk
  1. Seek Time -
    Seek time is the time taken in locating the disk arm to a specified track where the read/write request will be satisfied.

  2. Rotational Latency -
    It is the time taken by the desired sector to rotate itself to the position from where it can access the R/W heads.

  3. Transfer Time -
    It is the time taken to transfer the data.

  4. Disk Access Time -
    Disk access time is given as,
    Disk Access Time = Rotational Latency + Seek Time + Transfer Time

  5. Disk Response Time: -
    It is the average of time spent by each request waiting for the IO operation.


SSTF DISK SCHEDULING ALGORITHM

SSTF (Shortest Seek Time First) is a disk scheduling algorithm used in operating systems. It is designed to reduce the total seek time of the disk arm, which is the time taken to move the disk arm to the track containing the next requested sector. The algorithm selects the request that is closest to the current position of the disk arm and services it first. SSTF is a variation of the FCFS (First-Come-First-Served) algorithm, which serves I/O requests in the order they arrive. FCFS can lead to longer seek times and reduced performance due to the waiting time of requests that are located far from the current position of the disk arm. SSTF reduces this waiting time by selecting the request that is closest to the current position of the disk arm, thereby minimizing seek time and maximizing performance. The SSTF algorithm maintains a queue of requests waiting to be serviced, with the closest request being serviced first. When a request is completed, the algorithm selects the next request from the queue that is closest to the current position of the disk arm. This process continues until all the requests in the queue have been serviced.

ADVANTAGES OF SSTF DISK SCHEDULING ALGORITHM

DISADVANTAGES OF SSTF DISK SCHEDULING ALGORITHM

Run Algorithm Back Home