Analysis of Traditional Hard Disk Scheduling Algorithms: A Review

This review paper compares the various disk scheduling algorithms used to schedule processes in a queue, such as FCFS, SSTF, SCAN, C-SCAN, LOOK, C-LOOK, OTHDSA and Zone Base Disk Scheduling. It then applies all of these techniques using two data sets of I/O requests to assess the performance of each algorithm. The comparison includes total seek time to locate the requested I/O, the overall throughput of jobs done per unit, and the fairness of each request to be serviced. The comparison results also supported the statement that all disk scheduling techniques oﬀer a good performance. The comparison shows that among all disk scheduling algorithms, OTHDSA has excellent performance and takes 175 seek times and 139 seek times to complete all I/O requests of both example lists, respectively.


Introduction
H ard disk is a non-volatile storage device that retains power-free data [1]. It stores data that consists of tracks, sectors, and clusters on circular plates. A disk head is connected to the disk arm for reading/writing data on the tracks. The disk head is taken to travel back and forth to read/write, known as "seek time" [2][3] on the desired bit storage index. Disk scheduling algorithms can effectively perform such tasks. The various disk scheduling algorithms implemented on traditional mechanical hard disks comprise the modified versions, and new algorithms proposed by researchers were compared and reviewed. The two illustration lists of I/O requests [11][12] are used to reflect each disk scheduling algorithm's implementation and performance.
The solid state drives are the successor of traditional hard disk technology and are made up of integrated circuit assemblies that save data permanently. They were first introduced to the market in 1991.
Storage Technology Corporation floated the original idea in 1978, which Oracle Cooperation now owns. These drives are more stable and faster than magnetic drives due to the lack of a physical spinning disc and movable read-write mechanical arms and the storage made in the semiconductor cells containing between 1 bit to 4 bits data [13]. Furthermore, since the SSD has no moving parts, it uses the FCFS policy to serve I/O requests. As a result, the output is unaffected by seeking time and rotational latency. Therefore, the main goal of this paper is to examine disc scheduling algorithms on conventional drives (Magnetic) which is a cost-effective alternative for small and medium-sized businesses and consumers searching for a less expensive option; whereas, SSDs are a much more expensive solution for small and medium-sized businesses.
An overview is given in section I. Literature review is in section II, accompanied by an explanation of current disk scheduling algorithms such as FCFS, SSTF, SCAN, C-SCAN, LOOK, and C-LOOK [2][3] along with their pros and cons in Section III. Section IV focuses on the recent algorithms such as Updated C-LOOK, OTHDSA, ZONE Focused [4][5][6][7]. Finally, the results of all algorithms are discussed in section V. Section VI concludes the paper.

Literature Review
The authors of [22] examine the performance of disk scheduling algorithms such as FCFS, SSTF, Scan, Look, C-Scan, and C-Look and the characteristics of each technique. The comparison was conducted by fetching data against the input list of I/O requests (work queue) and calculate the Total Head Movement (THM) that occurred to serve the input list. In [22], the analysis result reflected that the FCFS technique prevents starvation but fails to serve faster. The SSTF technique reduced the THM time compared to FCFS but led I/O requests to starvation. The SCAN technique shows much better results in contrast to SSTF. In contrast, C-SCAN is slightly better performed as it provides a uniform waiting time than SCAN. LOOK technique moves head until the end of the requested I/O and immediately moves in reserve direction without going to the end of the track as SCAN does. C-LOOK differs with C-SCAN in that it does not move head till the end of the track.
In [23], the authors introduced a technique named New-Heuristic technique to decrease the disk head movements, producing a high throughput rate. The requested I/O block is arranged in non-decreasing order, then moves the disk head from the smaller I/O block to the higher block. A queue of ten I/O request blocks is used to compare the results of a new approach with FCFS, SSTF, SCAN, C-SCAN, LOOK, and C-LOOK techniques. The comparison results show that the New-Heuristic approach takes 236 head movements to serve all I/O requests; whereas, other techniques take FCFS(582), C-SCAN(388), SSTF(256), C-LOOK(346), LOOK (298), and SCAN(318) total head movements respectively.
In [24], the authors proposed a modified version of the SSTF technique, named MHSF (Major Half Served First), claiming that it is faster than SSTF. First, the requested I/O blocks are distributed into two zones: lower and upper from the current head position. Then, the algorithm checks the number of I/O requests in both zones and selects the zone having more I/O requests than the other for serving. In contrast, if both zones have an equal number of I/O requests, then the algorithm checks the current position of the disk head and starts serving I/O requests where the current disk head was lying either in the lower zone or upper zone. The analysis shows that MHSF outperforms SSTF and FCFS in total head movements average time and fetching efficiency in a real-time system.   [25] evaluated the performance of the disk cache and parallelism I/O scheduling technique. The experiment was conducted on the RAID consisting of five disks of different vendors having 16MB disk cache for pre-fetching two types of workload used in the experiment: production and HPC. The authors collected a trace log of seven days of each workload for analysis. An experiment shows that the traditional DCAP model has a disadvantage of I/O request starvation; whereas, the proposed DCAP-G reduced the rate of starvation.

