How does an HDD work?

Hard disks are electro-mechanical devices, which serve us as a permanent storage area. If you are new to this subject, we suggest that you read Quantum's excellent "Storage Basics". First of all some basic terms should be familiarized with: Sectors, tracks, heads and cylinders? Here are some explanations:

On a hard disk, data are stored in the magnetic coating of the disk. The so-called head, held by an actor arm, is used to write and read data. This disk rotates with a constant turn time, measured in revolutions per minute (rpm). Data is organized on a disk in cylinders, tracks and sectors. Cylinders are concentric tracks on the surface of the disk. A track is divided into sectors. A hard disk has a head on each side of a disk. Nowadays, the actuator arm is moved by a servo-motor (not a step-motor which needs more time while swinging in after moving over the desired track). All hard disks have reserved sectors, which are used automatically by the drive logic if there is a defect in the media.

Rotation Speed

Typical hard disks have a rotation speed from 4500 to 7200 rpm. The faster the rotation, the higher the transfer rate, but also the louder and hotter the HD. You may need to cool a 7200 rpm disk with an extra fan, or its life would be much shorter. Modern HD’s read all sectorsof a track in one turn (Interleave 1:1). The rotation speed is constant.

Number of sectors per track

Modern hard disks use different track sizes. The outer parts of a disk have more space for sectors than the inner parts. Usually, HD’s begin to write from the outside to the inside of a disk. Hence, data written or read at the begin ning of a HD is accessed and transferred at a faster rate.

Seek time / head switch time / cylinder switch time

The fastest seek time occurs when moving from one track directly to the next. The slowest seek time is the so called full-stroke between the outer and inner tracks. Some hard disks (especially SCSI drives) don't execute the seek command correctly. These drives position the head somewhere close to the desired track or leave the head where it is. The seek time, everyone is interested in, is the average seek time, defined as the time it takes to position the drive's heads for a randomly located request. Yes, you are correct: seek time should be smaller if the disk is smaller

(5 1/4", 3 1/2"etc.).
All heads of a hard disk are carried on one actuator arm, so all heads are on the same cylinder. Head switch time measures the average time the drive takes to switch between two of the heads when reading or writing data.
Cylinder switch time is the average time, which is needed to move the heads to the next track when reading or writing data.
All these times are measured in milliseconds (ms).

Rotational latency or Data access time

After the head is positioned over the desired track, it has to wait for the right sector. This time is called rotational latency and is measured in ms. The faster the drives spin, the shorter the rotational latency time is. The average time is the time the disk needs to turn half way around, usually about 4ms (7200rpm) to 6ms (5400rpm).

Cache

I guess you already know about cache. All modern HD’shave their own cache varying in size and organization. The cache is normally used for writing and reading. On SCSI HD’s you may have to enable write caching, becuse it is often disabled by default. This varies from drive to drive. You will have to check the cache status with a program like ASPIID from Seagate.

You may be surprised that it is not the cache size that is important, but the organization of the cache itself (write / read cache or look ahead cache).

With most EIDE drives, the PC’s system memory is also used for storing the HD’ firmware (e.g. software or "BIOS"). When the drive powers up, it reads the firmware from special sectors. By doing this, manufacturers not only save money by eliminating the need for ROM chips, but also give you the ability to easily update your drives "BIOS" if it is necessary (Like for the WD drives which had problems with some motherboard BIOS' resulting in head crashes!).

Organization of the data on the disks

You now know, a hard disk has cylinders, heads and sectors. If you look in your BIOS you will find these 3 values listed for each hard disk in your computer. You have learned that a hard disk doesn’t have a fixed sector sizeas they did in earlier days.

Today, these values are only used for compatibility with DOS, as they have nothing to do with the physical geometry of the drive. The hard disk calculates these values into a logical block address (LBA) and then this LBA value is converted into the real cylinder, head and sector values. Modern BIOS’ are able to use LBA, so limitations like the 504 MB barrier are now gone.

Cylinders, heads and sectors are still used in DOS environments. SCSI drives have always used LBA to access data on the hard disk. Modern operating systems access data via LBA directly without using the BIOS.

Transfer rates

In the pictures you can see the several ways how data can be stored physically on the hard disk. With a benchmark program that calculates the transfer rate or seek time of the whole hard disk you can see if your drive is using a 'vertical' or a 'horizontal' mapping. Depending on what kind of read/write heads and servo-motors (for positioning the actuator arm) are used it is faster to switch heads or to change tracks.

Traditional hard disks order their capacity in ‘verticalmapping the data are read/written from one cylinder first, starting from the top track down to the bottom, before the heads are moved to the next cylinder.

In the ‘horizontal’ mapping, the da are read/written starting from the outer cylinder to the inner cylinder, before switching the heads to the next track.

The below pictures show that, transfer rate is higher when data is read or written towards the outer parts of a disk. The reason is that there is more space for sectors. The number of sectors varies in steps. Usually, on a disk there are 10 to 20 zones (called 'notches') with a constant sector number. That is the reason why you see the steps in the transfer rates.

Some hard disks use the combination of 'vertical' and 'horizontal' mapping. Whereas the 'horizontal' mapping is used in the zones, the 'vertical' mapping is used between the zones. However, transfer rates and seek time are the same in 'vertical' mapping.

If you are going to buy an HD, you may need to know what kind of mapping the drive does. If you need constant transfer rates (for video, audio), you should get a drive which doesn'’t do the horizonta mapping. Drives with horizontal mapping are not very common.

Source: http://www.sysdoc.pair.com