> Can you build RAM that can be written and read tens of thousands of years from now despite cosmic radiation?
I think so. The bigger the element, the more resistant it is to cosmic ray damage. There are also other techniques.
https://en.m.wikipedia.org/wiki/Radiation_hardening
Physical hardening Vs logical hardening.
Hardened chips are often manufactured on insulating substrates instead of the usual semiconductor wafers. Silicon on insulator (SOI) and sapphire (SOS) are commonly used. While normal commercial-grade chips can withstand between 50 and 100 gray (5 and 10 krad), space-grade SOI and SOS chips can survive doses many orders of magnitude greater. At one time many 4000 series chips were available in radiation-hardened versions (RadHard).
Bipolar integrated circuits generally have higher radiation tolerance than CMOS circuits. The low-power Schottky (LS) 5400 series can withstand 1000 krad, and many ECL devices can withstand 10 000 krad.
Magnetoresistive RAM, or MRAM, is considered a likely candidate to provide radiation hardened, rewritable, non-volatile conductor memory. Physical principles and early tests suggest that MRAM is not susceptible to ionization-induced data loss.
Shielding the package against radioactivity, to reduce exposure of the bare device.
Capacitor-based DRAM is often replaced by more rugged (but larger, and more expensive) SRAM.
Choice of substrate with wide band gap, which gives it higher tolerance to deep-level defects; e.g. silicon carbide or gallium nitride.
Shielding the chips themselves by use of depleted boron (consisting only of isotope boron-11) in the borophosphosilicate glass passivation layer protecting the chips, as boron-10 readily captures neutrons and undergoes alpha decay (see soft error).
Logical
Error correcting memory uses additional parity bits to check for and possibly correct corrupted data. Since radiation effects damage the memory content even when the system is not accessing the RAM, a “scrubber” circuit must continuously sweep the RAM.
Redundant elements can be used at the system level. Three separate microprocessor boards may independently compute an answer to a calculation and compare their answers.
Redundant elements may be used at the circuit level. A single bit may be replaced with three bits and separate “voting logic” for each bit to continuously determine its result. This increases area of a chip design by a factor of 5.