Uses part of the computer's random-access memory (RAM) to simulate a hard disk drive.
Syntax
Device=[Path]RamDrive.sys [DiskSize [SectorSize [NumEntries]]] [/E | /A]
[Path] |
The full path. Default is the root directory of the start-up drive (usually C:/) |
DiskSize |
Specifies the size of the RAM drive in Kb. Valid values for DiskSize are from 4 to 32767 or amount of memory available, whichever is less. (Default is 64). |
SectorSize |
Specifies the disk sector size in bytes. SectorSize can be 128, 256, or 512 bytes (Default: 512). If a value is specified for SectorSize, DiskSize must also be specified. |
NumEntries |
Specifies the maximum number of files and directories you can create in the RAM drive's root directory. NumEntries can be from 2 to 1024 entries (Default is 64). Each directory entry requires 32 bytes of disk space (64 directory entries x 32 bytes = 2048 bytes = 4 sectors @ 512 bytes). If NumEntries is specified, the number is rounded up to fill the sector. i.e. If NumEntries is specified to be 100, with SectorSize at 512, the actual number of directory entries available will be automatically rounded up to 112.
If NumEntries is specified, DiskSize and SectorSize must also be specified.
If there is not enough memory available to create the RAM drive as specified, RAMDrive will try to create it with a limit of 16 directory entries (1 sector). If there is still insufficient memory, the RAMDisk will not be installed. |
Note:By default, RamDrive.sys will create the RAM Disk in conventional memory. The preferred option is to create the disk(s) in extended memory. |
/E |
Creates the RAM drive in extended memory. For RAMDrive to use extended memory, the system must be configured so that it provides extended memory via a device driver such as Himem.sys, for example. |
/A |
Creates the RAM drive in expanded memory. For RAMDrive to use expanded memory, the system must be configured so that it provides expanded memory via an expanded-memory manager such as EMM386. |
Notes
- This device driver must be loaded by a DEVICE or DEVICEHIGH command in your CONFIG.SYS file.
- Ramdrive.sys can create RAM drives with capacities up to 32Mb. Multiple RAM drives can be set up. Each drive must be specified separately.
- A status message along the following lines is displayed for each drive as it is loaded:
Microsoft RAMDrive version 3.06 virtual disk F:
Disk size: 2,044k
Sector size: 512 bytes
Allocation unit: 1 sectors
Directory entries: 64
|
- The first line gives the letter allocated by DOS to the drive. This is the first available drive letter and cannot be specified by the user.
- Sector size can be specified by the user but all the suggestions I have seen have been to leave this alone. I understand that sectors of 512 bytes are the universally accepted standard for drives of all types (floppy, hard, and RAM).
- Allocation Units (AUs) are equivalent to the clusters of physical disks. The amount of memory assigned to a file is 1 or more AUs.
RAMDisk Size [Kb] | Sectors/AU | AU size[Kb] | AUs /Disk |
4 - 2044 | 1 | 0.5 | 8 - 4000 |
2045 - 4083 | 2 | 1 | 2000 - 4000 |
4084 - 8061 | 4 | 2 |
8 062 - 16 317 | 8 | 4 |
16 318 - 32 629 | 16 | 8 |
32 630 - 32 767 | 32 | 16 | 2000 |
The above table indicates that a single RAMDisk cannot hold more than 4000 files however small the files or large the disk. Furthermore, a file of 1500 bytes will require 4 AUs (2048 bytes) on a 1Mb RAMDisk and 1 AU (17,384 bytes) on a disk of 32,767 Kb.
- "Directory entries" is the maximum number of files/directories that can be accomodated in the root directory of the RAMDisk - any number of files/subdirectories can be held in subdirectories below the root. This number (NumEntries) can be specified when setting up the RAMDisk but the default (64) is a pretty reasonable figure for most uses.
- RAM drives are much faster than hard disk drives because your computer can read information faster from memory than from a hard disk. As far as the computer is concerned, a RAM drive appears to be a normal hard disk drive which can be used as any other hard drive.
The most important difference between a real disk drive and a RAM drive is that all information on a RAM drive is lost when the computer is turned off/restarted. It is thus most important to save any data written to a RAM disk on more permanent media before shutting down.
- In a Dos environment, RAM drives can be particularly useful when working with programs that do frequent disk read/write operations - often with temporary files.
- In a Win95/8 environment, RAM drives are seldom useful because Windows uses all available memory. Although it may seem a neat idea to use a RAM drive for the Windows swap file, this is very seldom practical. Windows only uses a swap file when it has run out of RAM. Reducing the amount of available RAM by making a RAM drive will mean that a swap file will be required sooner (and it won't be large enough, anyway). In short, creating a RAM drive to use for a swap file is equivalent to specifing a swap file size of 0 without a RAM drive - in both cases most systems will typically give an "out of memory" message sooner or later.
- There are alternative RAM drives available that do not need to be loaded in Config.sys and/or do not have the 32Mb limit. I have not used any myself but see: furd19_i.zip available at The Simtel.Net MS-DOS Collection - Memory resident disks.
Example
To create a RAM Drive of 32 Mb (the maximum possible with RamDrive.sys), include the following lines in Config.sys:
Device=c:\Windows\Himem.sys | Enables access to extended memory |
Device=c:\Windows\Emm386.exe NoEms | Provides access to upper memory blocks (UMBs) |
Dos=High,UMB | Lets Dos load into high memory and manage the UMBs |
DeviceHigh=c:\Windows\RamDrive.sys 32767 /E | Creates a 32 Mb RAM Drive in extended memory. |
File Details
File Name | Default Location | Dos Ver. | Win Ver. | Size | Date | Source |
Ramdrive.sys | c:\windows |
7.0 | Win95 |
12 6631 | 11/07/95 | win95_09.cab |
7.1 | Win95 (OSR2.x) |
12 6631 | 24/08/96 | win95_14.cab |
Win98 |
12 6631 | 11/05/98 | base5.cab |
Win98 SE |
12 6631 | 23/04/99 | base5.cab |
Superscripts denote which same size files, if any, are identical (using FC).
Further Reference
|