r/computerscience • • 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?

259 Upvotes

97 comments sorted by

View all comments

Show parent comment

3

u/slxshxr Dec 30 '23

PS. I recommend "Computer Systems: A Programmer’s Perspective" book, it's quite good and easy to read.

2

u/TimedogGAF Dec 30 '23 edited Dec 30 '23

I do not recommend it as "easy to read". It explains concepts in the most rigorous way possible without presenting more human readable simplifications or explanations, using complicated and super abstracted Riemann sum notation to explain things that could easily be explained in a sentence or two.

There were also multiple times where large logical leaps were made in explanations, that in order to cross required you to remember some small piece of info that was mentioned a single time like 70 pages ago.

Write Great Code Vol. 1: Understanding the Machine is significantly easier to read and is recommended for beginners. It condenses the long, abstracted equations from Computer Systems and states the concepts plainly and concisely, the way actual programmers in actual programming jobs communicate.