
			ORNL Virtual Disk Package
			-------------------------

	By:		Kenneth J. Cross
			Oak Ridge National Laboratory
			Bldg. 3500, MS-7
			P.O. Box X
			Oak Ridge, TN 37830

			Phone:	(615) 574-5729

The following package includes:

	   UIC		Description
	--------	-----------

	[313,20]	AVD -- Associate virtual disk utility
	[313,21]	DVD -- Dissociate virtual disk utility
	[313,22]	Virtual disk device driver (VD:)
	[313,10]	HELLO and BYE sources with modifications
			*******************************************
			editor's note:  The modified sources to HELLO
			and BYE were deleted.  The sources are liscensed
			software and as such cannot be distributed.  Users
			are encouraged to submit SLP files when they wish
			to modify a DEC source module.
			To try and help matters along I ran CMP and 
			compared Ken's HELLO.MAC with HELLO.DEC.  HELLO.DEC
			is the version of HELLO.MAC that comes on an
			11M v3.2 release kit.  The output file is HELLO.CMP.
			I did the same for BYE.  I ran CMP and compared
			Ken's BYE.MAC with BYE.DEC.  BYE.DEC is the version
			of BYE.MAC that comes on an 11M v3.2 release kit.
			The output file is BYE.CMP.
			***********************************************
	[313,24]	HELLO and BYE command files
	[313,30]	TRMSET -- Sets terminal characteristics at LOGIN


Introduction
------------

If you are unfamiliar with Virtual Disks, you should find out about them.
Unfortunately, I didn't have time to write up a thorough description of
what VD's are.  They are described by Ralph Stammerjohn (the original
inventor/author to whom all praise and glory belongs) on the Spring '79
DECUS tape.  I presented a paper on VD's at the Fall '80 DECUS in San
Diego and the write-up in the Proceedings of that Symposium describes
VD's, how they work, and how great they are.

The following discussion assumes a rudimentary knowledge of VD's and
how they work.


Virtual Disk Driver
-------------------

First of all is the virtual disk driver VDDRV.  It has changed very little
from the original Stammerjohn version, except for some protection
mechanisms to make sure the host disk (i.e., the disk on which the VD
is allocated) has not been changed.  VDDRV is really trivial (which is
the beauty of the entire VD package).


AVD and DVD
-----------

There are two other utility programs called AVD and DVD.  (I have changed
the meaning of these from the original "Allocate Virtual Disk" and
"Deallocate Virtual Disk" to "Associate Virtual Disk" and "Dissociate
Virtual Disk" since there was some confusion with the MCR ALLocate
operation.)

AVD and DVD have been changed considerably from the original Stammerjohn
version.  The reason for the changes were to enable a large number of
unsophisticated users to use VD's easily.

It usually happened that every time you logged on and ran AVD to get a
virtual disk, it was a different virtual disk unit every time, e.g.,
VD1: one day and VD5: the next.  So we had AVD pick the first available
VD unit and assign it to the logical device name VS: for that user.

For example, if VD0: and VD1: are in use, then running AVD will generate
the equivalent of the MCR command "ASN VD2:=VS:/LOGIN".  Note that VD2:
is the first available VD unit and the /LOGIN prevents the (non-
privileged) user from accidentally removing the assignment.  In this
manner, you always could reference the virtual disk as VS:.

If you need more than one VD, then AVD assigns the first one to VS:, the
next one to VS1:, etc.

Major modifications include:

	1.  The format of AVD is now

		>AVD filespec

	    where "filespec" is the file specification of the virtual
	    disk file on a host disk.

	    AVD automatically determines the first available virtual
	    disk unit (VD:) and assigns it to the first available
	    logical device name VS: for the user.  For example,

		>AVD DISK1

	    Will assign the virtual disk DISK1 to VD:, and assign
	    VD: to VS: for the user.

		>AVD DISK2

	    Will then assign DISK2 to VD1: and VD1: to VS1:.  The idea
	    is to always be able to refer to your virtual disk as VS:,
	    no matter what VD: it is really assigned to.

	    A /VM switch on AVD also assigns the virtual disk to logical
	    device VM:, i.e., "ASN VD:=VM:".

	2.  AVD /HELP provides some help.

	3.  AVD /ID and DVD /ID prints the version numbers of the tasks.

	4.  AVD and DVD both have /NM switches to suppress informational
	    messages.

	5.  AVD has a /LI switch to list the current assignments for all
	    the virtual disks.  A /BR switch gives a brief listing.

	6.  DVD /ALL will dissociate all virtual disks in use by this
	    terminal.  It simply checks all VS: assignments for the
	    terminal and dissociates them.  (DVD /ALL is used on logout.)

There are a number of other features that would only be appreciated by
a close inspection of the sources.  These include protection features
and PIPUTL for error handling.


HELLO and BYE
-------------
***********************************************************************
editor's note:  The modified sources to HELLO and BYE were deleted.  This
is liscensed software and as such cannot be distributed.  Submitors are
encouraged to submit SLP files when they wish to modify a DEC source module.
I ran CMP and compared HELLO and BYE as modified by Ken with the HELLO
and BYE supplied by DEC on an 11M v3.2 release kit.  The results of the
comparison are in HELLO.CMP and BYE.CMP.
*************************************************************************

The modifications to HELLO and BYE are not required to implement the
				       ---
rest of the virtual disk package.  The mod to HELLO checks for a
command file in LB:[201,1] that corresponds to the UIC of the person
logging on, e.g., if they are logging onto UIC [123,321], then HELLO
looks for file LB:[201,1]123321.CMD.  If it finds it, then it is executed
with the terminal privileged and slaved.
---------------------------------------
After the command file is finished, then the user is logged on non-privileged.

If that file is not found, then HELLO looks for LB:[201,1]123321.PRV.
If it exists, it is executed (again with the terminal privileged
and slaved) and the person is logged on privileged.

We use these files to automatically AVD a virtual disk for people when
they log onto the system.  Examples have been provided on the tape:
007020.PRV and 350010.CMD.  They would be used with UIC's [7,20] and
[350,10], respectively.

The modification to BYE simply runs DVD to dissociate any virtual
disks the user had while he was logged on.  We have found this to be
an essential clean-up operation when using virtual disks.  (The changes
to BYE would have been unnecessary if RSX-11M would run a command file
on logout like it does on login.)


TRMSET
------

Our system has many people connecting with different types of terminals
on different lines all the time.  So we wrote this simple little
program called "TRMSET" that sets the terminal characteristics for
users when they log in (TRMSET is automatically run by HELLO when
you log in).

TRMSET sends the escape sequence to request a terminal to identify
itself.  Many terminals respond with an identification string of some
sort.  TRMSET then sets the terminal characteristics for that type
of terminal.  Currently, TRMSET recognizes VT100's, LA120's, VT52,
and VT55.

If a terminal doesn't respond within a time-out period, then TRMSET
sets some default characteristics based on the baud rate of the line.


Finally
-------

The usual DECUS caveat applies: if it wipes out your system, too bad.
But we have had very good luck with it, and would be interested in
hearing of problems.
