RAM disk
From Wikipedia, the free encyclopedia
A RAM disk is a software abstraction that treats a segment of random access memory (RAM) as secondary storage, a role typically filled by hard drives.
Access time is greatly improved to files held on RAM disks. However, the volatility of RAM means that data will be lost if power is lost, e.g. when the computer is turned off. This is sometimes desirable, for example when working with a decrypted copy of an encrypted document. In many cases, the data stored on the RAM disk is only a copy of or is derived from data permanently stored elsewhere, and thus will be re-created when power is restored and the system reboots.
RAM disks can also be used to hold uncompressed programs for short periods.
Contents |
[edit] Implementation
Software ramdisks use the normal RAM in main memory as if it were a partition on a hard drive rather than actually accessing the data bus normally used for secondary storage. Though ramdisks can often be supported directly from the operating system via special mechanisms in the operating system kernel, it is possible to also create and manage a ramdisk by way of a user space application process.[1] Usually no battery backup is needed due to the temporary nature of the information stored in the ramdisk, but an uninterruptible power supply can keep the entire system running during a power outage, if necessary.
Some ramdisks use a compressed filesystem such as cramfs to allow compressed data to be accessed on the fly, without uncompressing it first. This is convenient because ramdisks are often small due to the higher price per megabyte than conventional hard drive storage.
[edit] Usage for Web Caches
It is possible to store a Web cache on a RAM disk and this can improve the speed of loading pages[2].
Due to the volatility of RAM disks there are security advantages in using a RAM disk[3].
[edit] History
The first commercially available software RAM disk for microcomputers was the Silicon Disk System from Microcosm Ltd. This appeared in 1980, initially for the CP/M operating system and later for MS-DOS. Due to the limitations in memory addressing on Commodore hardware, a ramdisk was also a popular application on Commodore 64 and Commodore 128 systems with RAM Expansion Units.
Microsoft added a RAM-disk to MS-DOS (version 2.0) in 1983; Apple Computer added the functionality to System 7 in 1991. In addition, many Unix and Unix-like systems provide some form of ramdisk functionality; it is particularly used for Linux installations and similar high-performance, low-resource situations.
[edit] References
- Sample code to create ramdisk drivers on Win32 and classic Mac OS
- Unix shell script to create a ramdisk on Mac OS X
- ^ AppDisk for the classic Mac OS is one example still on the market of a userspace ramdisk utility.
- ^ Using a RAM disk for browsing the web on Macs
- ^ Using a RAM disk to improve security in firefox

