Tuesday, August 5, 2008

Hard Disk Capacity measurements

Capacity of a hard disk drive is usually quoted in gigabytes and terabytes. Older HDDs quoted their smaller capacities in megabytes, the first drives for PCs being just 5 or 10 MB.
The capacity of an HDD can be calculated by multiplying the number of
cylinders by the number of heads by the number of sectors by the number of bytes/sector (most commonly 512). Drives with the ATA interface and a capacity of eight gigabytes or more behave as if they were structured into 16383 cylinders, 16 heads, and 63 sectors, for compatibility with older operating systems. Unlike in the 1980s, the cylinder, head, sector (C/H/S) counts reported to the CPU by a modern ATA drive are no longer actual physical parameters since the reported numbers are constrained by historic operating-system interfaces and with zone bit recording the actual number of sectors varies by zone. Disks with SCSI interface address each sector with a unique integer number; the operating system remains ignorant of their head or cylinder count.
The old C/H/S scheme has been replaced by
logical block addressing. In some cases, to try to "force-fit" the C/H/S scheme to large-capacity drives, the number of heads was given as 64, although no drive has anywhere near 32 platters.
Hard disk drive manufacturers specify disk capacity using the
SI prefixes mega-, giga- and tera-, and their abbreviations M, G and T. Byte is typically abbreviated B.
Most operating-system tools report capacity using the same abbreviations but actually use
binary prefixes. For instance, the prefix mega-, which normally means 106 (1,000,000), in the context of data storage can mean 220 (1,048,576), which is nearly 5% more. Similar usage has been applied to prefixes of greater magnitude. This results in a discrepancy between the disk manufacturer's stated capacity and the apparent capacity of the drive when examined through most operating-system tools. The difference becomes even more noticeable for a gigabyte (7%), and again for a terabyte (9%). For a petabyte there is a 11% difference between the SI (1000^5) and binary (1024^5) definitions. For example, Microsoft Windows reports disk capacity both in decimal-based units to 12 or more significant digits and with binary-based units to three significant digits. Thus a disk specified by a disk manufacturer as a 30 GB disk might have its capacity reported by Windows 2000 both as "30,065,098,568 bytes" and "28.0 GB". The disk manufacturer used the SI definition of "giga", 109 to arrive at 30 GB; however, because Microsoft Windows, Mac OS and some Linux distributions use "gigabyte" for 1,073,741,824 bytes (230 bytes), the operating system reports capacity of the disk drive as (only) 28.0 GB.

No comments: