Skip to main content

Aside Computing The Average Seek

This page is a generated reference surface for selective reading. It exists to keep the learner apps guide-first while still preserving source access.

Learning objectives

  • Explain the main ideas and vocabulary in Aside Computing The Average Seek.
  • Work through the source examples for Aside Computing The Average Seek without depending on raw chunk order.
  • Use Aside Computing The Average Seek as selective reference when learner modules point back to Ostep.

Prerequisites

  • None curated yet.

Module targets

  • module-04-file-systems-io

AI companion modes

  • Explain simply
  • Socratic tutor
  • Quiz me
  • Challenge my understanding
  • Diagnose my confusion
  • Generate extra practice
  • Revision mode
  • Connect forward / backward

Source-of-truth note

This unit is anchored to Ostep and the source chapter "Aside Computing The Average Seek". Use external resources only to clarify, extend, or modernize details without replacing the chapter's conceptual spine.

External enrichment

No chapter-specific enrichment resources are curated yet. Add them in the unit manifest when a source clearly improves learning.

Source provenance

  • Primary source: Ostep
  • Source chapter: Aside Computing The Average Seek
  • Raw source file: 174-aside-computingthe-average-seek.md

Merged source

Aside Computing The Average Seek

ASIDE: COMPUTINGTHE"AVERAGE" SEEK

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, from0toN. The seek distance between any two tracksxandyis 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-y|. (37.4)

x=0y=0

Then, divide this by the number of different possible seeks: N2. To compute the sum, we'll just use the integral form:

∫ N ∫ N

|x-y|dydx. (37.5)

x=0 y=0

To compute the inner integral, let's break out the absolute value:

∫ x ∫ N

(x-y) dy+ (y-x) dy. (37.6)
y=0 y=x

∣x ∣N

Solving this leads to (xy-1y2)∣ + (1y2-xy)∣ which can be sim- 2 0 2 x plified to(x2-N x+1N2). Now we have to compute the outer integral:

2

∫ N

2 1 2

(x -N x+N) dx, (37.7)
x=0

which results in:

∣N 1 2 ∣ 3 3 N 2 N ∣ N

( x - x + x)∣ = . (37.8)

3 2 2 3 0

Remember that we still have to divide by the total number of seeks 2 N3 2 1 (N) to compute the average seek distance:( )/(N) = N. Thus the 3 3 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, you'll know where it came from.

9 8 10 21 20 22 33 7 32 34 11 19 23 31 35

Spindle 6 18 30 24 12 0 29 25 17 13 5 28 26 1 27 16 14 15 4 2 3

Figure 37.7:SSTF: Scheduling Requests 21 And 2