Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

H ARD D ISK D RIVES

A SIDE : C OMPUTING T HE AVERAGE S EEK


In many books and papers, you will see average disk-seek time cited as
being roughly one-third of the full seek time. Where does this come from?
Turns out it arises from a simple calculation based on average seek distance, not time. Imagine the disk as a set of tracks, from 0 to N . The seek
distance between any two tracks x and y is thus computed as the absolute
value of the difference between them: |x y|.
To compute the average seek distance, all you need to do is to first add up
all possible seek distances:
N
N
X
X

|x y|.

(36.4)

x=0 y=0

Then, divide this by the number of different possible seeks: N 2 . To compute the sum, well just use the integral form:

x=0

|x y| dy dx.

(36.5)

y=0

To compute the inner integral, lets break out the absolute value:

(x y) dy +

y=0

(y x) dy.

(36.6)

y=x

Solving this leads to (xy 12 y 2 ) + ( 21 y 2 xy)


0

which can be simpli-

fied to (x2 N x + 21 N 2 ). Now we have to compute the outer integral:

(x2 N x +

x=0

1 2
N ) dx,
2

(36.7)

which results in:

1
N
N 2
( x3 x2 +
x)
3
2
2

N3
.
3

(36.8)

Remember that we still have to divide by the total number of seeks (N 2 )


3

to compute the average seek distance: ( N3 )/(N 2 ) = 13 N . Thus the average


seek distance on a disk, over all possible seeks, is one-third the full distance.
And now when you hear that an average seek is one-third of a full seek, youll
know where it came from.

A RPACI -D USSEAU

F OUR
E ASY
P IECES
( V 0.4)

You might also like