[comp.unix.xenix] ramdisk help

whofan@well.sf.ca.us (Brian Lawrence Dear) (02/10/90)

 
We use SCO XENIX 386 version 2.2.3.  We'd like to set up a RAM disk
of 1 MB for storing a bunch of small support programs that get called
very often by our main program.  Right now it takes the disk a moment
to load each program before it can run, and this produces a noticable
delay in our interface -- a delay we'd like to remove.  With the 
support programs in RAM, loading should be much quicker.  
 
Unfortunately, we're at a loss as to how to decipher the SCO documentation
on RAM disks.  Does anyone have one in use?  What exactly did you do
to create the ram disk?
 
-- brian
   coconut computing, inc.
   la jolla, ca

jim@ic2020.UUCP (Jim Carter) (02/12/90)

in article <16073@well.sf.ca.us>, whofan@well.sf.ca.us (Brian Lawrence Dear) says:
>  
> Unfortunately, we're at a loss as to how to decipher the SCO documentation
> on RAM disks.  Does anyone have one in use?  What exactly did you do
> to create the ram disk?
>  
> -- brian
>    coconut computing, inc.
>    la jolla, ca
We had to upgrade our system from 2mb to 10mb with nothing in between.
As a result we have about 5mb more than we need.  So I created a 2mb 
ramdisk.  I have attatched the script files I use at bootup.

************* devices
brw-------   1 root     root      31,  0 Nov 13  1987 /dev/ram00
brw-rw-rw-   1 root     root      31,186 Feb  1 14:50 /dev/ram01
ram00 is already on your system(it was on ours)
ram01 is the one I made.  Notice the minor number.  It is the definition
of how big the ramdisk is.  Also one of the bits in the minor device specifies
if the device is to stay around or disapear after it is closed.  Pick the
permanent device.  Lookup RAMDISK(HW) my page is dated April 1,1987.  I would
suspect it has not changed.

************* ramdisk root directory.
drwxrwxrwx   5 root     root          80 Feb  1 14:50 ramdisk/
Make a normal directory entry in /root or whereever you wish to mount this
ramdisk.  I chose /ramdisk for the location.  Not realy important.  But just
make it a normal directory entry.

************* /etc/rc
# append line to /etc/rc which will create ramdisk.
/etc/rammount

************* /etc/rammount
:
/etc/mkfs -y /dev/ram01 2048
chmod +rw /dev/ram01
/etc/mount /dev/ram01 /ramdisk
mkdir /ramdisk/tmp
mkdir /ramdisk/bin
mkdir /ramdisk/lib
chmod +rwx /ramdisk/*
mkdir /ramdisk/lib/fp
chmod +rwx /ramdisk/lib/*
#
# ... copy files you want in ramdisk ...
cp /usr/bin/lens /ramdisk/bin
cp /u/local/bin/more /ramdisk/bin
cp /u/local/bin/w /ramdisk/bin
cp /bin/ls /ramdisk/bin
cp /u/local/bin/foxplus /ramdisk/bin
cp /usr/bin/foxplus.pr /ramdisk/bin
cp /usr/lib/foxplus/no87 /ramdisk/lib/fp
cp /usr/lib/foxplus/setkeys /ramdisk/lib/fp

************* Environment.
Make sure /ramdisk/bin is first in your search path, otherwise it
will find your ramdisk binaries elsewhere.

PATH=:/ramdisk/bin:./bin:/u/local/bin:/bin:/usr/bin:/u/jim/bin

- Hope this helps.
-- 
Jim Carter (Sequoia Contact Lens,1355 11th Street,Reedley,CA,93654)
{...!csufres!csuf3b!ic2020!jim} 209/638-3939, Fax 209/638-5433

mcs@fps.com (Mike Sanfratello) (02/13/90)

In article <16073@well.sf.ca.us> whofan@well.sf.ca.us (Brian Lawrence Dear) writes:
>
> 
>We use SCO XENIX 386 version 2.2.3.  We'd like to set up a RAM disk
>of 1 MB for storing a bunch of small support programs that get called
>very often by our main program.  
		< rest deleted >

You might want to try setting the sticky (s) bit on those programs first,
unless it already is set.  This would also be easier to setup in a customer's
environment, provided it is fast enough.

terry@pride386.UUCP (Terry Lyons) (02/13/90)

In article <16073@well.sf.ca.us>, whofan@well.sf.ca.us (Brian Lawrence Dear) writes:
> We use SCO XENIX 386 version 2.2.3.  We'd like to set up a RAM disk
> of 1 MB for storing a bunch of small support programs that get called
>
> -- brian
>    coconut computing, inc.
>    la jolla, ca

This is what I did only mine is 512K.

1.	mknod  /dev/ram_meg b 31 178
2.	mkfs /dev/ram_meg 1024
3.	( create a mount point for the ramdisk  e.g.: /mnt )
4.	mount /dev/ram_meg /mnt
5.	copy the files  you want to access to /mnt ( or whatever you call your 
mount point)
6.	put /mnt into your PATH >>>>AHEAD OF EVERYTHING ELSE<<<<

you must load the ramdisk every time you reboot but that's the way it goes!

terry @ pride386!