How Your Computer Works (Part 4) - RAM & Hard Drive

in #computers7 years ago (edited)


On the left, RAM. On the right, hard drive.

Today in our adventures in computer literacy we'll be talking about the RAM and Hard Drive! It's better to discuss them together because they're both types of memory and because it'll make what makes each unique and necessary more clear. Nowadays there are also Solid State Drives, but we'll save that for another article as they are not quite as common as Hard Drives (yet). RAM stands for Random Access Memory. It's a highly volatile form of memory that is much faster than the more stable Hard Drive.

You see, the hard drive is really good at storing data for the long term. This is because it can store data even when the computer is turned off. RAM, on the other hand, loses all data stored in it when the computer is turned off. The hard drive is able to pull this off because it uses a series of rapidly rotating 'platters' coated with magnetic material as a storage medium. It's a technology that has been around in one form or another since the late 1800's.


Old style magnetic recorder

Of course, the technology has seen a ton of refinement since then, but the underlying principle is the same. Read and write heads move over the magnetic sections to change the polarity of the magnetic tape to one of two different polarities. One polarity represents a '1', the other a '0'. Sort of like an old vinyl record player, only the head that makes contact with the 'record' (magnetic tape) can also write on the 'vinyl'. Polarity changes can be stored for long periods of time, making magnetic tape ideal for long term storage.

Sounds Good. Why Not Use Magnetic Storage For Everything?

The problem? Well, imagine searching for information on a vinyl record. Even if you knew exactly where it was on the record (the address, as it's called in terms of memory), you'd still have to play all of the record until you got to the relevant information. The bigger the 'record' gets, the more of a problem this is. The platters have to spin very fast (the noise you sometimes hear from your computer when it's searching for something that sounds like something spinning really fast? That's the hard disk) without moving so fast that they damage the tape, another issue.


Inside of hard disk (hard drive). Here you can see the platters which rotate under the drive heads (the triangular thing) pretty clearly.

And, of course, due to the laws of thermodynamics (entropy), anything with intricate moving parts is much more likely to break down sooner. For this reason, the hard drive is often the first part of a rig to start crapping out on someone. On my self-built machine I'm on my second hard drive and am about to need a third from the looks of it (I built my rig 9 years ago).

In Comes The RAM

For the above reasons we need a different sort of memory in order to actually work with the data. You see, if the read/write heads had to search along the magnetic tape every time you wanted something to change... the computer would work at a horribly slow crawl (they used to!).

We need a workspace that's just big enough for us to manipulate things and change them. It's okay if it's volatile, that is, if it isn't good at holding onto data when the machine is off. That's what we have the hard drive for. It would have to be fast, too. That means rotating magnetic disks are out.


RAM comes in different shapes and sizes

In comes RAM. One of the great things about RAM is that it "allows data items to be read or written in almost the same amount of time irrespective of the physical location of data inside the memory." (Wikipedia - RAM)

In order to achieve this speed RAM uses integrated circuits instead of magnetic tape. According to Wikipedia, "[a]n integrated circuit or monolithic integrated circuit (also referred to as an IC, a chip, or a microchip) is a set of electronic circuits on one small flat piece (or "chip") of semiconductor material, normally silicon." (Wikipedia Integrated Circuit) Don't worry too much about integrated circuits, for now. We'll discuss that in a different series.

Using our restaurant/kitchen analogy, the RAM is the chef's workspace counter. It's where he does his slicing dicing, and plating. The hard drive is the pantry. It's where the chef puts things for long term storage. Imagine if the chef had to cook inside of the pantry, and you get an idea of why RAM is needed.

A Small Note On Memory

When it comes to memory your computer is best thought of as a series of windows one onto another. You see, another reason why hard drives use magnetic storage is because is just so dang cheap. In other words, you can get a lot of it for very little. RAM is a bit more expensive so you get less of it for the same price. But it's much faster. There are other forms of memory, like the small amount inside your CPU. This memory is incredibly fast and also ultra expensive. There are also intermediate types of memory (generally these are built into the motherboard or cards), but they all follow this rule:

Faster types of memory are more expensive

So making an efficient computer is all about balancing price and performance. You want to use as little ultra expensive, volatile memory as possible without sacrificing performance. But to do this, you need 'bridges' between this memory (CPU memory) and the slowest form (hard drive). RAM is probably the one most important of these bridges (though to be sure you need them all).

That's it for this section. If you have questions don't be afraid to ask them in comments!

Other Posts In This Series :

How Your Computer Works (Part 1) - Motherboard

How Your Computer Works (Part 2) - CPU

I'm Jenkinrocket, and I love computers. My hope is to get enough Steem from these posts to do a series of posts on building my own computer. If you enjoyed this please upvote, resteem, and follow!

Follow: @jenkinrocket

Source: 1 | 2 | 4 | 5

Sort:  

Great article!

I just thought you should have talked more about the SSDs in this article :)

Congratulations!

I did.... I mentioned that I intend to talk about them in their own article :). For this article I just wanted to go over the basics of common computers at this point in time. SSDs are not yet the dominant paradigm for non-volatile storage. Thanks for reading!

Good posting.. followed and upvoted

Coin Marketplace

STEEM 0.20
TRX 0.15
JST 0.030
BTC 65443.30
ETH 2653.66
USDT 1.00
SBD 2.82