The Complete PC Upgrade & Maintenance Guide, Sixteenth Edition

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

SYBEX Sample Chapter

The Complete PC Upgrade &


Maintenance Guide, Sixteenth Edition
Mark Minasi with Faithe Wempen & Quentin Docter

Chapter 8: Hard Disk Drive Overview and Terminology

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved. No part of this publication
may be stored in a retrieval system, transmitted, or reproduced in any way, including but not limited to photocopy, photograph,
magnetic or other record, without the prior agreement and written permission of the publisher.

ISBN: 0-7821-4431-4

SYBEX and the SYBEX logo are either registered trademarks or trademarks of SYBEX Inc. in the USA and other countries.

TRADEMARKS: Sybex has attempted throughout this book to distinguish proprietary trademarks from descriptive terms by following
the capitalization style used by the manufacturer. Copyrights and trademarks of all products and services listed or described herein
are property of their respective owners and companies. All rules and laws pertaining to said copyrights and trademarks are inferred.

This document may contain images, text, trademarks, logos, and/or other material owned by third parties. All rights reserved. Such
material may not be copied, distributed, transmitted, or stored without the express, prior, written consent of the owner.

The author and publisher have made their best efforts to prepare this book, and the content is based upon final release software
whenever possible. Portions of the manuscript may be based upon pre-release versions supplied by software manufacturers. The
author and the publisher make no representation or warranties of any kind with regard to the completeness or accuracy of the
contents herein and accept no liability of any kind including but not limited to performance, merchantability, fitness for any particular
purpose, or any losses or damages of any kind caused or alleged to be caused directly or indirectly from this book.

Sybex Inc.
1151 Marina Village Parkway
Alameda, CA 94501
U.S.A.
Phone: 510-523-8233
www.sybex.com
4431.book Page 257 Friday, May 20, 2005 12:33 AM

Chapter 8

Hard Disk Drive Overview


and Terminology
◆ Disk Basics
◆ Disk Geometry
◆ Disk Capacity Barriers
◆ Hard Disk Interfaces
◆ Disk Performance Characteristics
◆ DMA and PIO Modes

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 258 Friday, May 20, 2005 12:33 AM

258 CHAPTER 8 HARD DISK DRIVE OVERVIEW AND TERMINOLOGY

Introduction
Hard disks are important because they store most of the important data that a computer user creates,
manipulates, and references in daily work. When upgrading and repairing computers, it’s useful to
understand the technical aspects of hard disk technology so you’ll have a better picture of what can
go wrong and how to fix it. This chapter presents a technical overview of hard disk technology from
a hardware perspective and explains what factors separate one disk from another and why some
disks may be subject to capacity limitations in certain systems.

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 259 Friday, May 20, 2005 12:33 AM

DISK BASICS 259

Disk Basics
A disk is a form of nonvolatile storage. That means whatever is placed on the disk remains there even
when the computer’s power is turned off (unlike with RAM, which is volatile storage.) Another name
for nonvolatile storage is secondary storage. (You’ll probably see a question that asks about secondary
storage if you take the A+ exam.)
There are two technologies for disk storage: magnetic and optical. Magnetic disks store data in pat-
terns of positive and negative magnetic charge in tiny metal particles on the disk surface. Each tran-
sition between a positive and negative area is interpreted as a 1 bit; each spot that lacks a transition
is interpreted as a 0 bit. Optical disks, in contrast, store data in patterns of greater and lesser reflec-
tivity. As with magnetic disks, a 1 bit is represented by a change (from either greater to lesser or lesser
to greater), and a 0 bit is represented by a lack of change. Examples of optical discs include CD-ROM,
CD-R, and DVD. Chapter 9, “CD-ROM and DVD Drives,” covers optical discs in greater detail; this
chapter will focus on magnetic disks.
A hard disk is called hard because the platters inside the disk casing are rigid and fairly thick.
They’re made of aluminum or glass, and they’re coated with a fine dusting of iron particles. Multiple
disk platters are stacked on a spindle inside the hard disk cartridge. Each platter is capable of holding
billions of bits of data per square inch. A motor on the spindle drives the platters at high speeds—any-
where from 3600 to 12,000 revolutions per minute (rpm).
Each platter is the same physical diameter as every other platter in the stack. Most desktop hard
disks today use 31⁄2 -inch platters, and most notebook computers use 21⁄2 -inch platters. IBM Micro-
drives have platters that are even smaller: 1 inch. Hard disks are mostly interchangeable with one
another at a given size. For example, if you need to replace the hard disk in a notebook PC, you could
go into any computer store and buy any brand of 21⁄2 -inch hard drive. (Different drives have different
performance specs and capacities, of course, as I’ll get to later in this chapter.)

Hard Disk versus Hard Drive


What’s the difference between a hard disk and a hard drive?
One acceptable answer is that there is no difference—the terms are interchangeable. The full name is hard
disk drive; both hard disk and hard drive are valid shortened versions. Here’s why: Unlike with CD and
floppy drives, the disk portion (the platters on which the data is stored) isn’t removable from the drive por-
tion (the read and write mechanisms). It’s all one package. Therefore, there’s little occasion to refer to only
the drive portion or only the disk portion. The whole thing is the hard disk or hard drive.
However, some people attempt to make a distinction between the two terms, and this distinction has to do
with the way the operating system uses the hardware. When referring to the hardware—the physical hard
disk drive—people tend to call that the disk, as in disk partitioning utility, disk crash, or disk error. (However,
when you go to buy one in the store, the box will usually say “hard drive” rather than “hard disk.”)
When that disk is partitioned into one or more drive letters, each of those drive letters is commonly
referred to as a logical drive, or just drive. So a single hard disk drive is one disk, but potentially many
drives. For example, you would refer to the C: drive, not the C: disk.
When speaking in general of a hard disk drive, however, either term is acceptable, and you’ll hear both
hard disk and hard drive thrown around synonymously in almost all techie circles. You’ll notice that this
book goes back and forth between the two terms at times.

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 260 Friday, May 20, 2005 12:33 AM

260 CHAPTER 8 HARD DISK DRIVE OVERVIEW AND TERMINOLOGY

The platters are permanently sealed inside an airtight metal casing. The sealed enclosure prevents
foreign contaminants such as dust particles, fingerprints, or smoke particles from affecting the vari-
ous components and operation of the disk drive. This is necessary because the read/write heads oper-
ate very close to the surface of the disk. The slightest little particle of dust can cause a head crash, which
can occur if the head makes contact with the disk surface itself or if the head touches particles on the
disk surface.
Each side of each platter has its own read/write head, which consists of a sensor that reads the
magnetic charges on the disk surface and a magnet that can change the charge on specified areas to
write to the disk. All of the read/write heads for the platters are connected to a single actuator arm that
moves in and out in response to requests from its controller. Figure 8.1 shows a cutaway view of a typ-
ical hard disk drive.

Figure 8.1
Cutaway view of a hard
disk drive

Disk Geometry
To understand how disks store data, you need to understand disk geometry. No, it’s not a new kind
of math! Disk geometry refers to the electronic organization of any type of disk drive, the actual phys-
ical number of heads, cylinders, tracks, and sectors. The following sections look at each of those items
in detail.

Heads
A hard disk has an electromagnetic read/write head for each side of each platter, so when a specification
describes the number of heads, you automatically also know the number of platters. For example, if
a drive has three platters, it has six heads. The sides of the platter are also referred to as surfaces.

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 261 Friday, May 20, 2005 12:33 AM

DISK GEOMETRY 261

NOTE Hard drives today have two specifications for heads: logical and physical. The physical refers
to the number of platter sides. The logical refers to the way the drive is addressed by its controller.
A typical number of logical heads is 16. This will become clearer later in the chapter when you learn
about sector translation. For now, just know that when you see 16 as the number of disk heads in a
drive’s specification, it probably doesn’t actually have eight platters. It only appears to because of
the way its physical specs are manipulated by its controller.

The read/write heads mount on an actuator arm that moves the heads over the surface of the plat-
ter on a thin cushion of air to the proper track. A servo system generates feedback, which accurately
positions the read/write heads. All the heads are on the same arm, so they are all at the same in-out
position at the same time in relation to the stack of platters. That’s okay, though, because hard disk
data isn’t stored in a physically contiguous way. Each of those heads can be writing data at the same
time for the same file, and the operating system will still see that data as being all part of a single file.
As mentioned earlier in the chapter, the read/write heads read by looking for transitions between
positive and negative magnetic charges. When a head finds a change in the polarity, it sends an elec-
trical pulse to the disk controller that says 1. When enough time passes that it might have found a
change but it did not, the disk controller interprets the silence as a 0.

Tracks
Like the growth rings on a tree cross-section, each side of each platter contains concentric rings called
tracks. Each possible in-out position of the actuator arm denotes a separate track. The exact number
of tracks that a disk can have per surface varies depending on the sensitivity of the drive’s inner
mechanical parts. On 1.44-megabyte (MB) floppy disks, there are typically 80 tracks per side, and very
old hard disks might have 305 tracks per side. On modern hard disks, there may be 16,000 or more
tracks per side. Each track is numbered. The outermost track is 0, with the numbers increasing as you
move toward the center spindle (see Figure 8.2).

Figure 8.2
Tracks are concentric
rings on a platter surface.

Track

Cylinders
Remember that all the read/write heads are on a single actuator arm, so they have no choice but to
move as a group. Well, all of the tracks simultaneously accessible at a single actuator arm position are
known as a cylinder. For example, if the actuator arm has positioned the read/write heads on the out-
ermost track on each platter, then the collection of outermost tracks are forming a cylinder there col-
lectively. It’s as if someone took a doughnut-shaped cookie cutter and sliced down through all the
platters to capture all the tracks in a certain spot (see Figure 8.3).

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 262 Friday, May 20, 2005 12:33 AM

262 CHAPTER 8 HARD DISK DRIVE OVERVIEW AND TERMINOLOGY

Figure 8.3
It’s easier to store data on the same track on each platter—it can all
The relationship be accessed without moving the read/write head back and forth.
between tracks and
cylinders on a disk
All of the same tracks on one platter
are collectively known as a cylinder.

Track on one platter

Platters

The number of tracks per surface is identical to the number of cylinders. Therefore, in the specifi-
cations for a drive, manufacturers don’t report the number of tracks, but instead they report the num-
ber of cylinders. If you know the number of heads and you know the number of cylinders, you can
multiply them to find out the number of tracks overall.

Sectors
Each track of a platter is further divided into individual segments called sectors. Sectors are created by
a series of straight lines that cut the platter into pie-shaped wedges, as in Figure 8.4.

Figure 8.4
Sectors are sections
of a track.

A sector is the smallest accessible unit on a disk. Sectors may vary slightly in their physical size,
with the ones at the outer edges of the disk being larger than the inner ones; however, all sectors hold
exactly the same amount of data: 512 bytes. In addition to containing data, each sector also contains
a few extra bytes dedicated to error detection and correction and internal disk control.
The number of sectors per track varies depending on the drive, anywhere from 8 (on the oldest
type of floppy disk) to 60 or more (on modern hard disks).

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 263 Friday, May 20, 2005 12:33 AM

DISK GEOMETRY 263

Zone Bit Recording


Before leaving the subject of sectors, it’s worth mentioning that the diagrams you’ve seen in this book
so far have all shown drives as having a constant number of sectors per track. That’s not the case on
modern hard drives.
The outer track on a disk is typically double or more the circumference of the innermost track.
With an equal number of sectors on each track, data on the outer track is quite loose, and data on the
innermost track is quite dense.
Placing differing numbers of sectors per track on a disk surface is called zone bit recording (ZBR).
You will also hear the terms multiple zone recording or even just zoned recording in place of ZBR. Con-
sumer demand for greater and greater capacity on smaller and smaller drives, in combination with
cheaper and faster electronics, has led to a growth in the use of ZBR.
Here’s how it works: Based on their location on a disk, the ZBR program groups the tracks into
zones. All tracks within a specific zone are given a constant number of sectors. Movement through the
disk from the innermost zone to the outer zone passes you through multiple zones, each with a higher
number of sectors than the one before.
Most software that you run on a computer won’t know that your disk has ZBR. Because most com-
puter software assumes that each track has a constant number of sectors, ZBR drives keep that soft-
ware happy by pretending that this is true.

Logical Geometry
As mentioned previously, physical geometry refers to the electronic organization of any type of disk
drive—the actual physical number of heads, cylinders, tracks, and sectors. In the olden days of com-
puting (1980s), the physical and logical geometries of a drive were identical. Some problems arose
with that system, however, as drives became larger in capacity and ZBR became an option.
One way to add more capacity to a drive was to add an additional platter or two. However, having
a large number of platters meant using a hefty spindle motor and a fair amount of power, and it made
the hard disk’s physical dimensions unwieldy. The ideal number of physical platters for a hard disk
seemed to be three in terms of size and power consumption. Another way to eke out more capacity
was to use ZBR so that there could be more sectors on the outer edges of the platters, but the BIOS
couldn’t grasp the concepts of certain cylinders having different numbers of sectors.
To accommodate larger drives without increasing the platter count, and to account for ZBR, logical
geometry was introduced. It allows a drive to have two separate geometries: physical and logical. The
drive manufacturer establishes the logical geometry, which is a set of bogus values for the cylinders,
heads, and sectors on the disk. The disk controller gives these bogus values to the basic input/output
system (BIOS). The hard disk controller provides automatic translation between the logical and physi-
cal geometry. The physical geometry is totally hidden. Table 8.1 is an example of the difference between
a drive’s physical and logical geometry (it contains the specifications of one of my hard disks).
In most systems today, additional translation takes place such as logical block addressing (LBA)
to allow large drives to be recognized by the BIOS and operating system. You’ll look at these later in
the chapter.

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 264 Friday, May 20, 2005 12:33 AM

264 CHAPTER 8 HARD DISK DRIVE OVERVIEW AND TERMINOLOGY

Table 8.1: Sample Hard Disk’s Physical and Logical Geometry


Parameters Logical Geometry Physical Geometry
Cylinders 7480 6810

Heads 16 6

Sectors per track 63 122–232

Total sectors 7,539,840 7,539,840

Disk Capacity Barriers


As hard disk sizes have grown exponentially over the past 20 years, there have been some periods of
“growing pains” where operating systems and PC BIOS standards haven’t provided adequate support
for the new larger sizes. The following sections discuss some of these obstacles and how they have been
overcome, and they introduce the technology that was used to overcome them. This stuff is mostly for
history buffs, but people who work on really old systems might benefit from knowing it so that when
the limitations occasionally rear their ugly heads, they can be identified and worked around.

Sector Translation
Nearly all motherboards provide built-in support for Enhanced Integrated Drive Electronics (EIDE)
devices, but with this support comes some limitation.
The AT BIOS command set—developed by IBM for hard disk support and implemented in EIDE—
specifies some limitations on the CHS (cylinder/head/sector) values for drives. Specifically, it limits
a disk’s logical geometry to 1024 cylinders, 16 heads, and 63 sectors per track. This adds up to a hard
disk size of 528MB. This specification was later enhanced to support up to 256 heads for a maximum
capacity of 8.4 gigabytes (GB). (More on that part shortly.)

NOTE So if the limit for EIDE is 8.4GB, how come we have 200GB and larger EIDE hard disks on the
market today? Obviously, that’s not the limit anymore. This and subsequent barriers have been bro-
ken, and you’ll learn how that was done later in this chapter, in the “INT13 Addressing” section.

Capacity wasn’t a problem until around 1994, when consumers began demanding higher-capacity
drives and manufacturers became capable of delivering them.
The main problem was the cylinder limit. Drive manufacturers could make drives tens or even hun-
dreds of thousands of tracks physically, but the PC BIOS couldn’t address them. One solution has been
to change the BIOS limitation—and that did happen eventually. But another solution has been to spoof
the drive’s CHS values reported to the BIOS so that they appear to be within the acceptable specs.
Just as the drive’s inner circuitry allows it to have a different logical geometry than physical, sector
translation allows the BIOS to see the drive’s logical geometry by way of a translation table that converts
its values to something it can accept. This allows the BIOS to address more of the capacity of the drive.
Two main methods of sector translation have been used; the following sections look at some of them.

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 265 Friday, May 20, 2005 12:33 AM

DISK CAPACITY BARRIERS 265

Extended CHS (ECHS)


One method of CHS translation divides the number of cylinders by an integer and multiplies the
number of heads by the same integer when passing CHS values from the drive to the operating sys-
tem. Usually, this is accomplished by multiplying the number of heads by two and dividing the num-
ber of cylinders by two. This method is sometimes called Large or ECHS in the BIOS Setup.
When a disk is set up to use ECHS, two translations take place for every interaction with the PC.
First, the physical geometry of the drive is translated into its logical geometry through the disk’s own
onboard controller. Then the values passed to the system BIOS are run through a second translator to
bring its request in line with the BIOS limitations.
So, for example, let’s say you’re running a BIOS that’s been updated to support up to 1024 cylinders,
256 heads, and 63 sectors per track. You have a hard disk with a logical geometry of 1970 cylinders, 16
heads, and 63 sectors per track. The heads and sectors are okay, but there are too many cylinders. So ECHS
divides the cylinders by 2 and multiplies the heads by 2, giving a translated CHS of 985, 32, and 63. That
translation is accomplished behind the scenes when you choose Large or ECHS in BIOS Setup; as the sys-
tem user, you’ll be concerned only with the disk’s standard logical geometry for setup purposes.

Real-World Advice
Nearly every BIOS can autodetect hard disks these days, but if you ever have to manually enter the CHS val-
ues for a drive in BIOS, keep in mind that the BIOS expects you to enter the untranslated logical geometry.
When you set its translation setting in BIOS to Large or LBA, it’ll take care of any further translation itself.

Logical Block Addressing (LBA)


LBA abandons the whole notion of CHS addressing in favor of a sequential numbering scheme for all
sectors, with no concern for their head or cylinder location. Such a sector-addressing scheme is a linear
addressing scheme.
LBA assigns each sector a unique number starting at 0 and going up to the total number of sectors
on the disk minus 1 (that is, if the cylinder has 18 sectors, LBA would number them 0–17). The transla-
tion is similar to ECHS translation, but instead of translating to the drive’s logical geometry, translation
occurs directly to a logical block number (a sector number).

Real-World Advice
LBA is the preferred translation method today, and modern drives and BIOS will default to it. You can assume
that any EIDE hard disk you buy today will use LBA and that the BIOS will set it up that way automatically.

INT13 Addressing
As you just learned, ECHS and LBA are two different ways of breaking the 528MB barrier for drive
sizes. By the early ‘90s, however, hard disk sizes had grown to the point where another barrier needed
to be broken: the 8.4GB barrier imposed by INT13.

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 266 Friday, May 20, 2005 12:33 AM

266 CHAPTER 8 HARD DISK DRIVE OVERVIEW AND TERMINOLOGY

INT13 is a set of programming routines built into the read-only memory (ROM) chips on the mother-
board or an input/output (I/O) interface card. The ROM BIOS uses INT13 routines to boot from a drive.
(INT is short for interrupt, but it’s a different kind of interrupt than the IRQs that the operating system
uses to communicate with hardware.)
The use of INT13 requires specific hard disk parameters and exact head, cylinder, and sector
addressing. Conventional INT13 functions use 24 bits to represent the disk geometry, as shown in
Table 8.2.

Table 8.2: INT13 API 24-Bit Allocation of the Hard Disk


Number of Bits Allocated For the For a Total of
10 bits Cylinder number 1024 cylinders (210) that the system can address

8 bits Head number 256 heads (28) that the system can address

6 bits Sector number 63 sectors (26 – 1) that the system can address

Therefore, for conventional CHS addressing, using the values 1024 × 256 × 63, it’s possible to address
up to 16,515,072 sectors. And at 512 bytes per sector, you get a theoretical disk capacity of 8.4GB.
LBA views the available address bits as a single number. Larger disks require a BIOS and operat-
ing system that support INT13 extensions or an operating system that bypasses the BIOS and INT13.
INT13 uses 24-bit addressing.
To circumvent the 8.4GB limitation, BIOS developers circa 1995 included extended INT13 func-
tions that use 32 bits to represent addresses, taking the maximum capacity up to 137GB.

NOTE No, we haven’t topped out yet! ATA-6, which you’ll read about in Chapter 10, “Understand-
ing and Installing ATA Drives” (and also briefly in the “Summary of Capacity Barriers” section later
in this chapter), bumps up the maximum to 144 petabytes (that is, 144 million gigabytes), blowing
that 137GB limitation out of the water. That’s why you can walk into a store today and buy a 200GB
hard disk that will work in any new PC.

If a disk drive has a capacity greater than 8.4GB, using INT13 extensions requires changes both to
the BIOS and to the operating system. Note that later versions of Windows 95 and all subsequent ver-
sions (98, Me, XP) already support these extensions, as do most other current operating systems.
Windows NT 4 and Linux don’t. The Windows 2000 and 2003 setups don’t determine whether BIOS
INT13 extensions are enabled or available for use before allowing the creation of a system partition
with more than 1024 cylinders or typically larger than 8.4GB.

ATA Interface Addressing


In Chapter 10, you’ll learn about the various versions of the ATA standard, and how each has
improved and built upon the last one. One particular transition between versions (from ATA-5 to
ATA-6) dramatically increased the maximum theoretical capacity of EIDE disk drives.
The EIDE interface recognizes a drive and figures out its capacity by looking at the logical geom-
etry of the drive: the number of cylinders, heads, and sectors per track that it contains. Before 1994,
drives and the BIOS supported only CHS addressing. Today’s drives support both CHS addressing
and LBA addressing.

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 267 Friday, May 20, 2005 12:33 AM

DISK CAPACITY BARRIERS 267

The EIDE interface up through ATA-5 uses 28 bits to represent the disk address, as shown in Table 8.3.
The BIOS records the information in defined registers; it records the starting address of the data on
the disk, the length of the data transfer, and the read or write command.

Table 8.3: EIDE Interface Disk Addressing


Number of Bits Allocated For the For a Total of
16 bits Cylinder address in the 65,536 cylinders (216) that the system
cylinder register can address

4 bits Head address in the 16 heads (24) that the system can address
head register

8 bits Sector address in the 255 sectors (28 – 1) that the system
sector register can address

Therefore, for CHS addressing for the EIDE interface using the values 65,536 × 16 255, it’s possible
to address up to 267,386,880 sectors. And at 512 bytes per sector, you get a theoretical disk capacity
of 137.4GB.
The 137.4GB limitation has recently been broken with the introduction of the ATA-6 standard, which
uses 48-bit addressing and allows for hard disks as big as 144 petabytes (144 million gigabytes), 100,000
times bigger than ATA-5 could support! You’ll learn more about ATA standards in Chapter 10.

Operating System Limitations on Disk Capacity


The choice of operating system can also affect the disk capacity limitations, although this is becoming
less of an issue with modern operating systems such as Windows 2000 and XP. For example, the Win-
dows NT 4 Workstation was developed before the INT13 extensions, so it isn’t aware of them. Con-
sequently, its boot process has some limitations that prevent Windows NT 4 from using a partition
larger than 8.4GB as a system partition. (Other partitions can be much larger.)
There are also partition size limits depending on the file system in use. Logical drives that use the
FAT16 file system are limited in size to 2.1GB because of the 16-bit addressing scheme. FAT16 is the
only choice for MS-DOS and the original release of Windows 95; later releases of Windows 95 as well
as Windows 98, 2000, and XP all support the 32-bit version, FAT32. (Windows 2000 and XP also sup-
port NTFS 5.0, a different 32-bit file system that’s superior to FAT32 in several ways.)