Disk Scheduling Algorithms
This study compares all disk scheduling algorithms described in Section I using lists of I/O requests, taken from [11][12], as shown in Table-1. These I/O requests read a block from 0 to 199 and calculate the seek-time of a disk head. There are various simulation softwares available to calculate the seek-time of a real example list of I/O requests, such as Nicomedes [19], Disk Scheduler Simulator developed in Java [20], and C-Sharp [21]. This work focuses on how these algorithms work. Two simple/basic lists of I/O requests are used.

First Come First Serve (FCFS)
First Come First Serve, as the names imply, schedules tasks based on their arrival order, regardless of the processing time needed to run a task or any other parameters. This scheme is very popular for scheduling transmissions [18]. FCFS provides an equal opportunity for all the indices requested but does not provide an optimum solution in terms of search time and does not provide the best scheduling services [8]. FCFS operates sequentially, meaning all I/O requests will be served as provided in the example list. In accordance with the LS-1 requests, the head location is initially on track number 50 and the first I/O requested in the set is 95. The head moves from 50 to 95, while 180 is the second requested track in a set, such that the head moves from 95 to 180, and this process continues until all the I/O requests are served as stated in LS-1. During the disk head movement, the total number of tracks crossing a path covered from one position to reach another location is the seek time of the requested I/O. The total seek time is the aggregate of all seeks   times occurred while serving all requests defined in LS-1. By using the FCFS algorithm on LS-1, the total seek time is 644. In LS-2, the head's initial position is on track number 100, and the first I/O request in a set is 55. The head goes from 100 to 55, then according to the subsequent request in a queue, the head shifts from 55 to 58 and keeps going till all requests are served as sequentially appeared in LS-2. The total seek time FCFS taken on LS-2 is 498. Calculation of total seek time is shown in Table 2.

Shortest Seek Time First (SSTF)
First, this algorithm arranges all I/O requests in increasing order, calculates the disk head time seek for each I/O request, and selects a job with the shortest seek-time. The SSTF decreases the average response time, which increases the throughput rate [8]. The drawback of the SSTF is that the constant collection of the indices of least search time contributes to the hunger of those who require more seek time [9]. LS-1 begins from track number 50, then moves to 62 because of the shortest seek time of 12 tracks of disk head travel. Subsequently, it moves from 62 to 64 as only two tracks of disk head travel to reach 64. It then continues to select the shortest search time until all requests have been served. A similar procedure implies on LS-2. Table 3 shows the movement order of I/O requests, given in the example lists and the total seek time of each list.

SCAN (Elevator Algorithm)
An elevator in a building with the restriction that it moves upwards will not move downwards until it reaches the building's end floor and vice versa. SCAN algorithm serves the requested indices in the same way that it serves all the requests coming in the direction until it reaches the end track of the same direction.  Then, the disk head will move in the opposite direction. SCAN gives the moderate throughput and low variance of response time, but the long waiting time for the new coming requests of the locations just visited by disk arm [8]. For example, track number 50 is requested, and the head is on track number 80, which is moving towards 0 track, and then such request (50) will be served without any delay. Whereas, another request of track number 150 needs to wait for the head to complete the trip until the end track zero (0) is reached. Then, re-trip in the reverse direction takes place to serve those requests. Such scenario may lead to a long waiting time [9]. Suppose the disk is head moving in the left direction (from 199 to 0) and LS-1 requests are needed to be served. The initial disk head is on 50. The algorithm sorts the I/O requests in ascending order, then starts serving all the requests between 0 and 50, as it is moving in the left direction. After that, disk head re-trips in the reverse direction to serve the rest of the requests in the direction of the movement. The drawback of the SCAN algorithm is that the disk head moves till the end of each direction whether the track number is requested or not. Table 4 shows the total seek time of both lists of I/O requests using the SCAN algorithm.

C-SCAN (Circular Elevator Algorithm)
Imagine the same elevator scenario described in the SCAN scheduling algorithm, but this time such an elevator only serves in one direction. For example, if it is moving up, then it serves all requests coming in that way till the top end of the building. From there, it will come back to the bottom end without serving any request. Then, from the bottom, it will again move up and will serve the rest of the requests in this direction. C-SCAN gives uniform waiting time as compared to the SCAN and provides a better response time. However, it forces the disk head to move in the reverse direction without serving any request and starts serving requests from only one end which causes   [9]. In LS-1, we apply the C-SCAN algorithm. The disk head goes in the left direction, the initial position of the disk head is 50, and LS-1's I/O requests are arranged in ascending order. As explained earlier, C-SCAN served all requests coming in the direction of head movement, such as 34 and 11 will be served. As track number zero hits, the disk head moves towards the last track of opposite direction without serving, and then start serving again in the left direction.
Similarly, for LS-2, the disk head goes in the right direction, where the disk head's initial location is 100. C-SCAN begins to serve the requests in the right direction such as 150, 160, and 184. The disk head travels in the opposite direction without serving any requests. It reaches tracking number 199 and begins to serve the rest of the I/O requests as it reaches track zero in the right direction. The downside of C-SCAN is that as the disk head travels till the end of the moving path, it includes additional search time such as in LS-1 disk head moving in the left direction and the I/O request queue ends on track number 11. However, as the disk head moves from 11 to 0 according to the algorithm, then re-trips in the reverse direction. Such search time is considered to be an overhead. Similarly, in LS-2 overhead, search time is from 184 to 199 before re-trip in the opposite direction. Ssuch movement produces a circular effect, but the downside of overhead is to sum additional seek time. Table 5 shows the total seek time of C-SCAN on both lists of I/O requests.

LOOK
LOOK is an advanced version of the SCAN algorithm with a slightly better seek time in which head disk does not move beyond the requested I/O. This algorithm reduces starvation, waiting time, and provides low diversity in response time [8]. There is an overhead of finding the end requests because it looks for new requests before moving in a given direction [9]. We    found the seeks times of this algorithm to be 208 and 250 on LS-1 and LS-2, respectively. Table 6 shows the total seek time of both illustration lists using the LOOK algorithm.

C-LOOK
C-LOOK is an enhanced version of the C-SCAN algorithm with a slightly better seek time. CLOOK algorithm applies the same procedure as the C-SCAN that does not serve while coming back from one end. However, C-LOOK stops till the queue's end request and then starts serving a request from that point moving in the reverse direction. We found the seeks times of this algorithm to be 326 and 322 on LS-1 and LS-2, respectively. Table 7 shows the total seek time of both illustration lists using the C-LOOK algorithm.

Modified C-Look Algorithm
It is a slightly modified version of C-LOOK which does not serve any request while coming back in the reverse direction. This behavior of the C-LOOK algorithm increases the seek time because the disk head moves till the end of the request of the queue without serving requests coming in its direction. Modified C-LOOK serves requests while coming back in the reverse direction. This technique reduces the seek time as compared to the C-LOOK algorithm [5]. Table 8 shows the total seek time of both lists. We observed that on

Optimized Two Head Disk Scheduling Algorithm (OTHDSA)
A new disk model MHPR (Multi-head Parallelism and Redundancy), represented by Yang [14], reduced the access time of a single I/O request and increased the response time. In [6], the authors inspired by [14], proposed optimized disk scheduling based on two heads disk. As the name suggests, the first disk head is at the position of track number zero (0), named as "HL," which moves from left to right. The second head is at track number 199, named "HR," which moves from right to left with the restriction that only one (either HL or HR) can be moved at a time. The pseudocode of OTHDSA is given as follows.  Otherwise, it will stop, and the second starts moving. The implementation of the OTHDSA technique has been explained to calculate the total seek time. We assume that lists of I/O requests are sorted in ascending order, and initially, HL and HR are on track zero (0) and 199, respectively.

LS-1 Total Seek Time using OTHDSA
We decide which disk head may take the first move. HL seek time is 11, and HR seek time is 19, according to Equation 1-2. HL will take the first move as it has a smaller seek time compared to HR, and serve all the requests coming in the way 11,34,62,64,95 till it reaches equal or less than track number 100 and make a decision to either keep on moving to serve all requests or to give a chance to the second head HR to start serving all the requests. This decision is based on the following calculations. We observed that HR travel distance is lesser than HL travel distance; therefore, HL stops, and HR starts serving the remaining request from right to left such as 180, 123, 119. We observed that HL travel distance is smaller than HR travel distance; therefore, HR will stop, and HL start serving the remaining request from left to right such as 18,38,39,55,58,90. We found that Optimize Two Head Disk Scheduling Algorithm (OTHDSA) has shown superior performance compared to the other disk scheduling algorithms.

