Saturday, August 7, 2010

Computers 101: HDDs

2TB Caviar Sata 3 64MB 3.5IN GreenHard disk drives, or hard drives from here on out, are another component that people are very familiar with when looking at and comparing computers.  Hard drives have grown in size and speed through the years, as with all computer components. 

The first hard drive was created by IBM and stored approximately 4.4MB and ran at 1200RPM.  Today, common hard drive sizes range from 320GB up to 2 TB.

Let's talk a bit about hard drive sizes before we get too confused with all these MBs, GBs, and TBs floating around.  MB (megabyte), GB (gigabyte), and TB (terabyte) are the most common capacity quotes that you'll see.   A byte is a collection of bits and a unit of digital information.  The prefixes mega, giga,  and tera are based in the decimal system and on units of 10.  So a kilobyte is 1000 bytes, megabyte is 1,000,000 bytes, gigabyte is 1,000,000,000 bytes, so on and so forth. 

Using these decimal based prefixes has caused some confusion among some consumers, and rightly so.  I can't tell you how many times I've been asked by people I build computers for why their 500GB hard drive only shows up as a 460GB hard drive in Windows.  The reason is aggravating at times but fairly simple to explain.   Basically, the hard drive manufacturers used the decimal based prefixes which is based on a unit of 10.  Many software developers decided to use the binary prefixes which are based on a scale of 2.  For example, a kilobyte (decimal) is 1000 bytes while a kibibyte (binary) is actually 1024 bytes.  While looking only at kilobytes there isn't but a 24 byte difference, however, once you get up to the gigabyte range, the difference becomes much more noticeable; hence the discrepancies in hard drive size advertised and seen when installed in your computer.  The image below shows how quickly the discrepancy between decimal and binary units grows as the capacity of the hard drive increases.


Now that we've gotten that out of the way, let's take a look at what a hard drive actually is.  A hard drive functions as the primary mass storage of a computer.  Unlike the RAM we covered last week, a hard drive is non-volatile, meaning that when it is not powered, it does not lose its data. 

Hard drives record data by magnetizing a platter inside the hard drive that spins at a predetermined RPM.  The data is either made a 1 or a 0 on the platter.  The data is then read by read-and-write heads that are on an arm which spans the platter, similar to an old record player.  All of those stored 1s and 0s make of up data on your hard drive.  Those 1s and 0s are the makeup for your favorite games, term papers, and all those pictures you have saved.  Everything on your hard drive is stored in this manner and each 1 and 0 represents something, or better yet, a small part of something.  This is called binary and is something we might touch on down the line.  Boring stuff to be honest so we'll move right along.

There are a few different types of forms that hard drives come in.  Different shapes and sizes depending on where you are using them.  The common desktop hard drive is 3.5" while laptop hard drives are 2.5".  Obviously the laptop hard drives have to be a bit smaller to fit into the smaller cases of the laptop themselves.  Desktop hard drives also normally spin at 7200RPM while laptop drives stay around 5400RPM.  While there are faster drives available for both, these are the standards for most that are used today.  The higher the RPM, the faster the hard drive can read and transfer data to the disk buffer.

The disk buffer is a small amount of memory that is built into a hard drive.  This buffer is usually around 4 to 32MB in size (remember that SRAM we talked about).  How it works is the platter will spin at the set RPM and transfer the data requested by you to the buffer through the read/write heads.  The buffer in turn will release the data to the computer through an interface connected to the host adapter.  The buffer is important because it lets the read/write heads and the interface work at full speed to move the data as quickly as possible.

As stated, hard drives connect to the computer through the host adapter on the motherboard.  There are several types of interfaces for this with PATA (IDE), SATA, and USB interfaces being the most popular today in PCs.  To be honest, IDE is out the door and not used at all when building a new computer today.  The only time I run into an IDE interface is when I'm transferring data from someones older computer to their new one or using an older hard drive as storage on a new computer.

PATA's max buffer to computer transfer rate topped out at 133MB/s (megabytes per second).  When compared to SATA's max buffer to computer transfer rate of 6GBit's (600MB/s), it's easy to see why PATA has gone by the wayside.  USB is commonly used for external hard drive connections and with the advent of USB 3.0, it has a respectable speed of 400MB/s.   Another cool thing about SATA and USB is that both interfaces allow hot-swapping.  This means that you can actually plug in and unplug a drive without having to shut down the system.  Very handy, as it would be terrible if every time you wanted to plug in your USB drive you had to restart your computer.

One of the disadvantages of a hard drive is all of the moving parts inside.  You have a rather large platter spinning pretty darn quickly at 7200RPM and arms moving all over and around to get the read/write heads to the proper location to read the information.  All of this movement is very loud, very hot, and very susceptible to breaking down and crashing.  Enter solid state hard drives.

Notice all the parts on of the HDD on the left and the clean order of the SSD with no moving parts on the right.
Solid state drives (SSD) unlike traditional hard drives, have no moving parts and use microchips to transfer data to and from your computer.  SSD have actually been around for quite a while already.  You may have one and not even know it.  Do you own an ipod, iphone or other flash based memory?  Then you have a type of SSD right at your finger tips.

While SSD are the future do to their efficiency and faster speeds, their price still prohibits them from claiming the market.  But as with all things computer related, it's just a matter of time.  Give it 3-5 years, and we'll be talking about HDD going by the wayside.

Well this concludes our hard drive discussion.  Hopefully you've learned something from reading this and aren't too confused.  If you have any questions or comments, as always feel free to leave me a message.  Until next time, take care!







1 comment: