[comp.arch] PDP-10 user I/O

andrew@frip.gwd.tek.com (Andrew Klossner) (05/21/88)

[]

	"By the way, the KI- and KL-10 processors also reserved a few
	addresses in the I/O space to be "unprivileged". That is, I/O
	instructions (DATAI, DATAO, CONI, CONO) were allowed to these
	few addresses from normal user-mode programs. I'm not sure if
	this was ever used by anyone..."

While we're reminiscing, the KA-10 (first PDP-10 if you don't count the
PDP-6) had "user mode", "monitor (supervisor) mode", and "user I/O
mode".  This last differed from user mode only in that all of those I/O
instructions were available.  I never saw it used, either.

  -=- Andrew Klossner   (decvax!tektronix!tekecs!andrew)       [UUCP]
                        (andrew%tekecs.tek.com@relay.cs.net)   [ARPA]

rpw3@amdcad.AMD.COM (Rob Warnock) (05/27/88)

+---------------
| While we're reminiscing, the KA-10 (first PDP-10 if you don't count the
| PDP-6) had "user mode", "monitor (supervisor) mode", and "user I/O
| mode".  This last differed from user mode only in that all of those I/O
| instructions were available.  I never saw it used, either.
|   -=- Andrew Klossner   (decvax!tektronix!tekecs!andrew)       [UUCP]
+---------------

Oh, "user I/O" mode got used a LOT by folks in lab environments. Let's see,
on the Emory University Chemistry Department's KA-10, we had user-I/O mode
programs for doing data acquisition from NMR spectrometers, interfacing to
other computers, and even running a line printer. (There was no driver for
that particular printer interface, so the driver was coded into the line
printer spooler, in user mode.)  As I recall, there was even a program
that formatted DECtapes in user-mode while timesharing was going on.
(The operating system could be requseted to vector certain I/O interrupts 
to user-mode programs.)

Only disadvantage was that they had to be "trusted", since they could take
down the machine...

Coming forwards to Unix days, the v.7 "phys" call can be used for the same
thing, given memory-mapped I/O. At Fortune Systems we used to "phys" call
to implement a user-mode driver for a computer-computer channel.

User-mode I/O, in general, is a nice "fast prototyping" tool. You can write
(most of) your driver in user-mode, without taking down the machine, and
then drop it into the kernel only when it works. [No flames about the
wisdom or lack of it of doing development with live users around; you
still get the advantages of fast turnaround on a "single-user" system
if you can avoid a reboot cycle on every compiler cycle.]

If you have some sort of "pseudo-device" available (pty's can usually be
used, though not always), a rather clean development "platform" can be
erected in user-mode, with the slave end of the pseudo-device standing
in for the real device, and the "driver" controlling the master end.
A friend of mine (Mark Stein) did an entire network protocol package
this way once, with the slave ends acting as "sockets", and the "kernel"
code running as a user process holding all the master ends.

Are we far afield from "comp.arch"? Not really. I claim it is important that
new processors/systems allow (though not by default!) user-mode processes to
have selective access to I/O registers, for just this sort of "user-I/O".
For example, the Am29000 allows any mapped page to actually be in "I/O Space".

If I/O devices are allocated rather sparsely in I/O Space (by ignoring the
bottom few address bits), one could give a user process access to (say) one
I/O port but not another. (You can use a scheme similar to the "PDP-10 Monitor"
for vectoring interrupts to "wakeups": Allow a user-I/O program to plant a
short code sequence to clear the interrupt and grab time-critical data, while
the rest of the processing occurs in user mode.)

Paricularly in a PC or workstation environment, such access makes the machine
much more userul in laboratory or "real-time" environments, while also making
it easier for driver-writers.


Rob Warnock
Systems Architecture Consultant

UUCP:	  {amdcad,fortune,sun,attmail}!redwood!rpw3
ATTmail:  !rpw3
DDD:	  (415)572-2607
USPS:	  627 26th Ave, San Mateo, CA  94403

mcdonald@uxe.cso.uiuc.edu (05/28/88)

I also would like to see hardware manufacturers make it IMPOSSIBLE
for operating system writers to prevent use of IO, all instructions,
etc, by ALL programs. I find it frustrating to find many otherwise
lovely computers rendered useless to me by an operating system which
prevents me from writing programs the way I like. How hard would it
be to have a jumper on the CPU board that would circumvent the bits
in the PSW that prevent user-mode programs from doing IO and taking
interrupts?
Doug McDonald

firth@sei.cmu.edu (Robert Firth) (05/30/88)

In article <46500018@uxe.cso.uiuc.edu> mcdonald@uxe.cso.uiuc.edu writes:
>... I find it frustrating to find many otherwise
>lovely computers rendered useless to me by an operating system which
>prevents me from writing programs the way I like...

So throw away the operating system.  The purpose of an OS is to
add value.  When it subtracts value - when the things it stops you
doing are more important that the things it provides for you - then
it is time to throw it away.

roy@phri.UUCP (Roy Smith) (05/31/88)

firth@bd.sei.cmu.edu.UUCP (PUT YOUR NAME HERE) writes:
> So throw away the operating system. [...] When [the OS] subtracts value -
> when the things it stops you doing are more important that the things it
> provides for you - then it is time to throw it away.

	I was going to say "you mean like TENEX instead of OS-TEN, or Unix
instead of RSTS (or VMS, or Domain, or ...)" but I realized that I can't for
the life of me remember the name of the native DEC OS that ran on the pdp-10
(I know I wasn't OS-TEN, but I needed a space-filler).

	More seriously, other than TENEX and Unix, can anybody think of any
"third-party" OSs which replaced the vendor-suplied OS on a given machine to
any significant extent?  Surely there must be other examples.  Does MACH
count as an OS, or is it really just a Unix derivitive?  If it does count, I
guess that would be one third-party OS displacing another!

	Anybody gotten fed up with SunOS and tried writing their own
operating system for a Sun?
-- 
Roy Smith, System Administrator
Public Health Research Institute
455 First Avenue, New York, NY 10016
{allegra,philabs,cmcl2,rutgers}!phri!roy -or- phri!roy@uunet.uu.net

bzs@bu-cs.BU.EDU (Barry Shein) (05/31/88)

I'm sure the list of third-party operating systems is much longer than
you suspect. I'd guess there were zillions for the PDP-11, tho few
were sold, mostly in-house things for various purposes, usually some
flavor of real-time work. I've run into a few over the years.

Some notable ones (not exclusively PDP-11) are PICK (runs on several
architectures), TS-11, MS/DOS (right?), MTS (Michigan Time Sharing,
370 architecture), RAX (370), MUSIC (son of RAX), WYLBUR (370), that
OS which ran on 10's which was a library system (I think Boston Public
ran one), a few Unix clones come to mind (UNOS, UNIVERS, etc), that
LSI-11 O/S that came with the graphics terminal from some university
[I think it was sold commercially for a while, was that Cornell?], ITS
(PDP-10), WAITS (PDP-10), CTSS, Multics (sort of, consortium effort
including vendor, GE), ATLAS (high-brow trivia), HASP (370, NASA), I'm
sure I'm forgetting dozens I've run into...the 370 alone probably had
dozens, seems I used to run into poor souls supporting such things
regularly, then again it seemed like every CMS program became an OS
sooner or later...Doesn't Compuserve run their own OS on their 10s?

I guess some of those aren't quite "significant", but what the heck...

	-Barry Shein, Boston University

jkrueger@daitc.ARPA (Jonathan Krueger) (05/31/88)

In article <3327@phri.UUCP> roy@phri.UUCP (Roy Smith) writes:
>I can't for
>the life of me remember the name of the native DEC OS that ran on the pdp-10

TOPS-10, originally the Total OPerating System, later renamed The
OPerating System.  I could never tell if DEC was trying to raise
expectations or lower them.  But lo how the mighty are fallen.  It did
enjoy twenty years of service.  It will be interesting to see which
currently widely available operating systems will be remembered when
they hit twenty.  Will you still need them, will you still feed them?
When you've got 64? (address bits, that is).

-- Jon Krueger

bzs@bu-cs.BU.EDU (Barry Shein) (05/31/88)

>enjoy twenty years of service.  It will be interesting to see which
>currently widely available operating systems will be remembered when
>they hit twenty.  Will you still need them, will you still feed them?

