[comp.unix.aix] PCSIM on RS6000

lr@cs.brown.edu (Luigi Rizzo) (02/03/91)

I have an IBM RISC/6000, running the PC simulator, 'pcsim'. In
order for the program to work, an image of the 'C' drive must be
stored in a Unix file (call it C_file). The user can also define
other disks (say 'D', 'E', etc.), that are in fact Unix directories
(call it D_dir).

In order to let several users run their DOS application without
waste of disk space, I would like to use a unique, possibly read-only,
copy of the C_file, containing all the standard programs and files,
and let each user have her/his own D_dir with all the specific
application programs and data files.
However, it looks that this approach is not possible, at
least in a straightforward way, because:

1) the PC simulator creates a lock to signal that a C_file is
   currently used by a simulator process, and refuses to use it if
   it is busy.

2) Programs cannot be run from a D_dir.

I cannot really understand why these restrictions are present.

For 1) I know that there might be problems in having two or more
processes trying to write concurrently to the C_file; however, to
my knowledge there is no restriction in having a read-only C_file
(in fact, you can boot DOS from a write protected floppy disk),
so it would have been smarter to use the lock onlyt to prevent more
than one process to write to the file.

Point 2) is strange too, because executable programs have no need
at all to be treated in a particular way: DOS reads an executable
file the same way it reads a data file, so I see no point in this
restriction.

Any ideas on how to solve the problems ? For 1) it might be easy,
say by creating links to the shared file. Problem 2) might be
much harder, the only solution I see is to use the JOIN command,
but don't know if it suffices. Unfortunately, I've not been yet able
to check the above techniques, so any suggestion will be welcome.

	Luigi Rizzo
	lr@cs.bronw.edu, luigi@sssup2.sssup.it

jerry@heyman.austin.ibm.com (Jerry Heyman) (02/06/91)

In article <63457@brunix.UUCP> lr@cs.brown.edu (Luigi Rizzo) writes:
[... description of setting up simulated drives in PCSIM ...]
>
>In order to let several users run their DOS application without
>waste of disk space, I would like to use a unique, possibly read-only,
>copy of the C_file, containing all the standard programs and files,
>and let each user have her/his own D_dir with all the specific
>application programs and data files.

It is possible to do so, by changing the mode on the C_disk file to 444 (making
it read-only for all users).  This works fine, unless you have programs that
MUST write to the C_drive - they will fail.

>However, it looks that this approach is not possible, at
>least in a straightforward way, because:

>
>1) the PC simulator creates a lock to signal that a C_file is
>   currently used by a simulator process, and refuses to use it if
>   it is busy.
>
>2) Programs cannot be run from a D_dir.
>
>I cannot really understand why these restrictions are present.
>

1) If the C_drive is read-write, then it will be file-locked to protect the
user from having someone else mangle the files in that simulated hard disk
while they're running.

2) There is a restriction on executing from a directory (see the documentation)
on v3.1 PCSIM.  This is an area that is being corrected for a 'future' release.
There is nothing stopping you (or any other user) to have a second AIX file as
the D_drive and making it read-write so that each user can share there.  The
problem is just the C (boot) drive.

>
>	Luigi Rizzo
>	lr@cs.bronw.edu, luigi@sssup2.sssup.it

jerry
-- 
Jerry Heyman                     IBM T-R: jerry@heyman.austin.ibm.com
AWD Tools Development            VNET   : HEYMAN at AUSVMQ
AWD Austin                       T/L    : 793-3962
*** All opinions expressed are exactly that - my opinions and NOT IBM's