Disk Scheduling Nov 2023
Disk Scheduling Nov 2023
Disk Scheduling Nov 2023
Disk Scheduling Algorithms are needed because a process can make multiple I/O
requests and multiple processes run at the same time. The requests made by a
process may be located at different sectors on different tracks. Due to this, the seek
time may increase more. These algorithms help in minimizing the seek time by
ordering the requests made by the processes.
The purpose of disk scheduling is to choose a disk request from the input/output
requests queue and then scheduling the remaining request means which has to be
processed
In operating systems, seek time is very important. Since all device requests are
linked in queues, the seek time is increased causing the system to slow down.
Disk Scheduling Algorithms are used to reduce the total seek time of any
request.
Fairness.
High Throughput.
Basic Terms
There are various types of disk scheduling algorithms, but before discussing
them, we need to know various essentials terms which are given below:
Seek Time : It is the time taken in locating the disk arm to a specified track
where the read/write request will be satisfied.
Rotational Latency : It is the time taken by a desired sector of the disk to rotate
itself to the position where it can access the Read/Write heads.
Transfer Time - It is the time taken to transfer the data requested by the
processes.
Disk Access Time - Disk Access time is the sum of the Seek Time, Rotational
Latency, and Transfer Time.
Disk Response Time : It is the average of time spent by each request waiting for
the IO operation.
Types of Disk Scheduling Algorithms
In operating systems, seek time is very important. Since all device requests are
linked in queues, the seek time is increased causing the system to slow down. Disk
Scheduling Algorithms are used to reduce the total seek time of any request.
A Process makes the I/O requests to the operating system to access the disk. Disk
Scheduling Algorithm manages those requests and decides the order of the disk
access given to the requests.
Advantages-
Disadvantages-
Consider a disk queue with requests for I/O to blocks on cylinders 98, 183, 41,
122, 14, 124, 65, 67. The FCFS scheduling algorithm is used. The head is initially
at cylinder number 53. The cylinders are numbered from 0 to 199. The total head
movement (in number of cylinders) incurred while servicing these requests is
Solution
Problem
Consider the following disk request sequence for a disk with 100 tracks 45, 21,
67, 90, 4, 50, 89, 52, 61, 87, 25
Head pointer starting at 50 and moving in left direction. Find the number of head
movements in cylinders using FCFS scheduling.
Solution
= (50-45) + (45-21)+ (67-21)+ (90-67) + (90-4) + (50-4) + (89-50) + (61-52) +
(87-61) + (87-25)
= 5 + 24 + 46 + 23 + 86 + 46 + 49 + 9 + 26 + 62
= 376
It allows the head to move to the closest track in the service queue.
Problem
Solution