BadRAM uses broken memory

Groen:    Gemak:

It is possible to run a computer smoothly on broken memory, thanks to a Dutch invention: the BadRAM patch for Linux. A patch with a future.

Keywords: waste energy


What?

Computers have an increasing need for memory, and must therefore support more and more storage capacity on the same chip area. This means that chip technology for memories is always the most advanced form available, causing quite a lot of drop-out chips. With a computer running under BadRAM this no longer has to be a problem.

BadRAM works by scanning a memory for defects prior to its use, and to memorise the positions where problems are found. The memory works in blocks, and the blocks with erroneous positions are simply kept back from the memory block list from which an operating system "lends out" memory to applications.

By using BadRAM, it is possible to use chips in your computer that would otherwise have been trashed. Such memory could be sold against lower cost than the perfect ones. Also, a laptop with the memory chips soldered on can still work in face of memory defects. Although such a laptop cannot be used for all thinkable operating systems anymore, it can perfectly run with an operating system that supports BadRAM. BadRAM effectively extends the useful life of hardware, leading to savings to the wallet and the environment.

Why?

Manufacturing chips is environmentally unfriendly. First of all because the process requires highly purified materials that take a lot of energy to produce. Secondly because lots of chemicals are passed over the ingots with the chips-to-be, and the waste from all those washes and etches and rinses must also be treated as waste because it lacks the purity needed for the chip process.

It is hard to live without electronics, but it is useful to exploit what is being produced to the fullest. BadRAM addresses this need for memories.

Due to the incredible complexity of chips, the sensitivity of the production process and the many layers used in modern chips, the rate of chips being trashed is rather high. Since a single error on a chip can cause a bit of its local functionality to fail, the chip as a whole does not behave as needed. But because the structures in memories are highly repetitive, it is possible to simply skip failing cells and use only those that are perfect, if an operating system is smart enough to do this. So what is required is either a smart enough operating system, or one like Linux that is open enough to be patched.

Fugure computes will not carry hard disks anymore, but replace them by memory. There will probably be a first generation where the disk is replaced by a Solid State Drive based on flash memory. In a second generation, both disk and RAM will be replaced with non-volatile memory. This image of the future makes it all the more useful to have support for BadRAM in one's computer systems.

How?

Memories do not easily get damaged. The memories may have been damaged during production, or a static discharge (usually while transporting the sticks) may cause such damage. BadRAM offers a solution in such cases. And because defects do not travel or spread through memory chips, it is possible to adapt your system once to newly found defects.

The first you need to do is scan memory for defects. This can best be done with MemTest86, a scanner that will find virtually all defects that occur in practice. Set it up to generate BadRAM-patterns, so you know what to tell your kernel to skip. This special format is intended to capture practically occurring memory faults as compact as possible.

If you are lucky, BadRAM is supported on your computer. This is not standard through, especially not on Windows (which is not into advanced technology) but also not on most Linux distributions. This means that you will have to build a dedicated kernel until BadRAM becomes more commonplace. Find someone who can help you with this, and know that technicians generally enjoy this kind of task -- getting broken memory to work fluently is generally though of as cool.

You simply download the patch for your version of Linux and you apply it. Then you rebuild the kernel from scratch and install it on the system at hand. When booting that system, provide an extra boot parameter in the form

badram=0x0cf14200,0xffffe300

If this seems to work after some heavy use of the system, add this parameter to the boot details of your computer, for instance in /boot/grub/menu.lst where the boot-options for the kernels usually reside.

Where?

BadRAM can be found on http://rick.vanrein.org/linux/badram/

MemTest86 is part of most installationas and can additionally be found on http://memtest86.com/ -- this site offers a choice between DIY downloads and the ordering of official CD-ROMs and even commercial support.