[comp.sys.ibm.pc] How do you make a RAMDISK?

parnes@eniac.seas.upenn.edu (Gary Parnes) (12/15/89)

What exactly do I have to put into my config.sys/autoexec.bat
to make a Ramdisk?  I have 1 Meg of memory, so that 384K is just
sitting around often.



						Gary

/=============================================================================\
| "You're obviously misinformed... everything  |  Gary Parnes		      |
|  EAST of the San Andreas Fault is going to   |  Computer Science Engineer   |
|  fall into the ATLANTIC Ocean."              |  University of Pennsylvania  |
|   *** parnes@eniac.seas.upenn.edu ***        |  *NOT* Penn State, Dammit!   |
\=============================================================================/

melkins@jarthur.Claremont.EDU (Michael Elkins) (12/15/89)

In article <18100@netnews.upenn.edu> parnes@eniac.seas.upenn.edu.UUCP (Gary Parnes) writes:
>What exactly do I have to put into my config.sys/autoexec.bat
>to make a Ramdisk?  I have 1 Meg of memory, so that 384K is just
>sitting around often.

You need to put this into your CONFIG.SYS:

DEVICE=[drive:\] RAMDRIVE.SYS [DISKSIZE] [SECTORSIZE] [ENTRIES] [/E]

Where DISKSIZE is the size of the "disk", most likely 384 from what you've
said.  SECTORSIZE is the size of each sector (default is 128 bytes).  ENTRIES
is the maximum number of files you can store (default is 64).  /E uses
extended memory (you will probably use this if your extended memory is "on
board."

-me


-- 
 /| /|__                               |      melkins@jarthur.claremont.EDU
/ |/ |__    >>> Michael Elkins <<<     |      melkins@jarthur.UUCP
     |__                               |      ...uunet!jarthur!melkins
-=-=-=-=-=-="ACK !!!...It's not just a word, but a state of mind."-=-=-=-=-=-=-

ppd491@leah.Albany.Edu (Peter P. Donohue) (12/16/89)

In article <3610@jarthur.Claremont.EDU>, melkins@jarthur.Claremont.EDU (Michael Elkins) writes:
> In article <18100@netnews.upenn.edu> parnes@eniac.seas.upenn.edu.UUCP (Gary Parnes) writes:
> >What exactly do I have to put into my config.sys/autoexec.bat
> >to make a Ramdisk?  I have 1 Meg of memory, so that 384K is just
> >sitting around often.
> 
> You need to put this into your CONFIG.SYS:
> 
> DEVICE=[drive:\] RAMDRIVE.SYS [DISKSIZE] [SECTORSIZE] [ENTRIES] [/E]
> 
> Where DISKSIZE is the size of the "disk", most likely 384 from what you've
> said.  SECTORSIZE is the size of each sector (default is 128 bytes).  ENTRIES
> is the maximum number of files you can store (default is 64).  /E uses
> extended memory (you will probably use this if your extended memory is "on
> board."
                                                                         
  What drive letter would you use to call on it?                        
  What is the advantage to having more or less bytes in each sector?    
  Is there any disadvantage (or limit) to setting ENTRIES to some        
absurdly high number just so you wont have to worry about exceeding the   
limit?  
  Is there a way to put it in any memory above 1k (say if you have 2 meg
of memory on board)?
  Thanks.                                        
              
> -=-=-=-=-=-="ACK !!!...It's not just a word, but a state of mind."-=-=-=-=-=-=-

You got it! Ack!!!  

Phtpptt...
-- 
Peter P. Donohue 
ppd491@albny1vx.bitnet               .  "Education is a journey,
ppd491@leah.albany.edu               .    not a destination..."

cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) (12/17/89)

In article <2301@leah.Albany.Edu> ppd491@leah.Albany.Edu (Peter P. Donohue) writes:
$  What drive letter would you use to call on it?                        

   It will be automatically assigned the next drive letter above whatever
you have in your system.  If you have one floppy and a signle hard disk
partition, it will be D:.  If you have two floppies and a hard disk partitioned
into five drives, you'll get H:.

$  What is the advantage to having more or less bytes in each sector?    

   If the ramdisk driver in question uses clusters of one sector, the
sector size can be altered to reduce wasted space on the disk, or to
speed up access.

   If you are using very small files (like a whole load of five-line
batch files or something similar), you would perhaps want to decrease
the sector size so that less disk space is wasted.  DOS allocates space
one cluster at a time, where a cluster is some power of 2 sectors (1, 2, and
4 are probably the only sizes a ramdisk would use).  If your file is sub-
stantially shorter than one cluster, tough luck ... a whole cluster gets
allocated for it.

   If, on the other hand, your files are typically of a pretty good size
and you need every last ounce of speed, you might want to increase the
size of the sectors for two reasons.  With large sectors, there is less
overhead associated with figuring out which sector to read next, because
you don't have to do it as often.  Secondly, using extended memory, every
time you issue a read request for a sector, the machine has to enter
protected mode, copy the data, and reset the processor (that's the only
way out of protected mode) ... this takes time.  (Incidentally, if you
can configure your memory as expanded rather than extended, the ramdisk
will run faster since you no longer need to go in and out of protected mode).

WARNING:  Some versions of DOS do not like sector sizes larger than 512
bytes (which is what disks use in general).  I had an IBM AT running DOS
3.10 which would not allow a ramdisk unless the sector size was 512 or
smaller.  Keep this in mind if you want to use larger sectors.

   The above is only of any significance if the cluster size is one sector;
the relevance diminishes as the cluster size increases.

$  Is there any disadvantage (or limit) to setting ENTRIES to some        
$absurdly high number just so you wont have to worry about exceeding the   
$limit?  

   Yes, there is a disadvantage.  Directory entries take up 32 bytes each,
and they must be allocated one sector at a time.  You get 32 entries per
K of disk space, so it you set the number of entries to 512, for example,
you have just lost 16K of disk space.  This may not worry you if you're
only going to put 128K of stuff on a 384K ramdisk, but remember that files
grow to fill the available disk space, and if you use an absurdly high number
of directory entries, sooner or later you'll run out of space on that ramdisk.
It doesn't take that much thought to come up with a fairly reasonable number,
depending on how you're going to use the ramdisk.

$  Is there a way to put it in any memory above 1k (say if you have 2 meg
$of memory on board)?

   You mean 1M, I think.  Older versions of RAMDRIVE.SYS and VDISK.SYS would
allow you to use either conventional (the first 640K) or extended (in ATs
only, above 1M) memory, and I think they will use as much extended memory
as you have if you want them to.  The most recent versions (with DOS 4)
also allow you to use expanded memory (a.k.a. LIM EMS).
-- 
Stephen M. Dunn                               cs4g6ag@maccs.dcss.mcmaster.ca
          <std_disclaimer.h> = "\nI'm only an undergraduate!!!\n";
****************************************************************************
    If it's true that love is only a game//Well, then I can play pretend

lisbon@vpnet.UUCP (Gerry Swetsky) (12/22/89)

>From melkins@jarthur.Claremont.EDU  [Michael Elkins]:

> In article <18100@netnews.upenn.edu> parnes@eniac.seas.upenn.edu.UUCP (Gary
> Parnes) writes:
> >What exactly do I have to put into my config.sys/autoexec.bat
> >to make a Ramdisk?  I have 1 Meg of memory, so that 384K is just
> >sitting around often.
> 
> You need to put this into your CONFIG.SYS:
> 
> DEVICE=[drive:\] RAMDRIVE.SYS [DISKSIZE] [SECTORSIZE] [ENTRIES] [/E]
> 
    It also helps if Gary has the file RAMDRIVE.SYS on his drive,
    which he probably doesn't!

--
=============================================================================
| Help stamp out stupid .signature files!		    Gerry Swetsky   |
|                                                                           |
| Home (708)833-8122  Vpnet (708)833-8126               lisbon@vpnet.uucp   |
=============================================================================

psrc@pegasus.ATT.COM (Paul S. R. Chisholm) (01/05/90)

In article <18100@netnews.upenn.edu> parnes@eniac.seas.upenn.edu.UUCP
 (Gary Parnes) writes:
> What exactly do I have to put into my config.sys/autoexec.bat to
> make a Ramdisk?  I have 1 Meg of memory, so that 384K is just
> sitting around often.

Well, maybe that memory is sitting around, and maybe not.  It depends
on how your system (and specifically, your ROM BIOS) is designed.  If
you have an 8088 or 8086, the memory is lost, gone, inaccessible.  If
you have an 80286, the memory is probably very hard to get at.  If you
have an 80386, it's quite likely that the ROM BIOS maps itself into
that RAM and marks itself read-only; you may or may not be able to
disable this.  Ask whoever sold you your system.

Say you've got 384K of extended memory.  You want to find a software
package that will turn it into a RAM disk.  You may have gotten one
with your copy of MS-DOS; look for VDISK or something with a similar
name, or RTFM.*  If not, you can buy RAM disk software ala carte (I'm
sure, though I can't think of a source off hand), or with another
package (PC Tools has both cache and RAM disk software for
conventional, extended, or expanded memory).

Paul S. R. Chisholm, AT&T Bell Laboratories
att!pegasus!psrc, psrc@pegasus.att.com, AT&T Mail !psrchisholm
I'm not speaking for the company, I'm just speaking my mind.
*RTFM = Read The Manual.

djo7613@blake.acs.washington.edu (Dick O'Connor) (01/06/90)

In article <4377@pegasus.ATT.COM> psrc@pegasus.ATT.COM (Paul S. R. Chisholm) writes:
>In article <18100@netnews.upenn.edu> parnes@eniac.seas.upenn.edu.UUCP
> (Gary Parnes) writes:
>> What exactly do I have to put into my config.sys/autoexec.bat to
>> make a Ramdisk?  I have 1 Meg of memory, so that 384K is just
>> sitting around often.
>
>Well, maybe that memory is sitting around, and maybe not.  It depends
>on how your system (and specifically, your ROM BIOS) is designed.  If
>you have an 8088 or 8086, the memory is lost, gone, inaccessible.  If
>
Maybe, maybe not.  Care is required here.  I have a Zenith Z159 (XT)
machine at home with 1MB.  Zenith's EMM.SYS driver recognizes the 384K
as an "EMS Board" with 384K available.  I've made RAM disks there with 
public domain RAM disk programs.  PC Tools recognizes it as EMS memory
and uses it to speed the loading of its programs.  Maybe it just depends...

"Moby" Dick O'Connor                            ** DISCLAIMER: It would
Washington Department of Fisheries              ** surprise me if the
Olympia, Washington  98504                      ** rest of the Department
Internet Mail: djo7613@blake.u.washington.edu   ** agreed with any of this!