Depending on exactly where you start counting from Unix is getting
close to 20 years old, the date 1969 is often given as the beginning
of development. Even if you're just counting when it was first
distributed outside the labs that's around 73-74 so 20 is w/in 1..5
years. I suspect Unix will survive that period more or less intact (if
it survives the next 12 months...:-) I was at the Unix 10th birthday
party at DECUS, I think that was 84.

	-Barry Shein, Boston University

hutchson@convex.UUCP (05/31/88)

Third-party operating systems that replaced the manufacturer's system:

    Would you count ZCPR{,2,3} on CP/M systems?
       ...  Xenix/Double-DOS/etc. on MS-DOS systems?
    Amdahl's Unix(TM) is by some accounts the best way to get Unix
                on IBM 370-family systems.
    GE's CTSS runs on the Honeywell DPS-8.
    Pick, OS-9, Unix, Minix, etc. typically replace some other os.
    David Beckemeyer's micro-RTX replaces the Atari-ST's GEMDOS.

henry@utzoo.uucp (Henry Spencer) (06/01/88)

> 	Anybody gotten fed up with SunOS and tried writing their own
> operating system for a Sun?

This isn't quite so easy for Suns as it was for (say) the pdp11.  When you
took delivery of a pdp11, you got complete hardware documentation with it...
-- 
"For perfect safety... sit on a fence|  Henry Spencer @ U of Toronto Zoology
and watch the birds." --Wilbur Wright| {ihnp4,decvax,uunet!mnetor}!utzoo!henry

ejp@ausmelb.oz (Esmond Pitt) (06/01/88)

In article <3327@phri.UUCP> roy@phri.UUCP (Roy Smith) writes:
> 	I was going to say "you mean like TENEX instead of OS-TEN, or Unix
> instead of RSTS
> 	... can anybody think of any
> "third-party" OSs which replaced the vendor-suplied OS on a given machine to
> any significant extent?

As a matter of fact, RSTS was originally a third-party operating system
itself. It was written by a firm called Evans, Griffiths and Hart (one
version) or a university (another version) and in either case DEC
bought the system and the personnel.


-- 
Esmond Pitt, Austec International Ltd
...!uunet.UU.NET!munnari!ausmelb!ejp,ejp@ausmelb.oz

aglew@urbsdc.Urbana.Gould.COM (06/01/88)

>I also would like to see hardware manufacturers make it IMPOSSIBLE
>for operating system writers to prevent use of IO, all instructions,
>etc, by ALL programs. I find it frustrating to find many otherwise
>lovely computers rendered useless to me by an operating system which
>prevents me from writing programs the way I like. How hard would it
>be to have a jumper on the CPU board that would circumvent the bits
>in the PSW that prevent user-mode programs from doing IO and taking
>interrupts?
>
>Doug McDonald

Back into advertising mode, sorry.

Gould UTX supports something called "hardware privilige mode",
so that user programs can do anything the hardware can - and
still enjoy the convenience of UNIX system calls, etc. 
I've been using it for performance measurement programs.


Andy "Krazy" Glew. Gould CSD-Urbana.    1101 E. University, Urbana, IL 61801   
    aglew@gould.com     	- preferred, if you have MX records
    aglew@xenurus.gould.com     - if you don't
    ...!ihnp4!uiucuxc!ccvaxa!aglew  - paths may still be the only way
   
My opinions are my own, and are not the opinions of my employer, or any
other organisation. I indicate my company only so that the reader may
account for any possible bias I may have towards our products.

roy@phri.UUCP (06/02/88)

In article <23004@bu-cs.BU.EDU> bzs@bu-cs.BU.EDU (Barry Shein) writes:
> Depending on exactly where you start counting from Unix is getting
> close to 20 years old

	More amazing is that troff (if you count its roots back to the old
RUNOFF programs on TOPS-10) is probably even older than that.  Hardware and
Operating Systems may come and go but cranky old applications are here
forever.
-- 
Roy Smith, System Administrator
Public Health Research Institute
455 First Avenue, New York, NY 10016
{allegra,philabs,cmcl2,rutgers}!phri!roy -or- phri!roy@uunet.uu.net

wcs@skep2.ATT.COM (Bill.Stewart.<ho95c>) (06/02/88)

In article <3327@phri.UUCP> roy@phri.UUCP (Roy Smith) writes:
:	Anybody gotten fed up with SunOS and tried writing their own
:operating system for a Sun?
	I think the AT&T Bell Labs Research 9th Edition (V9) has been
ported to Suns.
-- 
#				Thanks;
# Bill Stewart, AT&T Bell Labs 2G218, Holmdel NJ 1-201-949-0705 ihnp4!ho95c!wcs
# skep2 is a local machine I'm trying to turn into a server.  Please send
# mail to ho95c or ho95e instead.  Thanks.

hwe@beta.UUCP (Skip Egdorf) (06/04/88)

In article <3330@phri.UUCP>, roy@phri.UUCP (Roy Smith) writes:
> In article <23004@bu-cs.BU.EDU> bzs@bu-cs.BU.EDU (Barry Shein) writes:
> > Depending on exactly where you start counting from Unix is getting
> > close to 20 years old
> 
> 	More amazing is that troff (if you count its roots back to the old
> RUNOFF programs on TOPS-10) is probably even older than that.

Actually, TOPS-10 RUNOFF and Unix's ROFF are both siblings on the family
tree of the MIT roff program by J. Saltzer.
Roff was the stylistic insperation for troff which was followed by
nroff (for preview of troff on 'N'ormal terminals).

Also of like age is vi / ex / ed / qed ... back to where early
teco split from the same family, leading to ITS teco, leading
to emacs...
They are all related to some extent. Perhaps someday enough of this
folklore will be lost to where computer anthropologists (You don't think
they are alive??) will be holding learned conferances about
troff Robustus and ed Habilis and the relationship between the two.

This is getting a bit away from 'arch'itecture and I would like to draw
it back a bit. Some reading this might think that the history of our field
is not of particular interest. I disagree, and would recommend that
at least at the master's level (if not the undergrad), a history
of computers course would be useful. I don't mean just the big
historical systems read about in an OS or computer architecture
course, but a more 'history' like class including the economics
and internal political struggles of the industry.
I wonder how many of the undergrads drooling over the power of
SunOS 4.0's mmap() recognize Multics in the shadows?

					Skip Egdorf
					hwe@lanl.gov

johnl@ima.ISC.COM (John R. Levine) (06/05/88)

In article <3330@phri.UUCP> roy@phri.UUCP (Roy Smith) writes:
>In article <23004@bu-cs.BU.EDU> bzs@bu-cs.BU.EDU (Barry Shein) writes:
>> Depending on exactly where you start counting from Unix is getting
>> close to 20 years old
>
>	More amazing is that troff (if you count its roots back to the old
>RUNOFF programs on TOPS-10) is probably even older than that.  ...

Both troff and RUNOFF are descendants of the runoff program for CTSS, which
makes them 25 years old, at least.  The ctss typset editor seems to finally
be dying out.  (If your line-at-a-time editor has input and edit modes,
toggles between them with a blank line, and has mode prompts like INPUT:
and EDIT:, that's typset.)
-- 
John R. Levine, IECC, PO Box 349, Cambridge MA 02238-0349, +1 617 492 3869
{ ihnp4 | decvax | cbosgd | harvard | yale }!ima!johnl, Levine@YALE.something
Rome fell, Babylon fell, Scarsdale will have its turn.  -G. B. Shaw

rogerk@mips.COM (Roger B.A. Klorese) (06/06/88)

In article <23002@bu-cs.BU.EDU> bzs@bu-cs.BU.EDU (Barry Shein) writes:
>I'm sure I'm forgetting dozens I've run into...

Add DTSS (Dartmouth Time-Sharing System) and its descendant, DCTS (Dartmouth
College Time-Sharing), on Honeywell (and earlier, GE) systems.
-- 
Roger B.A. Klorese                           MIPS Computer Systems, Inc.
{ames,decwrl,prls,pyramid}!mips!rogerk  25 Burlington Mall Rd, Suite 300
rogerk@mips.COM                                     Burlington, MA 01803
I don't think we're in toto any more, Kansas...          +1 617 270-0613