Today we will be discussing about Disk Scheduling - operating system tutorial .SO, let's start, shall we:
Disk Scheduling is basically used to schedule I/O request arriving in the system. It is important to schedule the I/O requests because at a time many I/O requests are made and our disk controller can execute any one of the requests. So to choose one request out of the others we use various disk scheduling algorithms so that each request is accessed in the minimal time and each request gets executed.
Before moving on to various disk scheduling algorithms let's look at some terms related to disk scheduling:
Platter
It has a has circular shape like CD or DVD having a magnetic coating. There are multiple platters one over another. The complete set of platters one over another is called a disk . You can write on both the sides of a platter. The diameter of platter ranges from 1.8 to 5.25 inches. A read/write head is attached to each platter.
Track
A platter is divided into multiple tracks.
Sectors
Each track is further divided into sectors.
Seek Time
It is the time required by read/write head to reach a desired track.
So to find to fulfill I/O request we will have to first select desired platter where I/O request is present. In that platter we will have to select the desired track and then in a particular track we look for desired sector. So basically the disk rotates and the arm also moves to reach desired track in a platter.
Why to use disk scheduling?
Suppose we have track numbered from 1 to 99 and someone wants the data from track number 20,35,60. Then the disk scheduling algorithms decides that in which order shall we fulfill the request. This is important because we have to move read/write head over the tracks and to minimize the seek time we use these disk scheduling algorithms.