Summary of Capacity Barriers


This chapter has thrown out a lot of statistics regarding drive capacities, so I’ll bring it all home by
running through a summary of the various barriers you might encounter:
The 528MB barrier IDE/ATA (EIDE/ATA) disks have a limit of 16 logical heads. To compen-
sate, these disks always have a large number of cylinders, but because of the INT13 limitation, they
can see only 1024 of the cylinders and 63 sectors. When the system has a nontranslating BIOS, the
capacity will be 1024 × 16 × 63 × 512, or 528MB. This is the well-known 528MB barrier.

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 268 Friday, May 20, 2005 12:33 AM

268 CHAPTER 8 HARD DISK DRIVE OVERVIEW AND TERMINOLOGY

To overcome this limit, BIOS designers implement one of two translating algorithms for convert-
ing the INT13 API address to the ATA address. The first is BitShift translation, which changes the
cylinder and head values so that the total number of sectors remains the same. This is the most
common translation method. The second algorithm is the LBA assist translation; a system can use
this translation only if the drive supports LBA addressing.
The 2.1GB barrier The most common cause of this barrier is the use of a 16-bit file system such
as FAT16 in MS-DOS. There is also a much rarer scenario in which an older BIOS might report a
disk as 2.1GB even though it is actually larger; this can be fixed with a BIOS update. To tell the dif-
ference, check the drive capacity in BIOS Setup; if it appears correctly there but wrong in the oper-
ating system, it’s the FAT16 thing.
The 4.2GB barrier Some operating systems store the number of heads as an 8-bit value. This can
cause a problem if the BIOS reports 256 heads and BitShift translation is in use. If this is the case,
the maximum capacity is 4.2GB. Note that the LBA assist translation never reports more than 255
heads, so the problem doesn’t exist where the drive and BIOS support LBA.
The 8.4GB barrier The BIOS limitation of 8.4GB (1024 × 256 × 63 × 512) causes this barrier. New
extended INT13 functions were added around 1995 to overcome this barrier. The new extension
passes a 64-bit LBA address in a device address packet. Extended INT13 passes the packet through
host memory rather than through host registers. If the drive supports LBA, the BIOS passes the
lower 28 bits of this address directly to the ATA registers. If LBA support isn’t present, the BIOS
converts the LBA address to a CHS and passes that address to the ATA registers.
The 32GB barrier In some systems, the motherboard BIOS can’t address drives greater than
32GB. This is an LBA addressing limit in the particular BIOS code on the motherboard. It was an
issue mostly on the pre-1999 Award BIOS. All BIOS manufacturers have now made corrections in
their core BIOS, so any motherboard with a BIOS date of 2000 or higher shouldn’t have this prob-
lem. Contact your motherboard manufacturer for information and for a BIOS update if necessary.
The 137GB barrier IDE/ATA drives conforming to ATA-5 standard and lower are limited to 137GB
because of the 28-bit addressing between the controller and the drive. However, ATA-6 has introduced
48-bit addressing, which has increased the maximum size for ATA disks to 144 petabytes. Just make
sure the motherboard or I/O board you’re using to control a drive larger than 137GB is ATA-6 com-
pliant so that it supports 48-bit addressing, and make sure you have Windows XP Service Pack 1 or
higher installed on the PC.
The 144PB barrier 144 petabytes is the current limit on ATA-6 drives, but it’s so far out there that
it’s almost not worth considering as a “limit” at all. A petabyte is a million gigabytes, and who on
earth is going to have a hard disk larger than 144 million gigabytes? At this point, nobody even
comes close. But remember that in the original IBM PC, nobody could imagine needing a hard disk
bigger than 10MB, so in time this barrier too will likely become constrictive and someone will have
to figure out a way around it.

NOTE A thousand gigabytes is a terabyte, and a thousand terabytes (in other words, a million
gigabytes) is a petabyte.

So, what do all these limits mean to you as you are assembling or upgrading a computer? The next
couple of sections sort out that information.

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 269 Friday, May 20, 2005 12:33 AM

DISK CAPACITY BARRIERS 269

Issues with a New Drive on an Old PC


Depending on the age of your old PC, you might encounter one or more of the barriers in the preced-
ing section when installing a new drive in it. The new drive will probably work—after a fashion—but
it might not appear as the correct capacity. The BIOS will attempt to identify the new drive as the most
recent technology it knows about, topping its capacity at whatever the BIOS considers the maximum
size that a hard disk can be.
The most common limitation you’ll run into on a modern system is the 137GB limit that occurs
with systems built prior to August 2002. If you’re buying an EIDE drive that’s larger than 137GB,
make sure you have an ATA-6 compatible motherboard or IDE controller card. (Adding an EIDE con-
troller card is probably more economical than replacing the motherboard. Or you could just live with
the drive being 137GB. That’s a decent size, really, especially for an older computer.)

Real-World Advice
Don’t assume your operating system supports 48-bit disk addressing. Pre–August 2002 versions of Windows XP
don’t, for example, unless you install Windows XP Service Pack 1 or higher. Support is enabled by default with
Service Pack 1. To determine whether you have Service Pack 1, look on the General tab in System Properties. See
Microsoft Knowledge Base article 303013 for more detailed help. Go to http://support.microsoft.com to
access the Knowledge Base.

A drive that’s smaller than 137GB should work well in almost any fairly modern system—you
have to go all the way back to 1995 to find one that won’t take it (except for the few quirky Award
BIOS systems I mentioned earlier). If the BIOS won’t see it as its full size, try updating the BIOS if pos-
sible. If the operating system won’t format it as anything larger than 2.1GB, make sure you are for-
matting it as FAT32 or NTFS.
We haven’t talked yet about drive interfaces in this chapter (that’s coming up soon), but there is
also the interface issue to consider. New drives can be purchased with either EIDE or Serial ATA
interfaces, and an older system probably will not have native support for Serial ATA. You can buy
adapters that allow serial ATA drives to run on EIDE interfaces, and vice versa, but what’s the point
of that? You lose all the performance advantages of serial ATA in a kludged situation like that.

Issues with an Old Drive on a New PC


Since the EIDE interface is backward-compatible on modern systems, you should have no trouble
putting an old drive in a new PC, other than the speed issue. (The old drive is likely going to seem
very slow.)
One exception, however, is with old drives that have been compressed by Microsoft’s DriveSpace
or DoubleSpace utility, which was included with MS-DOS 6 and higher and Windows 95. Such drives
will interface with the BIOS with no problem, and Windows XP will see the drive, but it won’t show
the drive’s contents. Instead it’ll show a very large file that is the inaccessible virtual drive. (That’s
where your files are.) Windows XP will not read a DriveSpace or DoubleSpace volume, so you’ll need
to put the hard disk in a system running Windows 95 or 98 and pull the files off from there.

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 270 Friday, May 20, 2005 12:33 AM

270 CHAPTER 8 HARD DISK DRIVE OVERVIEW AND TERMINOLOGY

Real-World Advice
One way to pull files off a DriveSpace disk is to boot up a virtual machine running Windows 98 in a program
like VMWare. This saves you from having to have access to a whole separate PC. To do this, you’ll need
VMWare (www.vmware.com) and a full installation version of Windows 98. Install VMWare, and then cre-
ate a new virtual machine and install Windows 98 on it. Set it up to access the DriveSpace drive, and pull
the files off to another disk—or decompress the drive using the DriveSpace 3 utility in Windows 98. If the
DriveSpaced drive contains a bootable copy of Windows 98 on it already, you can set up the virtual
machine to boot from that physical hard disk.

Hard Disk Interfaces


A hard disk connects to the computer via a cable connected to a disk interface. The most popular disk
interfaces today are Enhanced Integrated Drive Electronics (EIDE), Serial Advanced Technology
Attachment (Serial ATA), and Small Computer System Interface (SCSI). Serial ATA is becoming the
dominant interface of late because it’s easy to connect, easy to configure, and very fast. I’ll explain
both Serial ATA and EIDE in more detail in Chapter 10, and then we’ll look at SCSI in Chapter 11,
“Understanding and Installing SCSI Drives.” Other possible drive interfaces include Universal Serial
Bus (USB) and FireWire.

NOTE Today’s EIDE drives are usually advertised as UltraATA—for example, UltraATA/133. ATA is
a set of standards governing disk interfacing with a PC, and UltraATA is…well, a simplistic answer
is that it’s a fast type of ATA. I’ll explain more about those ATA standards in Chapter 10.

A hard disk is typically designed to use only one interface, so you must choose the hard disk interface
before you choose the hard disk itself. There’s one exception to that, however. If you are using an external
hard drive, it will typically support both USB and FireWire interfaces. Further, you can buy drive enclo-
sures that let you convert an internal hard disk (usually EIDE) to a USB or FireWire external model.

Real-World Advice
Virtually any EIDE drive can be turned into a USB or FireWire drive with a drive enclosure. This is handy
not only for moving files between computers, but also for troubleshooting. A well-equipped technician
should have a 21⁄2 -inch and 31⁄2 -inch drive enclosure in his or her arsenal.

When selecting a hard disk interface, consider these points:


Performance Generally speaking, internal hard disks have better performance than external ones.
Portability External hard disks are obviously more portable.
Built-in interface on motherboard Virtually all motherboards support EIDE, and most new ones
also support Serial ATA. If you go with SCSI, you will need a controller card for it (see Chapter 11).
Table 8.4 briefly describes the available hard disk interfaces. EIDE and ATA are sharing the market
at this writing, but Serial ATA is going to overtake it in popularity very shortly, and other types may
be appropriate for special circumstances. Table 8.4 doesn’t list exact numbers for the performance lev-
els of each interface, because they vary widely according to the variant of that interface being used
and the disk drive’s own capabilities.

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 271 Friday, May 20, 2005 12:33 AM

HARD DISK INTERFACES 271

Table 8.4: Hard Disk Interfaces


Interface Pros Cons Notes
EIDE Supported almost Limit of two disks per EIDE Faster and newer options are
universally by all channel. Each EIDE channel available, but this has been the
motherboards. requires an interrupt request standard for more than a decade.
(IRQ). Possible performance Internal only.
problems when two high-
usage drives share a cable.

Serial ATA Faster than regular EIDE. Fast becoming the new Will soon be standard on all new
Easy to connect and standard for desktop systems. systems, so any hardware you
configure. You’ll pay a higher price for it buy will be more likely to be
than for drives that work on usable in future systems than the
the standard EIDE/ATA ordinary EIDE.
ribbon cable interface.

SCSI Fewer problems than EIDE Few motherboards provide Used primarily in high-end
with multiple drives SCSI support natively, so you servers, Redundant Array of
operating at once on the need a SCSI interface card to Inexpensive Discs (RAIDs). Used
same cable. Chainable such which to connect the drive. to be faster than EIDE, but newer
that multiple drives share a EIDE standards have leveled the
single IRQ. playing field. Can be either
internal or external.

USB and Fast, easy to connect and USB hard drives are currently These are two competing interface
IEEE 1394 disconnect. Convenient to external only. FireWire hard standards with similar benefits
(FireWire) share drives between disks can be internal or and performance levels. Most
systems. external. motherboards natively support
USB but not FireWire. However,
you can add an interface card for
FireWire that will allow both
internal and external FireWire
drives to be connected. This is
significant because it makes
FireWire a viable competitor with
Serial ATA for a mainstream hard
disk connection method.

