Why do computers need RAM memory? And why some programs require lots of it while others require less?

254 views

Just curious about it, but can’t understand why is it like that.

In: 7

15 Answers

Anonymous 0 Comments

Computers work with data. How much data is needed fully depends on how complex the work is. That’s basically all there is to it. Writing a few lines of text doesn’t take need much data, an Excel spreadsheet with a few thousand rows needs more data, and a video game with fancy 3D graphics and sound needs lots more data.

Data can be divided into two types: the kind that we need to store a lot of for a long time, but it’s ok if it’s a little slower to access; and data that we need to access really fast, but we don’t need much of it for very long. The former – persistent storage – is good for storing the programs themselves, as well as information we might need later (like documents, images, configuration). The latter – volatile storage aka RAM – is good for loading programs from disk when you need them, and storing all the working data (program state) that the program needs to run.

RAM is only temporary so it doesn’t matter if it gets wiped when the computer turns off. In fact it can even be beneficial if a program gets into a bad state, resetting memory can resolve transient issues. Any important data we need to keep is transferred to persistent storage. This relationship between RAM and storage is a fundamental architectural design of modern computers.

So TL;DR, more RAM is needed if your program is bigger, and/or if it uses large amounts of temporary data while it runs and does whatever it’s programmed to do.

And by massive coincidence of physics and electronic engineering, it turns out it’s easy to manufacturer small amounts of volatile memory that’s incredibly fast (RAM), or large amounts of persistent memory that’s an order of magnitude slower but still pretty fast, but pretty much impossible to achieve all three with a single device.

You are viewing 1 out of 15 answers, click here to view all answers.