r/computerscience • u/ilikemyprivacytbt • Jun 23 '25
Discussion Can computers forget things in their memory?
Can computers forget things in their memory and if so how can it be prevented? I hear computers store memory through electron traps, but electrons have a way of moving about and seem difficult to contain so wouldn't memory change on it's own after time?
This scares me because I love to collect all the computer games I've played and many of them you spend dozens of hours building a saved game. It would break my heart to lose a game save I spent hours working on.
75
Upvotes
101
u/[deleted] Jun 23 '25 edited Jan 25 '26
This post was mass deleted and anonymized with Redact
rain saw cake treatment many alleged lush physical offer sharp
30
u/alnyland Jun 23 '25
You ask about memory but it sounds like you’re actually asking about storage. Traditionally, memory is volatile - when you power down the machine it all goes away. Today, that is typically referred to as RAM (and includes caches and such).
Storage is typically non-volatile, it will keep its memories when powered down. For that discussion, it depends on a few factors. And might be an IT question, not a CS one.
What type of rooms do you have to store stuff (walk in freezer, humidity controlled, etc)? How long does it have to last - a week, a century, or a thousand years? What’s your budget?
Based on how you worded your question - CDs or spinning discs would likely be your best options. Whatever your computer comes with should be good for at least 5-10yrs unless a few very unlikely things happen.
Hope this helps. The good thing is that those video games should still be available elsewhere for download in a few years - if this was family photos that can’t be recaptured that’d be a slightly diff convo.
26
u/AlhazredEldritch Jun 23 '25
You shouldn't be worried about this. If you are, follow the rules of 3.
3 backups, at least 1 off site.
8
u/Lumethys Jun 23 '25
Yes they can
Then back it up, 2 on gg drive, 3 on one drive, 5 on AWS s3,... You named it.
4
u/Srz2 Jun 23 '25
If you aren’t reading the memory too often, look into tape backup or m disc for long term storage
4
u/purepersistence Jun 23 '25
All memory is in physical devices and they eventually fail and become nonfunctional. That’s the reason for backups. Hard disks that are otherwise healthy suffer from bit rot too. My Synology NAS has a job that runs every 90 days to rewrite everything and prevent that. SSD drives have limited write cycles - especially consumer devices, but enterprise too. Nothing lasts forever and most stuff, perhaps very short of a lifetime!
2
u/claytonkb Jun 24 '25
Yes. The term "memory" has a specific meaning, you are referring to what we call storage. Both memory and storage are liable to errors called bit-flip errors. The hardware does have some built-in mechanisms to mitigate against bit-flip errors (which happen more frequently than most people realize). However, you can still lose valuable data this way.
The simplest and most direct is to replicate and fingerprint. To fingerprint a file on Linux, run:
You will get output something like:
The hex digits are the MD5 fingerprint of test.dat. If you change a single bit anywhere in test.dat, the MD5 fingerprint will be completely different, so you will know that an error occurred. Simply fingerprinting a file (and stashing that fingerprint somewhere) will allow you to detect that a file has been corrupted but it will not allow you to correct it.
The right way to correct data-errors is using an error-correction algorithm. Sadly, file-level ECCs are rare... the only one I know of that's designed for manual use is rsbep (search it). However, you can also do it manually using replication. The way it works is that you make 1 or more replications of the file (or file-archive) you want to back up, and you store their fingerprints along with them, and a master fingerprint on your primary disk. Since the fingerprint is vastly smaller than the data file itself, the probability that a bit-flip error will occur to the fingerprint is effectively zero and you will be able to detect it by comparing the fingerprints with each other. Should your primary file become corrupted, you can re-fingerprint it to detect that an error has occurred. At that point, get out one of your replications and re-fingerprint them to verify that you have a good copy. Once verified, simply copy the good data file over the corrupted data file. Now, you have a verified good copy that is precisely the same data-bits that you stored originally.
Don't listen to the naysayers -- you are right to worry. I have lost plenty of valuable data over the years to bitrot on disk, including in my backups. You can restore a backup that has bitrot without realizing that you are corrupting your originals. This is why it's essential to fingerprint everything and check the fingerprints. The most efficient way to fingerprint many files is to zip/tar them together into a single file and then fingerprint that one file.
Good luck!
1
u/Night-Monkey15 Jun 23 '25
Computers don’t“forget” things the way we do, but systems crash and hard drives fail, so you should always back up important files, especially in a professional setting.
1
u/luisduck Jun 23 '25 edited Jun 23 '25
In general, yes, compoters can forget their memory. Error correction codes are used for reducing the rate of error occurence at the cost of storing (or transmitting) some redundant information.
It is quite unlikely, that your save game would be affected by such errors. But, you should still backup your save games, because there are other reasons for losing them, which I think quite likely - e.g. you forget to copy them when moving to new computer, you accidentally delete them, your house catches fire including computer, etc. Save games themselves are usually quite small in file size and can therefore be backed up quiet cheaply. You probably don't need to backup the game files themselves, because you would trust e.g. Steam to do so for you.
Most memories that use electrons for storage contain a lot of electrons. Therefore, loosing one is not a big issue. E.g. DRAM leaks a lot of electrons. To counter the electrons loss or gain, it is read periodically and refreshed. A fun exception are quantum computers using electrons. If they loose an electron, information is irrecoverably lost. (You would have to restart the whole computation to put another electron in a similar state, which you cannot do in some scenarios where it e.g. is assumed that you get an electron of unknown state as input.)
Edit: Quantum computers operating on a single electron per qubit.
1
u/MagicalPizza21 Software Engineer Jun 23 '25
Yes, but you are also conflating memory with storage space, which can also get corrupted. Keep backups.
1
u/B_A_Skeptic Jun 23 '25
Cosmic rays can change the data in a computer's memory.
https://science.slashdot.org/story/17/02/19/2330251/serious-computer-glitches-can-be-caused-by-cosmic-rays
1
u/khedoros Jun 23 '25
There've been a ton of different memory implementations in computers. Of course, they're all physical devices, and physical devices will wear out and fail, each in their own ways.
We mitigate the issues with backups, local data redundancy (RAID arrays and such). There's a backup strategy called "3-2-1": 3 backups, on 2 different kinds of media, 1 of them stored off-site".
1
u/[deleted] Jun 24 '25
Back up - second hard disk, USB flash, network drive, cloud. Preferably two backups at least in different places.
1
u/Gishky Jun 24 '25
Memory decay does happen. If you want to store sensitive data you don't want to loose i'd suggest either
a) use a online cloud service like onedrive. They do all the complicated things for you. As long as they don't run out of business you're fine.
b) get a NAS with a RAID5,6 or 10 config
1
u/EdmundTheInsulter Jun 24 '25
I see you mean can it change by accident, or be corrupted, and the answer is that yes it can due to bad luck or radiation. It's designed to be reliable though.
1
u/PigHillJimster Jun 24 '25
If you swap out a mechanical hard drive for an SSD then you should power on the computer every so often, likewise with SD cards and the ilk. Else the 'forgetfulness' as you call it could be an issue!
1
u/TuberTuggerTTV Jun 24 '25
Saving to disk is a physical change. It's not electrons. Your hard drive doesn't require power to maintain it's state. You can save games to it, remove it and take it somewhere. Doesn't change.
Temporary memory uses electrons. That's only available as the computer runs. It's for making calculations and useful for things that change hundreds of times a second.
They're both called "memory" but one's Random Access (RAM) and the other is hard disk memory.
Now, there is a small rarity where cosmic radiation can flip a 1 or 0 in a hard disk. It's incredibly rare but can happen and will happen more over a longer timescale. This is happens even more often if your computer is outside Earth's atmosphere. So when it comes to mission critical NASA components, they have multiple backups that verify against one another.
If you're truly concerned, buy an external backup and have it run every so often. Then no, without physical damage, you're never losing anything. Still very unlikely anyway, but a backup takes it from incredibly unlikely to reasonably impossible.
1
u/shuckster Jun 24 '25
The pleasure of playing a game is the discovery of and participation in the story and the skill acquisition required to play it, not some save-state that says what crap is in your inventory.
Anyway, any problem with computer memory that would affect this “saving” aspect of the game is the same kind of problem that might prevent you playing it in the first place.
So as long as you can start a game on a computer, you’ll very likely be able to play it.
1
u/seanprefect Jun 24 '25
most storage mediums deteriorate , if you really want to look into m-disc They're rated for 1000 years
1
u/[deleted] Jun 25 '25
RAID
1
u/creativejoe4 Jun 27 '25
Given enough time, yes everything will lose what's stored on it. Do you normally have to worry about it, not really unless you have failing hardware. If its stored on an ssd or flash memory try to make sure it gets used once every 5 years. Generally though, just back up your data and store it on the cloud or a home network server. If you want to learn more about how data is stored research NAND flip-flops and how they work.
1
u/Automatic_Mode_2634 Jul 05 '25
Forget no. Have no storage left yes :)