Kidsplained: How Code Runs in Volatile Memory

The year is 2018. Ask any tech savvy 10 year old to restart a computer and they will look at you like you we’re a crazy person. My own child, someone who has a parent that took apart and put back together computers at his age, does not know how to restart a computer. I was contemplating whether this is just the sad reality of our time or another step forward in the evolution of computing.

I attempt to explain to him what happens to computers when they are restarted. I begin by explaining what a program is. I tell him that when you open a game on the Xbox, that is a program that you are running. He totally understands this concept and tells me “I know that, it’s just like the apps on my iPhone”. I tell him that a program can only run if it is in memory. Memory is a space in the computer where programs can run really fast and free like the wind. When you close a program, it has to remove itself from memory so other programs can play in it.

He then asks me “Why can’t we just get more memory?”. Good question. I tell him that memory is limited and there is only a certain maximum amount of it we can fit on a single computer. The more programs we run the more memory it uses it. This is usually why computers become slow. “Is that why we need to exit games or apps that take forever to start or just hang?”. Exactly! When a game is exited you will notice that the game has to start from the very beginning because it was removed from memory and now has to load itself back again. This is why when we play Lego Avengers on the Xbox, we always start at the beginning of the level we left when we turned it off. I get a satisfying nod of approval and understanding from him.

He then asks, “What does this have to do with restarting computers?”, still unsure why we’re talking about programs and memory. I proceeded to show him a  YouTube video of kids trying to figure out how to turn off a PC that was running windows 95. It took them a while to figure out that you had to explicitly click on Start… then Shutdown before turning off the power to the PC. I explained to him that not doing so before pulling out the power would most likely cause your windows 95 not to start correctly the next time you used it. This elicits from my 10 year old the magical question of “Why?”. It’s simple really, if you don’t shutdown your PC, all those programs that we’re running would suddenly get kicked out of memory once you pull the power out. This would cause them to be damaged as they did not have the opportunity to clean up before dying an untimely death. I also had to explain that the Windows, the operating system itself that ran all these other programs was a program itself.

I left it at that thinking that most of what I had explained would be non-sense to him in this modern age of computing anyway. A few days later I overheard my son bragging to his mom while he was on the Xbox. “Mom, I know why you have to start from the beginning of a level in a game whenever you quit it. It has to do with programs needing to be in memory before they can run. If you exit the game, the program has to exit the memory and reopening it would mean you have to start from the beginning. This is also why Fortnite takes forever to start!”.

Why it takes forever to start playing Fortnite. Yet another 10 year old kid mystery solved.

Leave a comment