Ads Here

Sunday, 3 June 2018

Disk Scheduling - Introduction

Hello everyone, welcome to this new series, from today we starting a new subject that is disk scheduling. So, in this series we will discuss all about how to schedule a disk and all the algorithms used for this. So, first let see the basic terminologies that we need to know before starting the main topic. There are several types of secondary storage available for a computer, but here we mainly discuss about the magnetic disk which are the most popular and commonly used disks now a day. So, Lets, discuss the basic thing about a magnetic disk or say simple disk -
What is a disk:
A disk is a collection of multiple circular platters with flat surface which are fixed on a rotating spindle and are coated with magnetic layer in both side for data encoding and a moving arm is attached with the disk fro read and write. Lets see a structure to understand this.
So, in the above diagram you can see the structure of a disk. Lets discuss this all parts one by one.
1. Spindle: 
So, simply the spindle is the rotating axis of a disk and all the patters are stack on this.
2. Arm:
An arm is attached with a disk that hold the moving read/write head.
3. Read/Write head:
This is a moving part attached with the arm, which continuously moving on the disk for read/write the data from it.
4. Platters: 
Platter is a flat circular surface like CD or DVD, coated with magnetic layers both side of it on which the data encoded. Now, when multiple platters are stacked on a spindle then that collection is called a disk.  The difference between platter and CD is in a platter we can write on both side of it, but in a CD we can write only one side of it.On the above diagram we have taken only one platter just for understand it batter.
5. Track:
Now, platters are also divided in concentric circular parts. Each of this circular part is called track. That means a platter is a collection of tracks. Now, there may be so many tracks for a big disk.
6. Sector:
Now, we have just discussed that platters are divided into multiple tracks, but tracks are also divided into more small parts, known as sectors. Each track is divided into multiple sectors.
So, this is the basic structure of a disk. Now a day, we use multi-programming operating system in which, multiple processes or even one process can make multiple I/O request from one or multiple tracks. Now, for all the I/O request we have to use some algorithms that satisfies all the request without any issues and study of that algorithms is called Disk Scheduling.
Seek Time :
The time required to move the read/write head from one position of the disk to the desired position is called Seek time. Now, as the movement of the read/write head is a physical movement then time required time is vary from some micro or nano seconds to seconds depending on the request.
Disk Scheduling :
In case of multiple I/O request, disk scheduling algorithms are used to decide which request must be execute first.
So, simply we can say that for multiple request the disk scheduling algorithm used to order the request in such a way that movement of the read/write head is become minimum and for that the seek time is also minimum.
So, this is for now, in our next post we will discuss all the disk scheduling algorithms one by one. If anyone have any question then please comment below and don't forget to share, thank you.

No comments:

Post a Comment