Disk

17 Apr 2022 . os .

  • Seek Time

    The time taken to locate the disk arm to a specified track where the data is to be read or write.

  • Rotational Latency

    The time taken by the desired sector of disk to rotate into a position so that it can access the read/write heads.

  • Transfer Time

    The time to transfer the data. It depends on the rotating speed of the disk and number of bytes to be transferred.

Scheduling algrithm

FCFS

Advantages: 

  • Every request gets a fair chance
  • No indefinite postponement

Disadvantages: 

  • Does not try to optimize seek time
  • May not provide the best possible service

SSTF(Shortest Seek Time First)

Advantages: 

  • Average Response Time decreases
  • Throughput increases

Disadvantages: 

  • Overhead to calculate seek time in advance
  • Can cause Starvation for a request if it has higher seek time as compared to incoming requests
  • High variance of response time as SSTF favors only some requests

SCAN(elevator algorithm)

Advantages: 

  • High throughput
  • Low variance of response time
  • Average response time

Disadvantages: 

  • Long waiting time for requests for locations just visited by disk arm

CSCAN

Advantages: 

  • Provides more uniform wait time compared to SCAN