Documente Academic
Documente Profesional
Documente Cultură
Scheduling Algorithm
Shreyank N Gowda
Department of Computer Science And Engineering, R.V.College Of Engineering, Bangalore,
Karnataka, India
kini5gowda@gmail.com
I. INTRODUCTION
One of the most important functions of the Operating System
is using the hardware present in an utmost efficient manner.
In terms for the disk drives, this means having a fast access
time and disk bandwidth. Access time is nothing but the time
needed for access and the bandwidth of the disk refers to the
rate of data transfer. 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.
Access time has two major components:
1.
Seek time: it is the time for the disk are to move the
heads to the cylinder containing the desired sector.
2.
Standard Deviation:
Where x means the sum of the 'n' terms.
Now that we know the formulae let us proceed to the working
of the algorithm. We will be having the head pointer as a
variable pointing towards something. We will be having 3
temporary arrays A[ ] ,B[ ] and C[ ].
Step 1: Store all the 'n' elements into A[ ]
Step 2: Do while n is not equal to 0
Calculate std_dev, the standard deviation of all terms
A[ ]
Create B[ ] and store in it the absolute difference of all
terms in A[ ] with std_dev
Create C[ ] and in it store the difference in
corresponding elements of B[ ] and head
Find minimum value in C[ ], store position in pos and
move head to pos. Remove from A[ ] all elements
between head and A[pos]. Simultaneously remove
corresponding elements from B and C.
Step 3: Delete A,B and C.
Step 4: Stop
So as the head moves to a new point all the requests in
between are serviced. This helps reducing the amount of
moves that have to be made by the head later on.
The work flow is as shown in fig. 6.
Let us now consider the average for all 3 sequences since all
the 3 gave us different best algorithms.
Table IV. Overall Comparison
Name of Algorithm
FCFS
SSTF
SCAN
C-SCAN
C-LOOK
LOOK
Proposed Algorithm
V. CONCLUSION
Fig. 7. Example for algorithm
IV. EXPERIMENTAL ANALYSIS
Following are example sequences and seek time needed for
all algorithms to perform a comparative study.
1) Sequence: 23, 89, 132, 42, 187 starting with head at 100.
Table I. Comparison for sequence 1
Name of Algorithm
FCFS
SSTF
SCAN
C-SCAN
C-LOOK
LOOK
Proposed Algorithm
Seek Time
421
273
287
366
296
241
251
2) Sequence: 98, 183, 37, 122, 14, 124, 65, 67 starting with
head at 100.
Seek Time
597
307
283
376
328
255
252
3) Sequence: 95, 180, 34, 119, 11, 123, 62, 64 starting with
head at 100.
Table III. Comparison for sequence 3
Name of Algorithm
FCFS
SSTF
SCAN
C-SCAN
C-LOOK
LOOK
Proposed Algorithm
Seek Time
604
259
280
379
325
258
249