The CPU divides its processing time and divides it in such a manner that no system application face any hindrance. Through disk scheduling, it specifies which task CPU needs to handle first and during which time. Simply put it can be said that the total time of CPU is bifurcated among the various functions and programmes so that each process can process simultaneously at one point in time. Disk scheduling is scheduling the CPUs time for optimum utilization of the computer.
A computer is used to perform many tasks at the same time. While working on computers, we mostly work on multiple programmes and software at the same time, without any hindrance. To control all the functions, including the disk memory, and to process the operating systems efficiently, the computer uses the model of disk scheduling.
So before we take a deep dive into how this scheduling model is implemented , we should get familier with which disks are we talking about and WHY does the computer needs to apply these disk scheduling models.
What are Magnetic Disks ?
IBM introduced the first magnetic disk, the RAMAC, in 1955; it held 5 megabytes. Magnetic disks are platters coated with iron oxide, like tape and drums.
An arm with a tiny wire coil, the read and a write head in each and evry disk which moves radially over the disk, which is divided into concentric tracks composed of small arcs, or sectors, of data.
Magnetized regions of the disk generate small currents in the coil as it passes, thereby allowing it to “read” a sector; similarly, a small current in the coil will induce a local magnetic change in the disk, thereby “writing” to a sector.
There is a read and write head of each and every disk, and this moves in rectilinear motion across the surface of the track. Block numbers are used to request data from the drive, and it is the controller who takes the head to the required track and to have access to the data it then waits till the required block comes under it.
This disk in a computer is a magnetic storing drive which is divided into different surfaces. All these surfaces or platters rotate as one unit, and the speed at which it rotates is as high as 5k to 10k RPM.
Magnetic storage or magnetic recording is the storage of data on a magnetized medium. Magnetic storage uses different patterns of magnetisation in a magnetizable material to store data and is a form of non-volatile memory. The information is accessed using one or more read/write heads.
So when various requests come from a request or at the same time, and this is where the Role of Disk Scheduling comes into the picture.
What is the need of Disk Scheduling ?
One of the responsibilities of the operating system is to use the hardware efficiently. For the disk drives, meeting this responsibility entails having fast access time and large disk bandwidth.
For magnetic disks, the access time has two major components.The seek time is the time for the disk arm to move the heads to the cylinder containing the desired sector.
The rotational latency is the additional time for the disk to rotate the desired sector to the disk head. The disk bandwidth is the total number of bytes transferred, divided by the total time between the first request for service and the completion of the last transfer.
We can improve both the access time and the bandwidth by managing the order in which disk I/O requests are serviced.
Types of Disk Scheduling Algorithms
The CPU divides its processing time and divides it in such a manner that no system application face any hindrance. Through disk scheduling, it specifies which task CPU needs to handle first and during which time. Simply put it can be said that the total time of CPU is bifurcated among the various functions and programmes so that each process can process simultaneously at one point in time.
Disk scheduling is scheduling the CPUs time for optimum utilization of the computer.So this is implemented using various algorithms which include: