A RAM-based operating system – Part One

Introduction

 

The idea of RAM based operating system is to operate the entire system from RAM (and any applications as well). Obviously you will need some non-volatile storage to keep your data after the machine is powered off and to of course, have an image to boot from. The end result is that there are some pretty extreme (and interesting) effects of booting from RAM instead of booting from a more permanent storage.

 

It is important to remember that SSDs still are the bottleneck. From access speed it goes CPU L1, L2, L3, L4, then RAM, then non-volatile storage, with SSDs being faster than HDDs. There are some other exciting developments such as High Bandwidth Memory (HBM) and Hybrid Memory Cube (HMC), but they are outside of the scope of the article for now.

 

I should note that I am not talking about the LiveCD, but to physically run an entire operating system from RAM at boot. The advantages of RAM are somewhat more limited in that a lot of the things that need to be accessed rapidly are well, already in RAM. But there is still a huge potential for a faster (and faster feeling) system by putting it into RAM.

 

For the home user and computer enthusiast

 

I am primarily writing this from a home user perspective. It is more of an interest to get the “ultimate” operating system then anything else.

 

RAM based operating systems have some pretty interesting applications in terms of advantages and disadvantages.

 

Pros

  • They are very fast when booted. Applications load quickly and everything feels so “snappy”, even more so than an SSD.
  • Potential for a very secure operating system. Physical access can mean no access to data, as it is held in the RAM (which is powered off). There is also the potential for much more resilience to attacks such as Cold Boot attacks.
  • Could be suitable for some very write-intensive applications. DRAM lasts for a very long time, so it is very possible to write huge quantities of data.

 

Cons

  • RAM-based operating systems have a longer boot time because they need to copy their full image from the non-volatile storage media into the RAM.
  • If you want to update the OS, you will need to reboot the machine.
  • Need sufficient RAM to hold the operating system. RAM can be quite expensive for larger setups.
  • An Uninterruptible Power Supply (UPS or a laptop) is needed in the event of power loss.

 

You may be thinking, there’s huge drawbacks, but I think that modern technology these days means that the pros outweigh the cons.

  • NVMe and perhaps future replacements to RAM (circa 2015, 3D XPoint is being demonstrated by Intel and Micron, Crossbar RRAM, and other ideas) means that copying data from non-volatile storage to RAM could potentially be much quicker.
  • I think that this is a pretty big drawback, but considering boot times are going down, it’s not the drawback it once was. I would love to see a way though to update the RAM and the boot image dynamically. That would be the ultimate solution.
  • RAM prices over the years have gone down, which makes this a more affordable option.
  • I would recommend a UPS to be honest for all desktops. It should combine with a surge protector. You never know when you might get a temporary loss of power and it could cause you to lose your data even without booting from RAM.

 

Personally I think that it would be quite possible to try using RAM as a boot more, given that these drawbacks are slowly being nullified.

 

Not all of the disadvantages of course can be negated, but a large number can be. The other benefit is that the RAM based computer might be able to “feel” snappy, perhaps much more so than a hard disk or even an SSD. The benefits though compared to the past are much smaller now that NAND based SSDs have proliferated, but they are still there in terms of latency, write speeds, etc. I guess you could say that RAM would be the next step “up”.

 

The one big thing I think that is really preventing adoption is that RAM remains still quite costly – costlier than SSDs and the traditional hard drive.

 

 

Existing RAM based operating systems

 

This field remains a pretty niche area, which is why you don’t see as much development for it. I think though that as always, if more people choose to install RAM based operating systems, we’ll see more development.

 

Linux  has the best potential for future development in this area because there is already so much built up around Linux that makes further ideas in the future possible, at least for the home computer user. Other open source operating systems like BSD-derivatives are also possible, but I suspect it will be harder to do. There also isn’t as much software for these less used systems as much as there is Linux.

 

A while back, there used to be an operating system by the name of Tin Hat Linux. Development stopped by around 2013 and since then, I have yet to see any similar systems come into play. It was built on Hardened Gentoo and is designed, as the name implies, to be a very secure OS. It is quite different from the Portage-based system of Gentoo, largely due to the design goals.

 

There are a great many Linux systems designed to be used for system recovery as well. Wikipedia has a full list of all of the distros that run from RAM: https://en.wikipedia.org/wiki/List_of_Linux_distributions_that_run_from_RAM

 

You can for modify existing Linux operating systems to act as RAM booting.  You just need to modify the etc folder. See here and here. I would recommend backing up of course (so in case you make a mistake you can revert) and then have the following options:

  • The RAM Disk boot
  • Boot Linux OS from physical disk (SSD or HDD)
  • Any other operating systems (ex: another Linux distro, Windows if you are dual booting, etc)

 

Through this, you will be able to boot from any Linux distro. That does offer a bit more flexibility.

 

There are also ways to boot Windows from RAM. I will discuss this later.

 

Conclusions

 

I will be discussing this in greater detail later.

 

An operating system optimized for running in RAM would be quite fast indeed in many ways and “feel” snappy. For certain write intensive applications, RAM is used today because it lasts a long time. You could modify the RAM too to boot any Linux OS. There’s also a lot more that I think would be possible were there greater interest in this field.

 

I think the question becomes, is it worth it? What would you pay for a computer that feels “snappy”? Is the higher boot time worth it? That is an interesting question that only the end user can answer.

 

Further Reading

http://opensource.dyc.edu/ramdisk-vs-ramfs

 

Leave a Comment

Your email address will not be published. Required fields are marked *