You are on page 1of 4

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)

Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 3, Issue 1, January February 2014 ISSN 2278-6856

New Disk Scheduling Algorithm for Higher Performance


Unnati A. Patel1
1

Assistant Professor, M.Sc. (IT) Department, ISTAR, V.V.Nagar, Gujarat, India

Abstract: Processor speed and memory capacity are


increasing several times faster than disk speed. This disparity suggests that disk I/O performance could become an important bottleneck. Methods are needed for using disks more efficiently. Past analysis of disk scheduling algorithms has largely been experimental and little attempt has been made to develop algorithms with provable performance guarantees. Disk arm scheduling algorithms have been studied for many years to increase disk I/O performance. Most of the disks by the early 1980s are characterized as a linear seek time and their seek time is responsible for the most time of disk access. So, the existing disk scheduling algorithms have focused on the reduction of the average seek distance. In this paper we propose new disk scheduling algorithm, i.e. Shortest Rotational Latency First (SRLF) for reduced rotational latency. SRLF services first a request with the shortest expected rotational latency.

(2) Address of disk (drive, cylinder, surface, block), (3) Address of memory, and (4) Amount of information is to be transferred The operating system is responsible for using hardware efficiently for the disk drives, this means having a fast access time and disk bandwidth. Access time has two major components : 1. Seek time is the time for the disk are to move the heads to the cylinder containing the desired sector. 2. Rotational latency is the additional time wait in for the disk to rotate the desired sector to the disk head. Minimize seek time Seek time seek distance 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.

Keywords: SRLF (Shortest Rotational Latency First), Disk Scheduling, SSTF, C-LOOK, SCAN, FCFS, CSCAN, LOOK, Seek Time, Rotational Latency.

1. INTRODUCTION:
A hard drive is a collection of plates called platters. Both sides of each platter are covered with some kind of a magnetization medium that allows ones and zeros to be stored. Each surface is divided into circles called tracks. Furthermore, each track is divided into smaller pieces called sectors. Disk I/O is done sector by sector. A group of tracks that are positioned on top of each other is called a cylinder. There is a head connected to an arm for each surface, which handles all I/O operations. Usually, all arms are attached to each other so the heads are always in the same cylinder. For each I/O request, first, a head must be selected. This is done electronically, and the time it takes is not significant. Then the head is moved over the destination track. After that, the disk is rotated to position the desired sector under the head. Finally, the I/O operation is performed. Arm movements and disk rotations are where the delay occurs. There are two objectives for any disk scheduling algorithm: 1. Minimize the throughput - the average number of requests satisfied per time unit. 2. Maximize the response time - the average time that a request must wait before it is satisfied. Whenever a process needs I/O to or from the disk, it issues a system call to the operating system. This request specifies several pieces of information: (1) Type of I/O operation, Volume 3, Issue 1 January February 2014

Figure 1 : Components of Disk Access Scheduling is a fundamental operating system function, since almost all computer resources are scheduled before use. The disk is of course, one of the computer resources. For the disk drivers, meeting this responsibility entails having fast access time and large disk bandwidth. Processor speed and disk and memory capacity are increasing by over 40% 40%per year. In contrast, disk speed is increasing more gradually, growing by only 7%per year. However, despite the difficulty of improving mechanical components, we can still aim to use the disks more efficiently. Different algorithms such as FCFS, SSTF, LOOK and CLOOK are used for selecting request for servicing from the queue of requests. As shown in Fig. 1, the disk access time is defined as the sum of seek time, rotational latency, and transfer time and the disk access time. The queueing delay increases more rapidly as the mean disk access time becomes larger for a fixed arrival rate. The transfer time is in proportion to block size, rotational wed, recording density of a track, and speed of the electronics connecting a disk to a computer. Transfer Page 21

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 3, Issue 1, January February 2014 ISSN 2278-6856
rates in 1990 are typically 1 to 4MB/sec; so, the transfer time is relatively very small compared with the seek time and rotational latency. Queue(10-199): 36,180,120,10,15,40,188,150 , 168. And head current position is :130. This schedule is diagrammed in figure 4

Figure 2 : Time Components of Disk I/O

2. PROBLEM:
Several algorithms exist to schedule the servicing of disk I/O requests. We illustrate them with a requests queue(10199) :36,180,120,10,15,40,188,150 , 120 , 168.Head starts at 130. 1. FCFS: The simplest form of disk scheduling is, of course, the first-come, first-served algorithm. But it generally does not provide the faster service. Consider , for example a disk queue with requests for I/O to blocks on cylinders: Queue(10-199) : 36,180,120, 10 , 15,40,188,150 , 168 .And head current position is :130. This schedule is diagrammed in figure 3. Figure 4: SSTF 3. SCAN: The disk arm starts at one end of the disk and moves toward the other end, servicing requests until will get to the other end of the disk, where the head movement is reversed and the servicing continues. Sometime called the elevator algorithm. The schedule diagram for above given example using SCAN is shown in figure 5. Head movement:(130-120) +(120-80) +(80-40) +(40-36) +(36-15) +(15-10) +(10-0) +(150-0) +(168-150) +(188168)=318

Figure 3: FCFS Head movement: (130-36)+ (80-36)+(120-80) +(12010)+(15-10) +(40-15) +(188-40)+ (188-150) +(150-120) +(168-120)=582 In FCFS total head movement: 582 2. SSTF: Shortest Seek Time First-Selects the request with the minimum seek time from the current head position. Since seek time increases with the number of cylinders traversed by the head, SSTF chooses the pending request closest to the current head position. SSTF scheduling is a form of SJF scheduling :may cause starvation of some requests. Consider, for example a disk queue with requests for I/O to blocks on cylinders: Volume 3, Issue 1 January February 2014

Figure 5: SCAN 4. C-SCAN: It provides a more uniform wait time than SCAN. The head moves from one end of the disk to the other. Servicing requests as it goes. However, when it reaches of the other end, it immediately will return to the beginning of the disk, without servicing any requests on the return trip. It treats the cylinders as a wraparound circular list from the first cylinder to the last one. The schedule diagram for above given example using CSCAN is shown in figure 6.

Page 22

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 3, Issue 1, January February 2014 ISSN 2278-6856
Head movement: (150-130) +(168-150) +(188168)+(199- 188) +(199-0) +(10-0) +(15-10) +(36-15) +(40-36) +(80-40) +(120-80)=388 Head movement: (150-130)+(168-150) +(188-168) +(188- 10) +(15-10) +(36-15) +(40-36) +(80-40) +(12080)=346

Figure 6: C-SCAN 5. LOOK: LOOK is similar to SCAN in that the heads sweep across the disk surface in both directions performing reads and writes. However, unlike SCAN, which visits the innermost and outermost cylinders each sweep, LOOK will change directions when it has reached the last request in the current direction. The schedule diagram for above given example using LOOK is shown in figure 7. Head movement: (130-120) +(120-80) +(80-40)+(40-36) +(36-15) +(15-10) +(150-10) +(168-150) +(188168)=298

Figure 8: C-LOOK

3. RESULTS:
At first sorting in ascending order of all cylinders input blocks by using any sorting method. Find the distance between the smallest block number and current head position. Let it is P and again find the distance between the largest block number and current head position. Let it is Q. Sequentially move and reached head from these block to the highest block number. Else head moves sequentially from its current position to the highest block number in forward and again in backward which block is not visited. Then sequentially move and reached head from these block to the largest block number. Graphical representation of proposed algorithm: Consider, for example a disk queue with requests for I/O to blocks on cylinders: Queue(10-199) :36,180,120,10,15, 40,188,150 ,168. And head current position is :130.

Figure 7 : LOOK 6. C-LOOK: It is a version of C-SCAN. Arm goes only as far as the last request in each direction, the reverses direction immediately, without first going all the way to the end of the disk. The schedule diagram for above given example using C-LOOK is shown in figure 8. Figure 9: Proposed Algorithm

Volume 3, Issue 1 January February 2014

Page 23

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 3, Issue 1, January February 2014 ISSN 2278-6856
Comparison among popular Disk Algorithms and proposed algorithm: Scheduling

5. CONCLUSION:
In conclusion, I have proposed a new real-time disk scheduler that imposes almost no performance penalty over non-real-time optimal schedulers when given sufficient slack time. From the experiment and comparison of proposed algorithm with existing algorithm it will clear to us that the existing algorithm reduces head movement. The proposed algorithm can be used for all types of requests sequential like text and nonsequential like multi-media.

Consider, for example a disk queue with requests for I/O to blocks on cylinders: Queue(10-199) 36,180,120,10,15, 40,188,150 ,168. And head current position is:130. Name of Algorithm No. of Head Movement 582 256 318 388 298 346 236

FCFS SSTF SCAN C-SCAN LOOK C-LOOK Proposed Algo.

REFERENCES:
[1] Operating System Principles (6th edition) Abraham Silberschatz, Peter Bare Galvin, Greg Gagne [2] H. Ming, A disk scheduling algorithm: SPFF, Wuhan University Journal of Natural Sciences, Vol 10 Number 6 / November, 2005. [3] Operating Systems: A Concept-based Approach(2E) D.M. Dhamdhere [4] Mordern operating system (2 nd edition) Andrew S. Tanenbaum . [5] D. L. Martens and M. J. Katchabaw, Optimizing System Performance Through Dynamic Disk Scheduling Algorithm Selection, WSEAS Transactions On Information Science And Applications, Issue 7, Vol 3, pp. 1361-1368, July 2006. [6] Dees, B. Native Command queuing-advanced performance in desktop storage. Potentials, IEEE 24, 4(2005),4-7 [7] Reddy, A.L.N., Wyllie, J., and Wijyaratne, K.B.R. disk scheduling in a multimedia I/O system. ACM Trans. Multimedia Comput. Commun. Appl. 1, 1(2005), 37-59

Comparisons Graph among proposed and existing algorithms. That shows performances:

800 600 400 200 0

582 256 318 388 298 346 236

4. OBJECTIVE OF THE PROPOSED WORK:


Should give best performance for all types of request like text, audio and video. Increase disk I/O performance by reducing disk access time Reduction in Seek Time & Rotational Latency by reducing average seek distance Increase Through Put Real-time algorithms should address both minimizing the seek time and satisfying the timing constrains

Volume 3, Issue 1 January February 2014

Page 24

You might also like