RAM disk
Encyclopedia
A RAM disk or RAM drive is a block of RAM
Random-access memory
Random access memory is a form of computer data storage. Today, it takes the form of integrated circuits that allow stored data to be accessed in any order with a worst case performance of constant time. Strictly speaking, modern types of DRAM are therefore not random access, as data is read in...

 (primary storage or volatile memory
Volatile memory
Volatile memory, also known as volatile storage, is computer memory that requires power to maintain the stored information, unlike non-volatile memory which does not require a maintained power supply...

) that a computer's software is treating as if the memory were a disk drive (secondary storage). It is sometimes referred to as a "virtual RAM drive" or "software RAM drive" to distinguish it from a "hardware RAM drive" that uses separate hardware containing RAM, which is a type of solid-state drive
Solid-state drive
A solid-state drive , sometimes called a solid-state disk or electronic disk, is a data storage device that uses solid-state memory to store persistent data with the intention of providing access in the same manner of a traditional block i/o hard disk drive...

.

Performance

The performance of a RAM disk is in general orders of magnitude
Order of magnitude
An order of magnitude is the class of scale or magnitude of any amount, where each class contains values of a fixed ratio to the class preceding it. In its most common usage, the amount being scaled is 10 and the scale is the exponent being applied to this amount...

 faster than other forms of storage media, such as an SSD
SSD
-Computing:* Solid-state drive, a type of data storage device which uses memory rather than rotating media* Seven-segment display, a display which uses 7 segments to display mostly numbers* System sequence diagram, a type of UML software engineering diagram...

, hard drive, tape drive
Tape drive
A tape drive is a data storage device that reads and performs digital recording, writes data on a magnetic tape. Magnetic tape data storage is typically used for offline, archival data storage. Tape media generally has a favorable unit cost and long archival stability.A tape drive provides...

, or optical drive. This performance gain is due to multiple factors, including access time, maximum throughput
Throughput
In communication networks, such as Ethernet or packet radio, throughput or network throughput is the average rate of successful message delivery over a communication channel. This data may be delivered over a physical or logical link, or pass through a certain network node...

 and type of file system
File system
A file system is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device which contain it. A file system organizes data in an efficient manner and is tuned to the...

, as well as others.

File access time is greatly decreased since a RAM disk is solid state
Solid state (electronics)
Solid-state electronics are those circuits or devices built entirely from solid materials and in which the electrons, or other charge carriers, are confined entirely within the solid material...

 (no mechanical parts). A physical hard drive or optical media
Optical disc
In computing and optical disc recording technologies, an optical disc is a flat, usually circular disc which encodes binary data in the form of pits and lands on a special material on one of its flat surfaces...

, such as CD-ROM
CD-ROM
A CD-ROM is a pre-pressed compact disc that contains data accessible to, but not writable by, a computer for data storage and music playback. The 1985 “Yellow Book” standard developed by Sony and Philips adapted the format to hold any form of binary data....

, DVD
DVD
A DVD is an optical disc storage media format, invented and developed by Philips, Sony, Toshiba, and Panasonic in 1995. DVDs offer higher storage capacity than Compact Discs while having the same dimensions....

, and Blu-ray must move a head or optical eye into position and tape drives must wind or rewind to a particular position on the media before reading or writing can occur. RAM disks can access data with only the memory address of a given file, with no movement, alignment or positioning necessary.

Second, the maximum throughput
Throughput
In communication networks, such as Ethernet or packet radio, throughput or network throughput is the average rate of successful message delivery over a communication channel. This data may be delivered over a physical or logical link, or pass through a certain network node...

 of a RAM disk is limited by the speed of the RAM, the data bus, and the CPU
Central processing unit
The central processing unit is the portion of a computer system that carries out the instructions of a computer program, to perform the basic arithmetical, logical, and input/output operations of the system. The CPU plays a role somewhat analogous to the brain in the computer. The term has been in...

 of the computer. Other forms of storage media are further limited by the speed of the storage bus, such as IDE (PATA), SATA, USB, Serial or LPT
LPT
LPT is the original, and still common, name of the parallel port interface on IBM PC-compatible computers. It was designed to operate a text printer that used IBM's 8-bit extended ASCII character set. The name derives from the fact that "line printer" was a common generic term at the time for any...

 (Parallel). Compounding this limitation is the speed of the actual mechanics of the drive motors, heads and/or eyes.