Great for portable systems


because you don’t have to
have an extra drive bay free
to add another hard disk.

Legacy May be the only usable Very old technology for Obsolete.
Parallel interface for an external connecting external hard
drive on a system that lacks disks. Slow and awkward.
USB or SCSI support.

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 272 Friday, May 20, 2005 12:33 AM

272 CHAPTER 8 HARD DISK DRIVE OVERVIEW AND TERMINOLOGY

Hard Disk Performance Characteristics


When shopping for hard disks, you’ll encounter many different numeric statistics on the various
disks you consider. The following sections present explanations of some of the most commonly
shopped-for specifications.

Seeks and Latency


How quickly the disk can find and read a sector is determined in part by access time. Reading a partic-
ular sector consists of two steps: First, move the head to the correct track. Then, once the head is over that
track, wait for the sector to spin under the head, and then read the sector. You see this in Figure 8.5. Seek
time is the time required for the head to position itself over a track. The latency period is how long it takes
the desired sector to move under the head.

Figure 8.5
Reading a particular sector involves two steps:
Reading a sector on a disk

First, move the head to the desired Then, once the head is over that track,
track. That is called seek. wait for the sector to spin under the head.
The wait is called the latency period.

Moving the head takes a lot longer than waiting for the sector to come around. So low seek times
(the time to move the head) are critical to good disk performance.
Table 8.5 shows the formula you’ll want to remember.

Table 8.5: Access Time Formula


Access Time = Seek Time + Rotational Latency Period
Time to find a sector = Time to move to the sector’s + Time to wait for the sector to rotate
cylinder around and appear under the head(s)

Typical Seek Times


Of the seek time and the latency period, the seek time is usually the longer wait. Seek time is usually
expressed in milliseconds (ms). It varies according to how many tracks the heads must traverse. A
seek from one track to the next track is usually quick—just a few milliseconds—but most seeks aren’t
so convenient. Remember, the lower the seek time, the better. Note that in current PCs, a millisecond
is a long period, considering that the measure for modern PC memory is in nanoseconds. This means
the system may have to wait for the hard disk.
A common measure of an average seek is the time the system requires to travel one-third of the
way across the disk. Most benchmark programs use this measurement. You might wonder, “Why not

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 273 Friday, May 20, 2005 12:33 AM

HARD DISK PERFORMANCE CHARACTERISTICS 273

halfway across the disk, rather than one-third?” The reason is that most accesses are short seeks—just
a few tracks.
In the dawn of PC hard drives, companies sold hard disks with seek times of almost 100ms. Today,
the average seek time on a new drive is between 5ms and 10ms. In general, the low speed depends on
what you’re willing to spend. For example, my desktop system has an 80GB EIDE hard disk with a
seek time of 8.9ms—not the worst around, but not the fastest, either. Seek times are built into a drive.
There’s no way for you to improve a drive’s seek time, short of getting a new drive.

Rotational Latency/Rotational Speed


Once a head positions itself over a track, the job’s not done: now the head has to wait for the correct
sector to rotate under it. How much time is a matter of luck: if you’re lucky, the sector is already there;
if you’re really unlucky, you just missed it and will have to wait an entire revolution. As I mentioned
before, this waiting time, whether large or small, is the rotational latency period. A common number
cited is average latency period. This makes the simple assumption that, on average, the disk must make
a half-revolution to get to your sector. Manufacturers calculate the latency period from the spindle
speed. Latency, like seek time, is normally expressed in milliseconds.
Rotational latency is directly affected by rotational speed. Depending on the model, disk drives
rotate between 3,600rpm and 12,000rpm. High-end desktop systems have the higher rotational
speeds; bargain notebook systems typically fall into the lower range.
For a disk rotating at 3600rpm, one-half revolution then takes 1/7200 of a minute = 60/7200 second =
8.33ms. This contributes to the amount of time that the system must wait for service (the rotational
latency). The higher the spindle’s speed (the rpm), the lower the average latency. Table 8.6 lists some
standard spindle speeds and the corresponding average and worst-case rotational latency period (in
milliseconds). Calculate the average latency based on a half rotation of the disk; calculate the worst-
case latency on a full rotation of the disk.
Table 8.6 shows that the higher the speed of the spindle, the lower the latency. As new technologies
reduce drive costs, manufacturers are increasing the spindle speeds of the newer and more expensive drives.

Table 8.6: Rotational Latency and Spindle Speeds


Average Rotational Worst-Case Rotational
Spindle Speed (rpm) Latency (in ms) Latency (in ms)
3600 8.3 16.7

4500 6.7 13.3

5200 5.8 11.5

5400 5.6 11.1

6300 4.8 9.5

7200 4.2 8.3

10,000 3.0 6.0

12,000 2.5 5.0

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 274 Friday, May 20, 2005 12:33 AM

274 CHAPTER 8 HARD DISK DRIVE OVERVIEW AND TERMINOLOGY

Data Transfer Rate


After a disk has found the data, how fast can it transfer that data to the PC? As you’ve already read,
this is called the data transfer rate. Specifically, the transfer rate is a measure of the amount of data that
the system can access over a period of time (typically one second). It’s determined by the external data
transfer rate and the internal transfer rate. The external data transfer rate is the speed of the communi-
cation between the system memory and the internal buffer or cache built into the drive. The internal
data transfer rate is the speed that the hard disk can physically write or read data to or from the surface
of the platter and transfer it to the internal drive cache or read buffer. Transfer rates vary depending
on the density of the data on the disk, how fast the disk is spinning, and the location of the data.

Error Correction Code (ECC)


No electronic data transmission or storage system is perfect. Each system makes errors at a certain
rate. Modern disks have built-in error detection and error correction mechanisms. Although this isn’t
really a disk performance feature, I mentioned this in passing a few pages back, and I want to give you
more of the information on how disks can self-correct errors.
Disk systems are great as storage media, but they’re volatile. From the first second after you lay a
piece of data on a disk, it starts “evaporating.” The magnetic domains on the disk that define the data
slowly randomize until the data is unrecognizable. The disk itself and the media may be fine, but the
image of the data can fade after x years. Put another image on, and it’ll last for another x years. (If
you’re taking videotapes of your baby in the hopes that you can use them to embarrass her in front
of her dates in 15 years or so, physics may thwart you because the videotape is magnetic.)
Disk subsystems are aware of this and so include some method of detecting and correcting minor data
loss. The disk subsystem can detect but not correct major data loss. The controller includes extra data when
it writes information to the disk. When the controller reads back this information (the error correction
code, or ECC), it lets the controller detect whether errors have arisen in the data. The basic idea is that the
controller stores redundant information with the disk data at the time that the data is originally written to
disk. Then, when the data is later read from disk, the disk controller checks the redundant information to
verify data integrity.
The ECC calculations are more complex than a simple checksum. The ECC that most manufactur-
ers implement in hard disks (and CD-ROMs) uses the Reed-Solomon algorithm. The calculations take
time, so there’s a tradeoff; more complex ECCs can recover more damaged data, but they take more
computation time. The number of bits associated with a sector for ECC is a design decision and deter-
mines the robustness of the error detection and correction. Quite a number of modern disks use more
than 200 bits of code for each sector.
Some controllers let you choose to use an x-bit ECC. In this example, x refers to the number of con-
secutive bad bits that the ECC can correct. The original AT hard disk controller, for instance, could cor-
rect up to 5 bad consecutive bits. That meant that it had a “maximum correctable error burst length” of
5 bits. Newer controllers can usually correct up to 11 bits. Some of the newest drives installed in the lat-
est machines are using special high-speed controller hardware to do 70-bit error correction.

ATA Standard Supported


In Chapter 10, you’ll learn about the various ATA standards for transferring data between the mother-
board and the hard disk. The ATA standards are ATA-1 through ATA-6, with the most modern drives
supporting the highest standard. The higher standards support higher data throughput rates, and the
ATA-6 standard (the latest at this writing) supports disk sizes of larger than 137.4GB. The ATA-4 and

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 275 Friday, May 20, 2005 12:33 AM

DMA AND PIO 275

higher standards are also referred to as Ultra ATA (UATA) or Ultra DMA (UDMA), along with their
theoretical maximum transfer rates: ATA-4 is UDMA/66 (for 66MB per second), ATA-5 is UDMA/100,
and ATA-6 is UDMA/133. Serial ATA is not a part of that system; it’s a separate specification all to itself.
When shopping for a hard disk for a high-performance system, it’s worth paying more for support
for the latest ATA standards. However, in order for the drive to take advantage of the high transfer
rates afforded by the latest technology, it must be placed in a system with motherboard support for
that standard (or an add-on controller board that supports it) and must be used with a special 80-wire
ribbon cable. Therefore, it’s not worth paying extra for support for the fastest modes on an old system
that will not support them. Chapter 10 explains this in much more detail.

Buffer/Cache Size
Disk drives are slow—I mean, really slow. Your computer uses RAM memory that responds to
requests in tens of nanoseconds, but the disk drive responds to requests in tens of milliseconds. That’s
six orders of magnitude difference in speed!
Whenever you’re moving data between a faster medium and a slower one, adding a cache to hold
recently used or anticipated data can improve performance by reducing the amount of data that
needs to travel through the bottleneck area. You’ve already seen this in previous chapters with the
level 1 and level 2 caches on either side of the CPU, for example.
A hard disk’s performance can similarly be improved by caching. Many manufacturers refer to the
cache as a buffer in their drive specifications.
A disk cache seeks to use the speed of memory to bolster the effective speed of the disk. The cache
is held in memory chips and is usually one to a few megabytes. The operating system can access data
previously placed in the disk cache on an as-needed basis. Using this disk cache can cut down on the
number of physical seeks and transfers from the hard disk itself. Smart caching algorithms generally
mean that there is no need to change the size of the disk cache. A typical cache size for a modern hard
disk is 2MB, but high-performance drives usually have more (8MB, for example).
This cache buffer acts as a holding area for one or more tracks or even a complete cylinder’s worth
of information in case you need it. This cache buffer can be effective in speeding up both throughput
and access times.

DMA and PIO


Prior to the introduction of UltraATA (also called UltraDMA) for EIDE drives, there were various
direct memory access (DMA) and programmed input/output (PIO) settings that you could tweak in
BIOS setup to change the performance level of the hard drive. Nowadays, these settings are automat-
ically detected, so their details are no longer of interest to most people.
There are five PIO modes: 0 through 4. Each has a different maximum data transfer rate (in MBps),
ranging from 3.3MBps to 16.1MBps. Those are all much lower than the transfer rates of today’s hard
disks, of course, so right away you know this is historical stuff.
DMA is a much more effective way of speeding up the transfer of data to/from a hard disk. DMA
stands for direct memory access, meaning that it allows the disk to bypass the CPU to read/write
directly to RAM. This makes the PC perform better because its CPU is less utilized by behind-the-
scenes operations such as disk reads and writes.
Early versions of DMA use a controller built into the chipset to make the transfer. If you see DMA
modes in BIOS Setup, that setting is referring to those earlier DMA versions.

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
4431.book Page 276 Friday, May 20, 2005 12:33 AM

276 CHAPTER 8 HARD DISK DRIVE OVERVIEW AND TERMINOLOGY

Modern DMA uses the programming built into the disk itself to make the transfer. These are
expressed in new drive standards today as Ultra DMA or UDMA, and the latest versions are capable
of transfer rates of up to 133MB per second. You’ll learn more about UDMA when I talk about ATA
standards in Chapter 10.
Some versions of Windows don’t enable UDMA/66 and higher support by default; you must go
in and make some Registry changes to make that happen. I’ll explain those changes in Chapter 12,
“Partitioning, Formatting, and Managing Drives.”

Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.

You might also like