SME
Operating Systems · Problem type
Disk access time
Use this for “A disk seeks in 9 ms and spins at 7200 rpm. How long does reading 4 KiB at 100 MB/s take?”
This is an example. Type your own values to start a new problem.
T (ms)
=
tₛₑₑₖ (ms)
+
tᵣₒₜ (ms)
+
txfer (ms)
n
Spindle speed
example · rpm
S
Request size
example
r
Transfer rate
example
Formulas
tᵣₒₜ
=
0.5
×
60
n
0.004167
=
0.5
×
60
7,200
txfer
=
S
r
4.096 ×
10
-5
=
4,096
100,000,000
T
=
tₛₑₑₖ
+
tᵣₒₜ
+
txfer
0.01321
=
0.009
+
0.004167
+
(4.096
×
10
-5
)
Formulas are worked in s, B, B/s. The step-by-step shows the conversions.
Assumptions
•
On average the sector is half a turn away once the head arrives, and one turn takes 60 ÷ n seconds.
•
The size is in binary units (1 KiB = 1024 bytes) and the rate in decimal ones (1 MB/s = 10⁶ bytes a second).
•
Queueing and controller delays are left out.
Step-by-step
WE KNOW
tₛₑₑₖ = 9 ms, n = 7,200 rpm, S = 4 KiB, r = 100 MB/s
FIND
rotational latency (tᵣₒₜ), transfer time (txfer), access time (T)
Step 1 · Convert to the formula’s units
The formulas don’t work directly in the units you chose, so convert first (to s, B, B/s).
tₛₑₑₖ = 9 ms = 0.009 s (1 s = 1000 ms)
S = 4 KiB = 4,096 B (1 KiB = 1024 B)
r = 100 MB/s = 100,000,000 B/s (1 MB/s = 10⁶ B/s)
Step 2 · Find rotational latency (tᵣₒₜ)
Use tᵣₒₜ = 0.5 × 60 ÷ n
One
turn
takes
60
n
seconds,
and
the
sector
is
half
a
turn
away
on
average.
tᵣₒₜ
=
0.5
×
60
7,200
tᵣₒₜ
=
30
7,200
tᵣₒₜ = 0.004167 s
Step 3 · Find transfer time (txfer)
Use txfer = S ÷ r
The bytes to read over the bytes passing the head each second.
txfer
=
4,096
100,000,000
txfer
=
4.096 ×
10
-5
s
Step 4 · Find access time (T)
Use T = tₛₑₑₖ + tᵣₒₜ + txfer
The head moves to the track, waits for the sector, then reads it: one after another.
T
=
0.009
+
0.004167
+
(4.096
×
10
-5
)
T
=
0.013167
+
(4.096
×
10
-5
)
T
=
0.01321
s
Step 5 · Convert the answers
Change each answer back to the unit you chose.
tᵣₒₜ = 0.004167 s = 4.1667 ms (1 s = 1000 ms)
txfer = 4.096 × 10⁻⁵ s = 0.04096 ms (1 s = 1000 ms)
T = 0.01321 s = 13.2076 ms (1 s = 1000 ms)
Check
Put the numbers back in. Both sides should match.
0.004167
=
0.5
×
60
7,200
✓
4.096 ×
10
-5
=
4,096
100,000,000
✓
0.01321
=
0.009
+
0.004167
+
(4.096
×
10
-5
)
✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.