Third, the file system
File system
A file system is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device which contain it. A file system organizes data in an efficient manner and is tuned to the...

 in use, such as FAT
File Allocation Table
File Allocation Table is a computer file system architecture now widely used on many computer systems and most memory cards, such as those used with digital cameras. FAT file systems are commonly found on floppy disks, flash memory cards, digital cameras, and many other portable devices because of...

, NTFS
NTFS
NTFS is the standard file system of Windows NT, including its later versions Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008, Windows Vista, and Windows 7....

, HFS
HFS
HFS may stand for:* Hyperfine structure* Hereditarily finite set* Hexafluorosilicic acid* WHFS , 'HFS was a slang abbreviation for the radio stations with that call sign in the Washington / Baltimore area...

, USBFS, ext2, etc, uses extra accesses, reads and writes to the drive, which although small, can add up quickly, especially in the event of many small files vs. few larger files (temporary internet folders, web caches, etc).

Because the storage is in RAM, it is volatile memory
Volatile memory
Volatile memory, also known as volatile storage, is computer memory that requires power to maintain the stored information, unlike non-volatile memory which does not require a maintained power supply...

, which means it will be lost in the event of power loss, whether intentional (computer reboot or shutdown) or accidental (power failure). This is sometimes desirable: for example, when working with a decrypted copy of an encrypted file, or for storing a web cache
Web cache
A web cache is a mechanism for the temporary storage of web documents, such as HTML pages and images, to reduce bandwidth usage, server load, and perceived lag...

 (doing this on a RAM disk can also improve the speed of loading pages).

In many cases, the data stored on the RAM disk is created, for faster access, from data permanently stored elsewhere, and is re-created on the RAM disk when the system reboots.

Implementation

Software RAM disks 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 RAM disks 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 RAM disk by way of a user space
User space
A conventional computer operating system usually segregates virtual memory into kernel space and user space. Kernel space is strictly reserved for running the kernel, kernel extensions, and most device drivers...

 application process. Usually no battery backup is needed due to the temporary nature of the information stored in the RAM disk, but an uninterruptible power supply
Uninterruptible power supply
An uninterruptible power supply, also uninterruptible power source, UPS or battery/flywheel backup, is an electrical apparatus that provides emergency power to a load when the input power source, typically mains power, fails...

 can keep the entire system running during a power outage, if necessary.

Some RAM disks use a compressed filesystem such as cramfs
Cramfs
The compressed ROM file system is a free read-only Linux file system designed for simplicity and space-efficiency. It is mainly used in embedded systems and small-footprint systems....

 to allow compressed data to be accessed on the fly, without uncompressing it first. This is convenient because RAM disks are often small due to the higher price per byte than conventional hard drive storage.

History and operation-system specificities

The first software RAM disk for microcomputers was invented and written by Jerry Karlin in the UK in 1979/80. The software, known as the Silicon Disk System
Silicon Disk System
The Silicon Disk System was the first commercially available RAM disk for microcomputers.It was written by Jerry Karlin in 1979/80. Karlin was joined by Peter Cheesewright and their company Microcosm Research Ltd marketed the product for a number of years. The product was available as a standalone...

 was further developed into a commercial product and marketed by JK Systems Research which became Microcosm Research Ltd when the company was joined by Peter Cheesewright of Microcosm Ltd
Microcosm Ltd
Microcosm Ltd is a UK company established in 1979. Its early claims to fame included Silicon Disk System in 1981 and Microcache in 1982 ....

. The idea was to enable the early microcomputers to use more RAM than the CPU could directly address. Making bank-switched RAM behave like a disk drive was much faster than the disk drives - especially in those days before hard drives were readily available on such machines.

The Silicon Disk was launched in 1980, initially for the CP/M
CP/M
CP/M was a mass-market operating system created for Intel 8080/85 based microcomputers by Gary Kildall of Digital Research, Inc...

 operating system and later for MS-DOS
MS-DOS
MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

. Due to the limitations in memory addressing on Apple II series
Apple II series
The Apple II series is a set of 8-bit home computers, one of the first highly successful mass-produced microcomputer products, designed primarily by Steve Wozniak, manufactured by Apple Computer and introduced in 1977 with the original Apple II...

 and Commodore computers, a RAM disk was also a popular application on Commodore 64
Commodore 64
The Commodore 64 is an 8-bit home computer introduced by Commodore International in January 1982.Volume production started in the spring of 1982, with machines being released on to the market in August at a price of US$595...

 and Commodore 128
