0% found this document useful (0 votes)
62 views

An Improved FCFS IFCFS Disk Scheduling A

The document describes an improved First Come First Served (IFCFS) disk scheduling algorithm. IFCFS works similarly to FCFS but aims to reduce seek time by serving any requests that are located between the disk head's current position and the next request to be served. A simulation program was developed to test IFCFS. Results found that IFCFS provides faster service and significantly reduces seek time compared to standard FCFS. The key improvement of IFCFS is that it serves additional requests if they are located along the path of the disk head as it moves between requests, rather than just serving requests in strict arrival order.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

An Improved FCFS IFCFS Disk Scheduling A

The document describes an improved First Come First Served (IFCFS) disk scheduling algorithm. IFCFS works similarly to FCFS but aims to reduce seek time by serving any requests that are located between the disk head's current position and the next request to be served. A simulation program was developed to test IFCFS. Results found that IFCFS provides faster service and significantly reduces seek time compared to standard FCFS. The key improvement of IFCFS is that it serves additional requests if they are located along the path of the disk head as it moves between requests, rather than just serving requests in strict arrival order.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

International Journal of Computer Applications (0975 – 888)

Volume 47– No.13, June 2012

An Improved FCFS (IFCFS) Disk Scheduling Algorithm

Manish Kumar Mishra


Department of Information Technology
College of Computing and Informatics
Haramaya University
Ethiopia

ABSTRACT a few central themes. FCFS is still a preferable choice [5]. It is


Since the time movable head disk came into existence, the I/O easy to implement and it is fair in the sense that once a request
performance has been improved by proper scheduling of disk has arrived, its place in the schedule is fixed. This study
accesses. Disk scheduling involves a careful examination of focuses on improving the effectiveness of FCFS.
pending requests to determine the most efficient way to
service the requests. The two most common types of 1.1 Disk Performance Parameters
scheduling are seek optimization and rotational (or latency) The disk I/O operations mainly depend on the computer
optimization. Most of the scheduling algorithms concentrate system, the operating system, and the nature of the I/O
on reducing seek times for a set of requests, because seek channel and disk controller hardware [6]. The time taken to
times tend to be an order of magnitude greater than latency position the disk arm at the desired cylinder is called the Seek
times. Some of the most important scheduling algorithms are Time, and the time for the desired sector to rotate to the disk
First-Come-First-Served (FCFS), Shortest Seek Time First head is called the Rotational Latency. The sum of seek time
(SSTF), SCAN, Circular Scan (C-SCAN) and LOOK. FCFS and rotational latency is known as Access Time. The transfer
is the simplest form of disk scheduling algorithm. This time mainly depends on the rotational speed of the disk. The
algorithm is simple to implement, but it generally does not total number of bytes transferred, divided by the total time
provide the fastest service. This paper describes an between the first request for service and the completion of the
improvement in FCFS. A simulator program has been last transfer is called the disk Bandwidth [3]. These are the
designed and tested the improved FCFS. After improvement disk performance parameters and they can be improved by
in FCFS it has been found that the service is fast and seek scheduling the servicing of disk I/O requests in a good order.
time has been reduced drastically.
1.2 Disk Scheduling Algorithms
General Terms Disk scheduling algorithms are used to allocate the services to
Operating System, Disk Scheduling. the I/O requests on the disk. Some of the most important
scheduling algorithms are First-Come-First-Served (FCFS),
Keywords Shortest Seek Time First (SSTF), SCAN, Circular Scan (C-
Disk Scheduling, Seek Time, Average Seek Time, FCFS, SCAN) and LOOK. FCFS is the simplest form of disk
IFCFS. scheduling algorithm. In this scheduling, I/O requests are
served as per their arrival. The request that arrive first, is
1. INTRODUCTION served first so the name First-Come-First-Served. In SSTF
In multiprogrammed computing systems, inefficiency is often algorithm, the request with the minimum seek time from the
caused by improper use of rotational storage devices such as current head position is served first. In this algorithm, I/O
disk. In this type of system, many processes may be requests at the edges of the disk surface may get starved [7].
generating requests for reading and writing disk records. SSTF gives substantial improvement over FCFS. In SCAN
Sometimes these processes make requests faster than they can algorithm, the disk arm starts from one end of the disk and
be serviced by the moving head-disks, as a result waiting lines moves to the other end of the disk. While moving from one
or queues build up for each device [1]. Which process should end to the other end of the disk, it serves the requests as it
be selected next for service, is an important question, because reaches each cylinder. When it reaches to other end, the
it affects the effectiveness of the service. The main aim of the direction of head movement is reversed. SCAN gives better
disk scheduling algorithms is to reduce or minimize the seek performance than FCFS and SSTF. In C-SCAN, the disk head
time for a set of requests [2]. The disk performance can be moves from one end to the other end of the disk, serving the
optimized by installing a magnetic disk that can result in high request along the way. When the disk head reaches to the
transfer rates. Magnetic disk is a collection of platters. other end, it immediately returns back to the beginning of the
Information is stored by recording it magnetically on the disk. In return trip, it does not serve any request. The waiting
platters. A read-write disk head is located on top of each time increases in C-SCAN [2]. In LOOK algorithm, the arm
surface of every platter. The heads are attached to a disk arm goes only as far as the final request in each direction [3]. The
that moves all the heads as a unit. The surface of a platter is direction reverses immediately, without going all the way to
logically divided into circular tracks, which are subdivided the end of the disk.
into sectors [3]. A cylinder is made up of set of tracks that are
at one arm position. Disks are currently four orders of 2. IFCFS ALGORITHM
magnitude slower than main memory, so many researches are The improved FCFS (IFCFS) disk scheduling algorithm
going on to enhance the efficiency of disks [4]. Scheduling works similar to FCFS but with a small improvement. IFCFS
algorithms for moving head-disks have been studied for many move the disk head with the intention to serve the first I/O
years, but which algorithm is “best” is still an open question request. On the way going to serve the first request, if there is
[5]. Most scheduling algorithms in use today are variations of
any request waiting from the current disk head position to the

20
International Journal of Computer Applications (0975 – 888)
Volume 47– No.13, June 2012

first request, will be served. After serving first request and the Table 1. Comparison of FCFS and IFCFS (Case 1)
requests that were served on the way, disk head will move to
the next request waiting in the queue. On the way going to Total Head Average Seek
Algorithms
serve this request, if there is any request waiting from the Movement Time
current disk head position to the next waiting request, will be FCFS 160 26.67
served etc. IFCFS guarantees the performance improvement
IFCFS 135 22.50
over FCFS.

Following is the proposed IFCFS disk scheduling algorithm


Queue = 80, 50, 30, 40, 5, 10 Head starts at 20
Step 1. START
Step 2. Make a queue of the I/O requests say 100
REQUEST.
Step 3. Do steps 4, 5 and 6 WHILE queue REQUEST 90
becomes empty.
Step 4. Move the disk head from the current position 80
say K to the first request in the queue
REQUEST. Serve the requests that are on the 70
way of the disk head from the current position
60

Track Numbers
K to the first request in the queue REQUEST.
Step 5. Serve the first request in the queue REQUEST.
50
Step 6. Remove the requests from the queue
REQUEST that are already served. 40
Step 7. END
30
3. PERFORMANCE EVALUATION 20
To evaluate the performance, I assumed that all the I/O
requests are independent of each other and have equal 10
priority. The requests are stored in the request queue. The
minimum track number is 0 and the maximum track number is 0
100 on each platter. The seek time has been taken as the Time
performance parameter.

3.1 Experiments Performed Fig 1: Representation of FCFS (Case 1)


For performance evaluation of my proposed IFCFS algorithm,
I have taken three different cases. Six, eight and ten I/O
requests have been taken into consideration in case 1, case 2
Queue = 80, 50, 30, 40, 5, 10 Head starts at 20
and case 3 respectively. In each case, the experimental results
of proposed IFCFS algorithm have been compared with FCFS 100
algorithm.
90
Case 1: I consider the disk queue with request for I/O to
80
blocks on cylinders 80, 50, 30, 40, 5 and 10. If disk head is
presently at cylinder 20, it will first move to cylinder 80. 70
Since three I/O requests on cylinders 50, 30 and 40 will be on
the way going from cylinder 20 to 80, these three requests will 60
Track Numbers

be served before the disk head reached to cylinder 80. After


serving request at cylinder 80, the request queue will be 50
checked for next request. Since the requests on cylinders 50,
30 and 40 have been already served, the next available request 40
is on cylinder 5. The disk head will now move to cylinder 5
from cylinder 80. On the way going to cylinder 5, the request 30
on cylinder 10 will be served. The total head movement is 135
cylinders. Using the same example, the total head movement 20
in FCFS is 160 cylinders. Table 1 shows the comparison of 10
result of proposed IFCFS with FCFS algorithm. Figure 1 and
Figure 2 shows the representation of FCFS and IFCFS 0
respectively. Figure 3 shows the comparison of average seek
Time
time of FCFS and IFCFS.

Fig 2: Representation of IFCFS (Case 1)

21
International Journal of Computer Applications (0975 – 888)
Volume 47– No.13, June 2012

Table 2. Comparison of FCFS and IFCFS (Case 2)


Queue = 80, 50, 30, 40, 5, 10 Total Head Average Seek
Algorithms
Head starts at 20 Movement Time
FCFS 410 51.25
55 IFCFS 155 19.38
50
45
Queue = 100, 5, 50, 90, 75, 10, 80, 60 Head starts at 40
40
Average Seek Time

35 100

30 90

25 80
20 70
15 60

Track Numbers
10
50
5
40
0
FCFS IFCFS 30

20
Fig 3: Comparison of Average Seek Time (Case 1)
Case 2: The disk queue with request for I/O to blocks on 10
cylinders 100, 5, 50, 90, 75, 10, 80 and 60 has been taken into
0
consideration. If disk head is presently at cylinder 40, it will
first move to cylinder 100. Since five I/O requests on Time
cylinders 50, 90, 75, 80 and 60 will be on the way going from
cylinder 40 to 100, these five requests will be served before Fig 4: Representation of FCFS (Case 2)
the disk head reached to cylinder 100. After serving request at
cylinder 100, the request queue will be checked for next
request. Since the requests on cylinders 50, 90, 75, 80 and 60
have been already served, the next available request is on Queue = 100, 5, 50, 90, 75, 10, 80, 60 Head starts at 40
cylinder 5. The disk head will now move to cylinder 5 from
cylinder 100. On the way going to cylinder 5, the request on
100
cylinder 10 will be served. The total head movement is 155
cylinders. Using the same example, the total head movement 90
in FCFS is 410 cylinders. Table 2 shows the comparison of
result of proposed IFCFS with FCFS algorithm. Figure 4 and 80
Figure 5 shows the representation of FCFS and IFCFS
respectively. Figure 6 shows the comparison of average seek 70
time of FCFS and IFCFS.
60
Track Numbers

50

40

30

20

10

0
Time

Fig 5: Representation of IFCFS (Case 2)

22
International Journal of Computer Applications (0975 – 888)
Volume 47– No.13, June 2012

Queue = 100, 5, 50, 90, 75, 10, 80, 60 Queue = 20, 35, 5, 95, 75, 55, 85, 45, 40, 15
Head starts at 50
Head starts at 40
100
55
50 90

45 80

40 70
Average Seek Time

35 60

Track Numbers
30 50
25
40
20
30
15
20
10
10
5
0 0
FCFS IFCFS Time

Fig 6: Comparison of Average Seek Time (Case 2)


Fig 7: Representation of FCFS (Case 3)
Case 3: The disk queue with request for I/O to blocks on
cylinders 20, 35, 5, 95, 75, 55, 85, 45, 40 and 15 has been
taken into consideration. If disk head is presently at cylinder
50, it will first move to cylinder 20. Since three I/O requests Queue = 20, 35, 5, 95, 75, 55, 85, 45, 40, 15
on cylinders 35, 45 and 40 will be on the way going from Head starts at 50
cylinder 50 to 20, these three requests will be served before
the disk head reached to cylinder 20. After serving request at
cylinder 20, the request queue will be checked for next 100
request. Since the requests on cylinders 35, 45 and 40 have
been already served, the next available request is on cylinder 90
5. The disk head will now move to cylinder 5 from cylinder 80
20. On the way going to cylinder 5, the request on cylinder 15
will be served. After serving request at cylinder 5, the request 70
queue will be checked for next request. Next available request
is on cylinder 95. Since three I/O requests on cylinders 75, 55 60
Track Numbers

and 80 will be on the way going from cylinder 5 to 95, these


three requests will be served before the disk head reached to 50
cylinder 95. The total head movement is 135 cylinders. Using
the same example, the total head movement in FCFS is 305 40
cylinders. Table 3 shows the comparison of result of proposed
IFCFS with FCFS algorithm. Figure 7 and Figure 8 shows the 30
representation of FCFS and IFCFS respectively. Figure 9
20
shows the comparison of average seek time of FCFS and
IFCFS. 10
Table 3. Comparison of FCFS and IFCFS (Case 3) 0
Total Head Average Seek Time
Algorithms
Movement Time
FCFS 305 30.50 Fig 8: Representation of IFCFS (Case 3)
IFCFS 135 13.50

23
International Journal of Computer Applications (0975 – 888)
Volume 47– No.13, June 2012

FCFS. After improvement in FCFS it has been found that the


Queue = 20, 35, 5, 95, 75, 55, 85, 45, 40, 15 service is fast and seek time has been reduced drastically. This
algorithm can be implemented to improve the performance in
Head starts at 50 the systems in which FCFS is a preferable choice.

55 5. REFERENCES
[1] H. M. Deitel, “Operating Systems”, 2nd Edn., Pearson
50 Education Pte. Ltd., 2002, ISBN 81-7808-035-4.
45 [2] Sourav Kumar Bhoi, Sanjaya Kumar Panda, and Imran
Hossain Faruk, “Design and Performance Evaluation of
40
Average Seek Time

an Optimized Disk Schedduling Algorithm (ODSA)”,


35 International Journal of Computer Applications, Vol. 40,
No. 11, Feb 2012, pp. 28-35.
30
[3] A. Silberschatz, P. B. Galvin, and G. Gagne, “Operating
25 System Concepts”, 7th Edn., John Wiley and Sons Inc,
2005, ISBN 0-471-69466-5.
20
[4] W. Stallings, “Operating Systems”, 4th Edn., Pearson
15 Education Pte. Ltd., 2007, ISBN 81-7808-503-8.
10 [5] Robert Geist, Stephen Daniel, “A Continuum of Disk
5 Scheduling Algorithms” ACM Transactions on
Computer Systems” Vol. 5, No. 1, Feb 1987, pp. 77-92
0
[6] C. Staelin, G. Amir, D. B. Ovadia, R. Dagan, M.
FCFS IFCFS Melamed and D. Staas, “ Real-time disk scheduling
algorithm allowing concurrent I/O requests”, HP
Fig 9: Comparison of Average Seek Time (Case 3) Laboratories, HPL-2009-344.
[7] A. L. N. Reddy, Jim Wyllie and K. B. R. Wijayaratne,
“Disk Scheduling in a Multimedia I/O System” ACM
4. CONCLUSION Transactions on Multimedia Computing,
Simulation results shows that the proposed IFCFS disk Communications and Applications” Vol. 1, No. 1, Feb
scheduling algorithm is always giving better performance than 2005, pp. 37-59

24

You might also like