Hard Drive Math
Hard Drive Math
In computer architecture,
Magnetic disk is a storage device that is used to write, rewrite and access data.
It uses a magnetization process.
Architecture-
The time taken by the disk to complete an I/O request is called as disk service time or disk access time.
Components that contribute to the service time are-
1. Seek time
2. Rotational latency
3. Data transfer rate
4. Controller overhead
5. Queuing delay
1. Seek Time-
The time taken by the read / write head to reach the desired track is called as seek time.
It is the component which contributes the largest percentage of the disk service time.
The lower the seek time, the faster the I/O operation.
Specifications
Seek time specifications include-
1. Full stroke
2. Average
3. Track to Track
1. Full Stroke-
It is the time taken by the read / write head to move across the entire width of the disk from the innermost track
to the outermost track
2. Average-
It is the average time taken by the read / write head to move from one random track to another.
3. Track to Track-
It is the time taken by the read-write head to move between the adjacent tracks.
2. Rotational Latency-
The time taken by the desired sector to come under the read / write head is called as rotational latency.
It depends on the rotation speed of the spindle.
The amount of data that passes under the read / write head in a given amount of time is called as data transfer rate.
The time taken to transfer the data is called as transfer time.
4. Controller Overhead-
5. Queuing Delay-
The time spent waiting for the disk to become free is called as queuing delay.
NOTE-
Storage Density-
Thus,
Innermost track has maximum storage density.
Outermost track has minimum storage density.
Important Formulas-
Alternatively,
If time taken by the head to move from one track to adjacent track = t units and there are total k tracks, then-
Average seek time
= { Time taken to move from track 1 to track 1 + Time taken to move from track 1 to last track } / 2
= { 0 + (k-1)t } / 2
= (k-1)t / 2
6. Formatting Overhead-
Formatting overhead is calculated as-
Formatting overhead
= Number of sectors x Overhead per sector
Formatted disk space also called as usable disk space is the disk space excluding formatting overhead.
It is calculated as-
9. Track Capacity-
Capacity of a track
= Recording density of the track x Circumference of the track
OR
Points to Remember-
The entire disk space is not usable for storage because some space is wasted in formatting.
When rotational latency is not given, use average rotational latency for solving numerical problems.
When seek time is not given, use average seek time for solving numerical problems.
It is wrong to say that as we move from one track to another away from the center, the capacity increases.
All the tracks have same storage capacity.
PRACTICE PROBLEMS BASED ON MAGNETIC DISK-
Problem-01:
Consider a disk pack with the following specifications- 16 surfaces, 128 tracks per surface, 256 sectors per track and
512 bytes per sector.
Answer the following questions-
1. What is the capacity of disk pack?
2. What is the number of bits required to address the sector?
3. If the format overhead is 32 bytes per sector, what is the formatted disk space?
4. If the format overhead is 64 bytes per sector, how much amount of memory is lost due to formatting?
5. If the diameter of innermost track is 21 cm, what is the maximum recording density?
6. If the diameter of innermost track is 21 cm with 2 KB/cm, what is the capacity of one track?
7. If the disk is rotating at 3600 RPM, what is the data transfer rate?
8. If the disk system has rotational speed of 3000 RPM, what is the average access time with a seek time of 11.5
msec?
Solution-
Given-
Number of surfaces = 16
Number of tracks per surface = 128
Number of sectors per track = 256
Number of bytes per sector = 512 bytes
Formatting overhead
= Total number of sectors x overhead per sector
= 219 x 32 bytes
= 219 x 25 bytes
= 224 bytes
= 16 MB
Capacity of a track
= Storage density of the innermost track x Circumference of the innermost track
= 2 KB/cm x 65.94 cm
= 131.88 KB
≅ 132 KB
Problem-02:
What is the average access time for transferring 512 bytes of data with the following specifications-
Average seek time = 5 msec
Disk rotation = 6000 RPM
Data rate = 40 KB/sec
Controller overhead = 0.1 msec
Solution-
Given-
Average seek time = 5 msec
Disk rotation = 6000 RPM
Data rate = 40 KB/sec
Controller overhead = 0.1 msec
Transfer Time-
Transfer time
= (512 bytes / 40 KB) sec
= 0.0125 sec
= 12.5 msec
Problem-03:
A certain moving arm disk storage with one head has the following specifications-
Number of tracks per surface = 200
Disk rotation speed = 2400 RPM
Track storage capacity = 62500 bits
Average latency = P msec
Data transfer rate = Q bits/sec
What is the value of P and Q?
Solution-
Given-
Number of tracks per surface = 200
Disk rotation speed = 2400 RPM
Track storage capacity = 62500 bits
Average Latency-
Problem-04:
A disk pack has 19 surfaces and storage area on each surface has an outer diameter of 33 cm and inner diameter of
22 cm. The maximum recording storage density on any track is 200 bits/cm and minimum spacing between tracks is
0.25 mm. Calculate the capacity of disk pack.
Solution-
Given-
Number of surfaces = 19
Outer diameter = 33 cm
Inner diameter = 22 cm
Maximum recording density = 200 bits/cm
Inter track gap = 0.25 mm
Problem-05:
Consider a typical disk that rotates at 15000 RPM and has a transfer rate of 50 x 10 6 bytes/sec. If the average seek
time of the disk is twice the average rotational delay and the controller’s transfer time is 10 times the disk transfer
time. What is the average time (in milliseconds) to read or write a 512 byte sector of the disk?
Solution-
Given-
Rotation speed of the disk = 15000 RPM
Transfer rate = 50 x 106 bytes/sec
Average seek time = 2 x Average rotational delay
Controller’s transfer time = 10 x Disk transfer time
Problem-06:
Given-
Number of tracks = 500
Number of sectors per track = 100
Number of bytes per sector = 500
Time taken by the head to move from one track to another adjacent track = 1 msec
Rotation speed = 600 RPM
Transfer Time-
Transfer time
= (250 bytes / 5 x 105 bytes) sec
= 50 x 10-5 sec
= 0.5 msec