r/computerscience • u/TranslatorParty4662 • Dec 30 '23
WTF does ram actually do?
I know that RAM stores data for quick use for the CPU. But I want to know more, what does RAM actually do when its storing data. Like when I'm playing a game is RAM responsible for keeping track of how many bullets I shoot. If there are any game developers reading this please let me know. What kind of information does RAM store and how and when does it use it. The main thing I use my pc for is gaming and recording/video editing so how would RAM play a role in those things?
262
Upvotes
View all comments
3
u/proverbialbunny Data Scientist Dec 31 '23
A good metaphor to explain this is imagine software is items on your desk. Each item has a purpose. How much ram you have is the size of your desk, how many things you can store on your desk at any given time. How much hard drive you have is storage bins. If what's on your desk is paperwork, then your hard drive is a filing cabinet.
When needing to find something in storage it can take a while. When needing to find something on your desk it's quite quick. When it's actively in your short term memory, in your head, it's in the CPU itself. CPU has its own memory too.