[net.unix-wizards] How is \"single-user\" done?

Ron Natalie <ron@BRL-TGR> (01/28/85)

The number-of-user restriction means "n users logged in at a time", you
are free to have as many accounts in /etc/passwd as can reasonably
be supported.  The system is usually restricted to one user by bugging
init to only start up only as many getty's as required.

Any reasonable UNIX hacker can defeat the number of users with a little
thought, although a trend is made on IBM PC's to omit the general terminal
case and write software that only deals with the console.

-Ron

Ron Natalie <ron@BRL-TGR> (02/11/85)

> It means that it cannot process several jobs at once.  Granted, the
> IBM PC has the ability to run several *processes* belonging to the same user,
> the capability of context switching with regard to several users is a bit
> trickier.

Wrong, the difficult in doing context switching is the same under UNIX
irregardless of the uid's of the processes being run.

>  The CPU does not have the capability to block illegal memory
>  accesses (PAGING/VM), nor the speed required for multi-user.

PAGING/VM is not required, just simple memory protection.  The lack of
memory protection alone is not the reason for the PC being a single user
machine.  Protecting one users task from trashing the memory of another
of his, or writing on the operating system's memory is just as important
as keeping him from stomping on other users.

The real reason the IBM-PC is a single user machine is that no one in
his right mind would consider it otherwise.  First, as you stated before,
it is slow.  Second, the first user gets to use the CPU display and keyboard,
everyone else is a second class citizen when they use the serial ports.
IBM-PC software developers end of developing all their software to run
assuming your using the console, since it is the easy way out and is the
only terminal on the system in 99.9% of the cases.

davidson@sdcsvax.UUCP (Greg Davidson) (02/14/85)

Before we get too excited about explaining the impossibility of running
UNIX in multiuser mode on the IBM PC, I would like to point out that
XENIX and VENIX are frequently run multi-user on the PC, and have
reasonable multi-user performance when doing, for example, general
office work (mostly editing and light database operations).

The Santa Cruz Operation (XENIX) people explained how they handle the
memory protection aspect:  User programs are limited to 16-bit data
pointers, and user tasks are always given a whole 64K segment to play
with.

It is simply not economical to use a PC with a hard disk single user.
Whether you run UNIX or DOS) the cost/user is uncompetitive.  Of
course, you can do even better if you have enough users to timeshare
a super micro.

BTW, speaking of other known impossibilities, I played with VENIX on a
DG/1 at the trade show in Dallas.  It didn't have a hard disk, yet
ran fairly nicely (noticably more responsive than with HP/UX on the
HP Integral).  I ran both vi & csh (the only big programs on the disk)
and they loaded fast and ran fine.  I've seen VENIX running on floppy
based LSI-11 systems before, so this impossibility is also fairly common.

Still, I fully believe that these feats would be impossible for a bulky
system like PC/IX, let alone my favorite UNIX, 4.2BSD.

_Greg