What is disk scheduling?

Overview

This process needs two types of time required to process a request:

  • CPUCentral Processing Unit time

  • I/Oinput/output time

At run-time I/O requests for disk tracks to come from the process.

It is the responsibility of OSOperating System to choose which request is served first.

Disk scheduling is important, without it a lot of time could be wasted reading a large amounts of data.

Block Diagram

Disk architecture

  • The disk consists of PlatterThe circular disk on which magnetic data is stored in a hard disk drive. which consists of tracksA track is a physical division of data in a disk drive..
  • Each track consists of sectorsa sector is a subdivision of a track on a magnetic disk or optical disc. in which data is present.
  • There is a Read-write pointer that keeps on changing the position of the head as the disk keeps rotating.
Disk Architecture

Important terminology

  • Seek Time: The time taken to reach a specified track where read/write request will be satisfied.
  • Rotational delay: The time required to rotate the disk to a required sector. The main goal of the disk scheduling algorithm is to reduce the seek time.
  • Data transfer time: The time required to read/write data from the disk.
  • Total access time == Seek time ++ Rotational delay ++ Data transfer time
  • Data Size == Platter ×\times Surface ×\times Track ×\times Sectors ×\times Data

Algorithms

The following are the disk scheduling algorithms that can be used:

  1. FCFS
  2. SSTF
  3. Elevator algorithm (SCAN)
  4. C-SCAN
  5. LOOK
  6. C-LOOK

Free Resources