CPSC 461: Copyright © 2002 Katrin Becker 1998-2002 Last Modified April 26, 2001 12:56 PM

Hardware Bits Revisited

 

HARD DISKS:

- # tracks on a hard disk platter 200-800 (typically)

- capacity of each track MUST be the same regardless of the physical circumference because the rotational velocity is constant

- storage density for each track will vary - storage capacity based on that of smallest track (on disk with 200 tracks that is track # 199)

Computing Access Times Per Block

Assume Block Size of 1000 bytes.
Average seek time = 5ms
Average Rotational Delay (latency) = 3ms
Transfer Rate = 10 MB/sec
Average access time
=
seek
+
latency
+
transfer
=
5ms
+
3ms/block
+
1000 bytes/block
10 MB/sec
= (5 ms + 3ms + 0.1ms)/block
= 8.1ms/block
What is % of total access time for just seek and delay?
seek + latency
5ms + 3ms
= 98.8%

=

ave access time
8.1 ms
What if we use a fixed-head disk? (no seek, just latency & transfer)
= 3ms + 0.1 ms
= 3.1 ms
% of total time = 3ms / 3.1 ms = 97%
= overall improvement: 8.1/3.1 = 260%


Addressing Hard Disks

Cylinders VS Sectors
Cylinder requires 1 positioning of the read/write arm;
- can have several logical blocks/track
- record # = physical block
Sectoring produces fixed size blocks
- no need for surface or record #'s
- if a block > will fit in one sector we have a spanned record

Capacity of Hard Disk

Assume = 9 recording surfaces
Surface inner diameter = 22 cm
Surface outer diameter = 33 cm
Max Density = 1,600 bits/cm
Min spacing between tracks = 0.25 mm
Rotational speed = 3600 revolutions per minute
Readable radius = 33 - 22 = 11 = 5.5 cm
Outer track can't be at outer edge; inner track can't be at center
#tracks/surface:
tracks/surface
=
readable radius
+ 1
between track spacing
=
5.5 cm
+ 1
   .025 cm
=
221 tracks/surface
bits/track = density * circumference of smallest track
= density * inner diameter * PI
= 1,600 bits/cm * 22 cm/track * 3.14159
= 110,580 bits/track
bits/pack = bits/track * tracks/surface * surfaces/pack
= 110,580 * 221 * 9
= 219,943,620 bits/pack
= ~26.2 MB/pack
Mega = 220 = 1,048,576
What if disk formatted into cylinders? (24 of them)
bits/sector
=
bits/track
sectors/track
=
110,580 bits/track
24 sectors/track
=
4,607 bits/sector (truncated)
bytes/sector     = bits/sector
= 4607/8 = 575 (truncated)
bits/track = 8 * 575 * 24 = 110,400
bits/pack = bits/track * tracks/surface * surfaces/pack
= 110,400 * 221 * 9
= 219,585,600 bits/pack
= 26.17 MB/pack
Data transfer rate on cylinder-addressable disk:
bytes/track = bits/track
bits/byte
= 110,580 / 8 bytes/track
= 13,822 bytes/track
= 13,822 bytes/revolution
transfer rate = bytes/revolution * (revolutions/min)/60sec/min
= 13,882 bytes/revolution * 3600/60
= 13,882 bytes/revolution * 60 rev/sec
= 829,320 bytes/sec = ~ 809.9 KB/sec

Space Calculations for Hard Disk

575 bytes/sector transfer rate = 806 KB/sec
24 sectors/track ave. latency = 8.3 ms
200 tracks/surface ave. seek = 30 ms
20 surfaces/pack 80 bytes records
blocking factor
=
#bytes/sector
=
records/sector
#bytes/record
=
575 bytes/sector
80 bytes/record
=
7 (truncated)
How many cylinders required to store 33,881 blocks of 7 records (80 bytes ea.)?
capacity of track = 1 block/sector * sectors/track
= 1 block/sector * 24 sectors/track
= 24 blocks/track
capacity of cylinder = blocks/track * tracks/cylinder
= 24 blocks/track * 20 tracks/cylinder
= 480 blocks/cylinder

# cylinders required
=
#blocks
blocks/cylinder
=
33,881 blocks
480 blocks/cylinder
=
71 cylinders (rounded)

Buffering & Hard Disks
\

Total time necessary to input previous file:
80 bytes/record
7 records/block
33,881 blocks in 71 cylinders
24 sectors/track
200 tracks/surface
20 surfaces/pack
transfer rate = 806 KB/sec
ave. latency = 8.3 ms
ave. seek = 30 ms
Remember: once the cylinder is found, each block can be read with only latency & transfer.
input
time =
((latency
+ transfer)
* #blocks)
+
(seek
* # of cylinders)
=
((8.3 ms
+ 560 bytes/block )
* 33,881 blk
+
(30 ms/cyl.
* 71 cyl.)
825,344 bytes/sec
=
(8.3 ms/blk
+ 0.679 ms/blk)
* 33,881 blk
+
(2,130 ms)
=
304.21749 sec
+
2.130 sec
=
306.35 sec
=
5.1 min (9.04 ms/block average)
CONTRAST: Random Access; need 1 seek/record...
input time for entire file
= (seek + latency + transfer) * #blocks
= (30 ms + 8.3 ms + 0.679 ms) * 33,881 blocks
= (38.979 ms) * 33,881 blocks
= 1,320.65 sec
= 22 min !
\
What if we buffer: processing time for 1 block = 25 ms
total time = input time for entire file + (processing time/block * # blocks)
= 5.1 min + (25 ms/block * 33,881 blocks)
= 5.1 min + 14.12 min
= 19.22 min
*processing bound*
Double Buffering:
total time = input time for first block + (processing time/block * #blocks)


Back to TopCPSC 461: Copyright © 2002 Katrin Becker 1998-2002 Last Modified April 26, 2001 12:56 PM