Commodore 128
The Commodore 128 home/personal computer was the last 8-bit machine commercially released by Commodore Business Machines...

 systems with RAM Expansion Units and on Apple II series
Apple II series
The Apple II series is a set of 8-bit home computers, one of the first highly successful mass-produced microcomputer products, designed primarily by Steve Wozniak, manufactured by Apple Computer and introduced in 1977 with the original Apple II...

 computers with more than 64kB of RAM. Apple Computer
Apple Computer
Apple Inc. is an American multinational corporation that designs and markets consumer electronics, computer software, and personal computers. The company's best-known hardware products include the Macintosh line of computers, the iPod, the iPhone and the iPad...

 supported a software RAM drive natively in ProDOS
ProDOS
ProDOS was the name of two similar operating systems for the Apple II series of personal computers. The original ProDOS, renamed ProDOS 8 in version 1.2, was the last official operating system usable by all Apple II series computers, and was distributed from 1983 to 1993...

: on systems with 128kB or more of RAM, ProDOS would automatically allocate a RAM drive named /RAM.

Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 added a RAM disk to MS-DOS
MS-DOS
MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

 (version 2.0) in 1983. AmigaOS
AmigaOS
AmigaOS is the default native operating system of the Amiga personal computer. It was developed first by Commodore International, and initially introduced in 1985 with the Amiga 1000...

 has had a built in RAM disk since the release of version 1.2 in 1986 and still has it in AmigaOS 4.1
AmigaOS 4
AmigaOS 4, , is a line of Amiga operating systems which runs on PowerPC microprocessors. It is mainly based on AmigaOS 3.1 source code, and partially on version 3.9 developed by Haage & Partner...

 (2010). Apple Computer
Apple Computer
Apple Inc. is an American multinational corporation that designs and markets consumer electronics, computer software, and personal computers. The company's best-known hardware products include the Macintosh line of computers, the iPod, the iPhone and the iPad...

 added the functionality to the Apple Macintosh with System 7
System 7
System 7 is the name of a Macintosh operating system introduced in 1991.System 7 may also refer to:* System 7 , a British dance/ambient band* System 7 , 1991 album* IBM System/7, a 1970s computer system...

's Memory control panel
Control panel
Control panel may refer to:* Control panel , a flat, often vertical, area where control instrumentation is mounted.* Control panel , the tool in the operating system which allows most or all of the settings to be changed through a user interface** Control panel ** Control Panel ** Web hosting...

 in 1991, and kept the feature through the life of Mac OS 9
Mac OS 9
Mac OS 9 is the final major release of Apple's Mac OS before the launch of Mac OS X. Introduced on October 23, 1999, Apple positioned it as "The Best Internet Operating System Ever," highlighting Sherlock 2's Internet search capabilities, integration with Apple's free online services known as...

. Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

 users can use the hdid, newfs (or newfs hfs) and mount
Mount (Unix)
The Unix command line utility mount instructs the operating system that a file system is ready to use, and associates it with a particular point in the system's file system hierarchy . The counterpart umount instructs the operating system that the file system should be disassociated from its mount...

 utilities to create, format and mount a RAM disk.

Many Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 and Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....

 systems provide some form of RAM disk functionality. In Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 and similar systems, besides the more traditional /dev/ram, another way to store files in RAM is provided by tmpfs
TMPFS
tmpfs is a common name for a temporary file storage facility on many Unix-like operating systems. It is intended to appear as a mounted file system, but stored in volatile memory instead of a persistent storage device...

. RAM disks are particularly useful in high-performance, low-resource applications for which Unix-like operating systems are sometimes configured. There are also a few specialized "ultra-lightweight" linux distributions which are designed to booted from removable media and stored in a ramdisk for the entire session. Puppy Linux
Puppy Linux
Puppy Linux is a lightweight Linux distribution that focuses on ease of use. The entire system can be run from RAM, allowing the boot medium to be removed after the operating system has started...

 is the best-known of these.

See also

  • List of RAM disk software
  • Cache
    Cache
    In computer engineering, a cache is a component that transparently stores data so that future requests for that data can be served faster. The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that are stored elsewhere...

    , an area to store transient copies of data being written to, or repeatedly read from, a slower device
  • tmpfs
    TMPFS
    tmpfs is a common name for a temporary file storage facility on many Unix-like operating systems. It is intended to appear as a mounted file system, but stored in volatile memory instead of a persistent storage device...

    , a common ramdisk filesystem

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK