Jump to content

RAM drive

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Omicronpersei8 (talk | contribs) at 17:45, 21 August 2006 (Reverted edits by 81.76.81.62 (talk) to version 70909375 by Marudubshinki using VS). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A RAM-Disk, Ramdisk or Ramdrive is a virtual solid state disk that uses a segment of active computer memory, RAM, as secondary storage, a role typically filled by hard drives. Access times are greatly improved, because RAM is approximately a hundred times faster than hard drives. However, the volatility of RAM means that data will be lost if power is lost, e.g. when the computer is turned off. RAM disks can be used to store temporary data or hold uncompressed programs for short periods.

RAM disks were popular as boot media in the 1980s, when hard drives were expensive, floppy drives were slow, and a few systems, such as the Amiga series and the Apple IIgs, supported booting from a RAM disk. At the cost of some main memory, the system could be soft-rebooted and be back in the operating system in mere seconds instead of minutes. Some systems had battery-backed RAM disks so their contents could persist when the system is shut down.

A proper disk cache in the operating system will usually obviate the performance motivation for a RAM disk; a disk cache fulfills a similar role (fast access to data that is notionally stored on a disk) without the various penalties (data loss in the event of power loss, static partitioning, etc.). RAM disks are, however, indispensable in situations in which a physical disk is not available, or where access to, or changing a physical disk is not desirable (such as in the case of Live CDs). They can also be used in a kiosk-style device where any changes made to a system are not committed and the original configuration is to be loaded each time the computer is turned on.

The advent of SATA has meant that RAM disks can be interfaced as a normal hard drive, although with extremely high transfer speeds.

Another way to use RAM to store files is the temporary filesystem. The difference between temporary filesystem and a RAM disk is that the RAM disk (/dev/ram0 etc.) is fixed-sized and acts like a disk partition, whereas the temporary filesystem (/dev/shm; in Source Mage GNU/Linux also /tmp) grows and shrinks to fit the files put on it.

Ramdisks have the advantage of being much faster than hard drives and only require special software (and of course the computer's RAM). Their disadvantage is that they are limited to main memory and data is lost on loss of power unless other measures (such as battery backup) are used.

See also