Tuesday, July 9, 2013

Hard Drives ... How It Works

If a computer's CPU is the thinking portion of your PC, the hard drive is its long-term memory--the nonvolatile place where data is stored.

A hard drive is a storage device that rapidly records and reads data represented by a collection of magnetized particles on spinning platters.

If a computer's CPU is the brain of the PC, the hard drive is its long-term memory--preserving data programs and your operating system even while the machine is asleep or off. Most people will never see the inside of a hard drive, hermetically shrouded as it is in its aluminum housing; but you may have noticed an exposed PC (printed circuit) board on the bottom.

This PC board is where the brains of a drive are found, including the I/O controller and firmware, embedded software that tells the hardware what to do and communicates with your PC. You'll also find the drive's buffer here. The buffer is a holding tank of memory for data that's waiting to be written or sent to your PC. As fast as a modern hard drive is, it's slow compared to the data flow its interface is capable of handling.


If you took apart a desktop hard drive, you'd typically see from one to four platters, each of which would be 3.5 inches in diameter. The diameter of the platters used in hard drives for mobile products vary from as little as 1 inch for drives that are used in music players and pocket hard drives to the 1.8-inch and 2.5-inch platters typically used in notebook hard drives. These platters, also known as disks, are coated on both sides with magnetically sensitive material, and stacked millimeters apart on a spindle. Also inside the drive is a motor that rotates the spindle and platters. The disks in hard drives used in notebooks spin at 4200, 5400, or 7200 revolutions per minute; desktop drives being manufactured these days spin their disks at 7200 or 10,000 rpm. Generally speaking, the faster the spin rate, the faster data can be read.

Magnetic Recording

Data is written and read as a series of bits, the smallest unit of digital data. Bits are either a 0 or a 1, or on/off state if you prefer. These bits are represented on a platter's surface by the longitudinal orientation of particles in the magnetically sensitive coating that are changed (written) or recognized (read) by the magnetic field of the read/write head. Data isn't just shoveled onto a hard drive raw, it's processed first, using a complex mathematical formula. The drive's firmware adds extra bits to the data that allow the drive to detect and correct random errors.

Rapidly replacing longitudinal magnetic recording in new drive manufacture is a process called perpendicular magnetic recording. (See visuals of these two technologies.) In this type of recording, the particles are arranged perpendicular to the platter's surface. In this orientation they can be packed closer together for greater density, with more data per square inch. More bits per inch also means more data flowing under the read/write head for faster throughput.

Information is written to and read from both sides of the platters using mechanisms mounted on arms that are moved mechanically back and forth between the center of the platter and its outer rim. This movement is called seeking, and the speed at which it's performed is the seek time. What the read/write heads are seeking is the proper track--one of the concentric circles of data on the drive. Tracks are divided up into logical units called sectors. Each sector has its own address (track number plus sector number), which is used to organize and locate data.

In the event a drive's read/write head doesn't arrive at the track it's seeking, you may experience what's called latency or rotational delay, which is most often stated as an average. This delay occurs before a sector spins underneath the read/write head, and after it reaches the proper track.

What's in an Interface?

Typically, PCs rely on either a PATA (Parallel Advanced Technology Attachment) or SATA (Serial ATA) connection to a hard drive. You might even have both: Most modern motherboards offer both interfaces during the current period of transition from PATA to SATA; this arrangement is likely to continue for some time, as the PATA interface will remain necessary for connecting internal optical drives to the PC. The parallel in PATA means that data is sent in parallel down multiple data lines. SATA sends data serially up and down a single twisted pair.

PATA drives (also commonly called IDE drives) come in a variety of speeds. The original ATA interface of the 1980s supported a maximum transfer rate of 8.3MB per second--which was very fast for its time. ATA-2 boosted the maximum throughput to 16.6MBps. Subsequently, Ultra ATA arrived in 33MBps, 66MBps, 100MBps, and 133MBps flavors referred to as Ultra DMA-33 (Direct Memory Access) through Ultra DMA-133 or Ultra ATA-33 through Ultra ATA-133. The odds are overwhelming that you have Ultra ATA-66 or better unless your PC is more than seven years old. (Read "Timeline: 50 Years of Hard Drives" for an overview of how the technology has developed.)

You can typically recognize an ATA drive by its 2-inch-wide 40-wire or 80-wire cables, though some 40-pin cables are round. Desktop drives typically use a 40-pin connector; the extra wires on 80-wire cables are to physically separate the data wires to prevent crosstalk at ATA-100 and ATA-133 speeds. Notebooks with 2.5-inch drives use a 44-pin connector, and 1.8-inch drives use a 50-pin connector.

At 133MB per second, the ATA interface began to run into insurmountable technical challenges. In response to those challenges, the SATA interface was designed. At the moment, SATA comes in two flavors: 150MBps and 300MBps. Spec mongers may notice that those two versions are alternately referred to as 1.5-gigabit-per-second SATA and 3-gbps SATA, but the math seems a little fuzzy: 3 gbps divided by 8 (the number of bits in a byte) is 375MBps, not the 300MBps you'll see referred to. This is because the gigabits-per-second-speed is a signaling rate; 300MBps is the maximum transfer rate of the data. The roadmap for the interface sees speed doubling yet again. As it stands today, however, the sustained data transfer rate of single SATA hard drives is comfortably handled within the 150MBps spec. It takes a striped RAID, which feeds the data from two or more drives into the pipeline, to benefit from the greater bandwidth of a 300MBps interface.

SATA drives have a much thinner cable and smaller connectors than ATA drives, which allows for more connectors on motherboards and better airflow inside cases. And SATA simplifies setup by using a point-to-point topology, allowing one connection per port and cable. So gone are the jumpers and master/slave connections of PATA drives, where one cable would be used to connect two drives. And unlike PATA, SATA is also suitable for direct-attached external drives, allowing up to 2-meter-long cables on an interface (referred to as external SATA, or eSATA) that's significantly faster than USB 2.0 or FireWire. External SATA added a slightly different connector that's rated for more insertions and designed to lock in place, plus some additional error correction, but it is otherwise completely compatible.

One connection interface you hear less about these days is SCSI (for Small Computer System Interface). At one time, SCSI was a means to achieving faster performance from a desktop hard drive; however, the SATA connection has since replaced SCSI.

The Future of Hard Drives

Eventually, all desktop and mobile hard drives will use the SATA interface and perpendicular magnetic recording. Any new PC you look for should have a SATA interface at least; you can upgrade to a perpendicular drive later when prices fall. Expect capacities to continue to grow exponentially, and for performance to grow moderately. Read "The Hard Drive Turns 50" for a look at where hard drives have been, and where they're going.

 

0 comments:

Related Posts Plugin for WordPress, Blogger...