How a computer uses its hard disk

You probably know your hard drive as where your files are stored, or where your Operating System (e.g. Windows or macOS) is located. But there’s more to it than just that, and knowing the full story can be helpful if you need to get in the nitty-gritty of your OS.

How Does a Hard Drive Work?

Before we get into how your computer uses the hard drive, you need to know how a hard drive is formatted. Keep in mind that this is somewhat dumbed down.

A traditional hard drive uses magnetism to store information. It has a big disc called a platter, which is divided into billions of tiny areas, all of which can be either magnetised or demagnetised.

The hard drive uses a read-write arm to read the state of the areas and change them. A demagnetized area represents a “0” and a magetized area is a “1”. You may recognize this as binary code, which is beyond the scope of this post (I’ll write about it someday), but all you need to know for now is that the computer can interpret these 0s and 1s and turn them into data.

Solid State Drives (SSDs) are a more recent technology that forgo all moving parts and magnets in favor of a bunch of chips. They are much faster than the traditional hard disks, at the cost of being more expensive (a 10 terabyte hard drive costs ~$500, whereas a 10 terabyte SSD costs double).

How is a Hard Drive Divided?

From here-on out, we’ll be talking about how disks and their data are digitally represented.

A disk is separated into multiple sections called partitions based on data size. For example, a 256 gigabyte disk could have 2 partitions: a 246 gigabyte partition for the user’s files, and a 10 gigabyte partition for the OS.

Each partition has a filesystem, which is (as the name would imply) a system for storing files.

Filesystems can be optimized depending on the intended device. For devices such as ticket kiosks and credit card processors, it’s not really that necessary to have support for gigantic files and complex organization.

A disk has a partition table, which is a record of how the disk is partitioned. Without a partition table, the data on the hard drive would be a mangled, unorganized mess.

Why Does This Matter?

Knowing how your computer interprets the data it gets from the hard drive can help you make better use of it. For example, you may want 3 OSes on your computer: macOS, Windows, and Linux. Knowing how to effectivley partition your disk can save you from headaches during this process, and enable you to do cool things like keep your user files on one hard drive and the OSes on the other (you’ll need to Google whether or not your OS supports this).

If you have any questions/suggestions, feel free to leave a comment.


One thought on “How a computer uses its hard disk

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s