If you’re reading this, you’ve probably heard of a hard drive (HDD) or solid state drive (SSD), and you might even have a slight understanding of what purpose it serves on your computer. The deeper you dive into its workings, the better you understand how it affects your computer’s behavior. Let’s get our hands dirty, shall we?
What HDDs and SSDs Do
For the sake of simplicity, I’ll refer to both the HDD and SSD as hard disks. They both have the same function, so why not give them both the same name in this document?
Your hard disk stores everything on your computer, from the operating system to the calendar with the proctologist appointment to every single video, photo, program, book, or virus. This isn’t something hard to understand, so I’ll just move on from the subject. Just don’t confuse the hard disk with your computer’s RAM, which stores all active and running program data. There is something the hard disk does that relates to RAM:
Page File/Swap File/Virtual Memory
The hard disk on every computer contains a file that has many names, depending on the context you use it in and the operating system you’re talking about. The consensual accepted term is “virtual memory,” but Linux might refer to it as a “swap file” and Windows occasionally calls it a “page file.” This part of your memory stores parts of open applications that don’t necessarily need the speed of RAM, but need to go somewhere anyway. Operating systems prioritize what goes where, and I’m not going to get too much into that, but programmers might recognize the MEM_PHYSICAL flag in VirtualAlloc().
How HDDs Work
OK, so now we’re going to split things up into HDD concepts and SSD concepts. An HDD is a device that magnetically records data on metal platters, much like how a video tape records images in its tape. The HDD isn’t like a video tape, though, since it doesn’t need to rewind or forward anywhere.
This is what an HDD looks like.
Think of the HDD as a sort of vinyl record player. You can move the needle anywhere you want on the record without having to rewind on the track. HDDs use something called a read/write head to perform the function of the needle. However, instead of touching the disk, an HDD’s read/write head glides over the surface just a tiny distance from the platter. A single speck of dust getting between the platter and the head can corrupt any data transfer. That’s why HDDs are enclosed in an airtight metal casing.
The heads on the disk move across the platter to read and write data, and the platter spins consistently at a high speed (anywhere between 5000 and 11000 RPM) to make data access easier.
This is what the an HDD's guts look like.
Here's another view, showing multiple platters and heads stacked up.
Hard drives are cute, but not cute enough. Their data rates started dragging all other components of the computer down after processors got faster, RAM started storing data at much higher rates, and applications started demanding more and more transfer speeds. If your computer’s slow, chances are that your hard drive’s causing the whole shebang to run like a tortoise. This is mostly owed to the fact that HDDs use moving parts and mechanical read/write methods.
While every other piece of hardware on the computer has been upgraded and looks much different compared to its predecessor, the hard drive today is still the same hard drive used back in the dinosaur IBM Aptiva era, only with faster platters and new data retrieval methods. These improvements couldn’t quite keep up with newer components, and the idea of having platters and heads was abandoned altogether giving way to a new kind of data storage medium.
Solid State Drives
OK. Forget about moving parts and medieval magic. Let’s talk transistors!
This is what people said when they came up with the idea for a solid state drive that would hold all your data much like RAM does. If you have no idea how RAM functions, you should read up on the previous part of this series. In fact, an SSD is only a more sophisticated version of RAM and, with no moving parts, it transfers data just as fast as a RAM module. SSDs can reach up to twice the speed of dinosaur HDDs.
If you want to pack a punch, buy one and see how lightning fast it eats up all the data on your computer. Everything works almost harmoniously. No moving parts also equates to no noise – something for you to think about if you have a home office and the sound of a hard drive churning butter all day bothers you.
There's no way this is going to sound like a sousaphone.
Unlike RAM, an SSD stores information and keeps it there. This technology is better known as flash memory, and you use it every day whether you like it or not. The process of flash storage differs from RAM’s method in that it keeps the electric charge between two transistors consistent and stores it, even after the device no longer receives an electric current.
This is achieved through a series of gates and something known as Fowler-Nordheim tunneling, a process through which electrons are forced through a barrier using a high electric field. You don’t have to learn about this process if you don’t want to. It’s not like I’m going to cover it, and if I do, I will explain it in much simpler terms.
I sincerely hope you learned something from this, and hope to see your feedback!
Miguel has been working with computers back when the latest processor could print "Hello World" on the screen a couple of times and everyone was going nuts about that. From the days of DOS to the days of 'dows, he's been exploring every minute detail about computers, banging his head against the keyboard until he got it. Now he's blogging about it on his dedicated server until it breaks down, he repairs it, and just keeps on blogging.