Hardware Reference
In-Depth Information
potential future use, and remapping bad sectors. This latter function is caused by
the existence of sectors with a bad (permanently magnetized) spot. When the con-
troller discovers a bad sector, it replaces it by one of the spare sectors reserved for
this purpose within each cylinder or zone.
2.3.3 IDE Disks
Modern personal computer disks evolved from the one in the IBM PC XT,
which was a 10-MB Seagate disk controlled by a Xebec disk controller on a plug-
in card. The Seagate disk had 4 heads, 306 cylinders, and 17 sectors/track. The
controller was capable of handling two drives. The operating system read from
and wrote to a disk by putting parameters in CPU registers and then calling the
BIOS ( Basic Input Output System ), located in the PC's built-in read-only memo-
ry. The BIOS issued the machine instructions to load the disk controller registers
that initiated transfers.
The technology evolved rapidly from having the controller on a separate board,
to having it closely integrated with the drives, starting with IDE ( Integrated Drive
Electronics ) drives in the mid 1980s. However, the BIOS calling conventions
were not changed for reasons of backward compatibility. These calling conven-
tions addressed sectors by giving their head, cylinder, and sector numbers, with the
heads and cylinders numbered starting at 0 and the sectors starting at 1. This
choice was probably due to a mistake on the part of the original BIOS programmer,
who wrote his masterpiece in 8088 assembler. With 4 bits for the head, 6 bits for
the sector, and 10 bits for the cylinder, the maximum drive could have 16 heads, 63
sectors, and 1024 cylinders, for a total of 1,032,192 sectors. Such a maximum
drive has a capacity of 504 MB, which probably seemed like infinity at the time
but certainly does not today. (Would you fault a new machine today that could not
handle drives bigger than 1000 TB?)
Unfortunately, before too long, drives below 504 MB appeared but with the
wrong geometry (e.g., 4 heads, 32 sectors, 2000 cylinders is 256,000 sectors).
There was no way for the operating system to address them due to the long-frozen
BIOS calling conventions. As a result, disk controllers began to lie, pretending
that the geometry was within the BIOS limits but actually remapping the virtual
geometry onto the real geometry. Although this approach worked, it wreaked
havoc with operating systems that carefully placed data to minimize seek times.
Eventually, IDE drives evolved into EIDE drives ( Extended IDE ), which also
support a second addressing scheme called LBA ( Logical Block Addressing ),
which just numbers the sectors starting at 0 up until a maximum of 2 28
1. This
scheme requires the controller to convert LBA addresses to head, sector, and cylin-
der addresses, but at least it does get beyond the 504-MB limit. Unfortunately, it
created a new bottleneck at 2 28
2 9 bytes (128 GB). In 1994, when the EIDE
standard was adopted, nobody in their wildest imagination could imagine 128-GB
×
 
 
Search WWH ::




Custom Search