Zone-Based Disk Scheduling Algorithm
In this scheduling algorithm, the requested I/O queue consists of a lower zone and an upper zone. The lower zone contains all requests that are less than or equal to the initial head disk position. The upper zne consists of all higher requests than the initial head disk position. The distribution into znes is based on the LCFS (Last Come First Serve) requests. The following steps are performed.
1) Divide the requested queue into two parts according to the initial head disk position in such order that all requests are served on LCFS (Last Come First Serve) basis in the requested queue. If there are requests between the LCFS requests, they are served first before the last arrived requests. 2) Make a decision which zone will be selected to be served first. Compare the length of the requests of both zones and start from the zone which has smaller number of requests. However, if both zones have an equal number of requests, then pick that zone which has smaller seek time of initial request from current disk head position.
The implementation of the zone-based technique has been explained to calculate the total seek time.

LS-1 Total Seek Time using Zone-Based Algorithm
The request queue is divided into two parts. All requests less than or equal to the current head position 50 are considered to be in lower zone, and those higher than the current head position are considered to be in upper zone. Both zones contain requests on LCFS basis. A decision on which zone disk arm starts serving is made such that the disk arm serves from lower zone, and after completing the lower zone, the disk arm starts to serve upper zone. Therefore, we first start serving from lower zone. Track number 11 of lower zone will be served first according to the LCFS order rule, which will be served first if there are no requests between the current head position (50) and track number (11). If so, the disk arm will serve them first before moving on to track number (11). After completing lower zone, the disk arm starts serving a request from upper zone. Currently, the disk head position is on track number 11 in the Requested Queue (RQ). Track number is 64, and it has come first according to LCFS order which will be served first. But track number 62 is in between the current head position and track number 64, therefore, disk head will serve 62 before 64. Now that the current head position is on track 64, the algorithm again checks whether the request from upper zone 123 is in order of LCFS in RQ. But track number 95,119 is in between current head position 64 to 123. Therefore, it will serve all requests between 64 and 123. After that, only one request left in upper zone is 180, therefore, the disk head will move from 123 to 180 to complete the request queue.   Table 11 shows the total seek time of LS-1 and LS-2 using zone-based technique.

Results and Analysis of all Disk Scheduling Techniques
This paper discussed different disk scheduling algorithms and compared their performances on two lists of I/O requests to determine each algorithm's time to execute the queue processes. Disk head scheduling takes into account two key concerns: throughput and fairness. Throughput refers to the number of jobs completed per unit time. Whereas, fairness refers to each job being treated equally and is ultimately served. An effective scheduling algorithm seeks a balance between these two issues. The best algorithm has the highest level of fairness and throughput. Table 12 shows the comparison between total seek time of all disk scheduling techniques and their overall throughput and fairness for each track in the requested queue.  Table 12 shows the comparison of total seek time of all disk scheduling techniques along with their overall throughput and fairness for each track in the request queue. The measures set for throughput and fairness include better, good, bad, moderate, and poor, as shown in Table 12. Figure-1 shows that the Optimize Two Head Disk Scheduling Algorithm (OTHDSA) has outstanding performance among all Disk Scheduling Techniques.

Conclusion
FCFS shows good fairness among the requested track turns, however, its throughput is less than other algorithms. The throughput of SSTF and SCAN is moderate, but does not have good fairness in serving the requested tracks. Circular SCAN (C-SCAN) performs better in both aspects. LOOK and C-LOOK provide much better throughput than SCAN and C-SCAN and are also better in terms of fairness. The Optimized Two Head Disk Scheduling Algorithm (OTHDSA) shows promising performance in terms of both aspects (throughput and fairness). Modified over C-Look and Zone Based Disk Scheduling have same performance in terms of total seek time. In 2017, Seagate Technology announced that they are working on Multi-Actuator Hard Disk Drives, which will help to improve the data rate of transfer performance [15]. According to Seagate's official blog site [16], MACH.2 drives will be available shortly. In another blog [17], Seagate competitor Western Digital introduces a 16TB drive with eight platters and sixteen heads instead of Seagate's 16TB drive with nine platters and eighteen heads. Both companies have not disclosed the prices of such disk drives yet, but it is assumed that fewer platters and heads would result in lower costs.