Cylinder-head-sector
From Wikipedia, the free encyclopedia
Cylinder-head-sector, also known as CHS, is a method of giving addresses to data on a hard drive.
Platters
Every disk drive consists of one or more platters. Data is stored on the surface of a platter. A platter can be thought of as a collection of concentric, flat rings called tracks.
Cylinder
A cylinder is comprised of all tracks that can be accessed by the read/write heads whithout moving the read/write access arm mechanism.
Sectors
A platter can also be thought of as a collection of slices called sectors.
Blocks
The intersection of a cylinder and a sector is called a block. These blocks are the smallest geometrical breakdown of a disk, and they represent the smallest amount of data with which a disk can deal (usually 512 bytes).
Heads
Data is written to and read from the surface of a platter by a device called a head. Naturally, a platter has 2 sides and thus 2 surfaces on which to manipulate data; usually there are 2 heads per platter--one on each side.
Tracks
Thus, specifying a cylinder and a head actually specifies a circular strip of data on one side of the disk. This strip is called a track; this concept has no real practical value.
CHS Addressing
Hence, each block of data can be addressed by specifying a cylinder, head, and sector. This is the CHS geometry and addressing of a disk drive.
The number of blocks on one side of a platter is
blocksPerPlatterSide = (cylindersPerPlatter)*(SectorsPerPlatter)
The number of blocks per platter is:
blocksPerPlatter = (blocksPerPlatterSide)*(sidesUsedPerPlatter)
which is usually written in terms of the number of heads used:
blocksPerPlatter = (blocksPerPlatterSide)*(HeadsPerPlatter)
This is usually expanded:
blocksPerPlatter = (cylindersPerPlatter)*(SectorsPerPlatter)*(HeadsPerPlatter)
rearranged:
blocksPerPlatter = (cylindersPerPlatter)*(HeadsPerPlatter)*(SectorsPerPlatter)
and then rewritten as:
blocksPerPlatter = (Cylinders)*(Heads)*(Sectors)
Example
A 1.44 MB floppy disk has 80 cylinders (numbered 0 to 79), 2 heads (numbered 0 to 1) and 18 sectors (numbered 1 to 18). Then:
blocksPerPlatter = (80)*(2)*(18) = 2880
History
Older hard drives, such as MFM and RLL drives, divided each cylinder into an equal number of sectors and the CHS values matched the physical makeup of the drive. A drive with a CHS value of 500 x 4 x 32 would have 500 tracks per side of each platter, two platters, and 32 sectors per cylinder, with a total of 32,768,000 bytes (about 31 megabytes). Most modern drives have a surplus space that doesn't make a cylinder boundary. Each partition should always start and end at a cylinder boundary. Only some of the most modern operating systems may disregard this rule, but this can cause some compatibility problems, especially if the user wants to boot more than one OS on the same drive.
IDE drives have replaced the MFM and RLL drives, and are much more efficient at storing data. They use Zone Bit Recording (ZBR), where the number of sectors in a cylinder varies with its location on the drive. Cylinders nearer to the edge of the platter contain more sectors than cylinders near the spindle because there is more space in a given track near the edge of the platter. The CHS addressing system does not work on these drives because of the varying number of sectors per cylinder. An IDE drive can be configured in system BIOS with any configuration of cylinders, heads, and sectors that does not exceed the capacity of the drive. The drive converts the given CHS address into the actual address for the specific hardware configuration.
[edit] See also
[edit] External links
- Extended CHS (ECHS) / Large Mode from The PC Guide.