RAM was the new disk - and it will be again

Way back in time when a top of the range PC had two 10 megabyte hard disks and 640k was a lot of RAM, I used to use RAM as disk. My trusty old MS-DOS 2 machine provided a device driver RAMDRIVE.SYS which, when loaded, took a lump of RAM and made drive F out of it. It was terribly, terribly useful. Back then I wrote a lot of software in Turbo Pascal which used a technique called overlays to break through the 64k barrier. (Yes, you read that correctly, I did say the 64k barrier.)

Somewhere betwixt there and here, RAM disks have fallen by the wayside. Perhaps modern operating systems are so super smart that they handle it all transparently. I don't know to be honest. It sure doesn't feel like it when I'm sitting at my laptop, watching the hard disk light flash. And that is on a machine with 2 GIG of RAM for goodness sake.

Anyway, the great thing about putting Turbo Pascal overlay files onto the RAM disk was that they were code - not data. If the machine had a power failure and you lost the contents of the RAM disk, so what? It was just code. Thinking back to those days got me thinking about an aggressive RAM caching strategy that I do not think is being automatically exploited by modern operating systems. Namely, laptops.

Here is what I am thinking. The problem with using RAM for persistence is that you loose it when the power goes down. You can only afford to aggressively use RAM for persistence caching if you have a very reliable machine and very reliable power. Cue the pictures of rack mounted, air conditioned servers with uninterruptable power supplies.

Ok. But hang on a second. My day-to-day machine is a laptop. It is very reliable and guess what? It has a built in uninterruptable power supply. It is called a battery pack. I spend most of my working day tethered to the mains with the battery pack doing nothing. Even with a degrading battery such as mine, I can be confident of 30 minutes power before the battery dies. More than enough time to flush the cache and do an orderly shutdown.

I know I can probably rig it all up under Linux using tmpfs but I don't know what is involved in automatic shutdown which would involve probing the state of mains supply to the battery. I guess I'm just suprised that the RAM disk trick is not more commonly exploited in laptop-tethered-to-mains environments.

We are at an interesting point in personal computing. Most of us have more storage space and more raw CPU power than NASA had in its entirety a couple of decades ago. Sadly however, we cannot effectively utilize a lot of the storage because it so darned slow to access. Similarly our honkin' great CPUs spend there time running around

ITWorld DealPost: The best in tech deals and discounts.
  
Shop Tech Products at Amazon