[comp.arch] 8086 Unix, was Re: FSF

johnl@ima.UUCP (09/19/87)

In article <2748@eecae.UUCP> lawitzke@eecae.ee.msu.edu (John Lawitzke) writes:
>> Hmm...seems to me that you could implement fork() on an 8086, if you
>> used a small memory model and programs cooperated (didn't play with
>> the segment registers).  ...
>However, the PDP11 (I used the 11/23) has a memory management chip
>that chops memory into 8K pages. With the 8086 you'd have to figure 
>out how keep one area of memory system writable only and in this area
>keep track of used segments. Of course then you have 64K pages.......
>Also, how could you force users not to write to segment registers?

PC/IX and perhaps other 8086 versions of Unix use segment register munging
to implement a quite workable Unix environment, one in which you can run
pretty much anything that runs on a PDP-11, since the address spaces are
the same size and 8086 code tends to be a little smaller than PDP-11 code.
The way you force users not to write to segment registers is to tell them
"If your programs futz with segment registers, your PC will probably hang
so don't do it."  Ditto for turning off interrupts, random I/O instructions,
etc.  PC/IX actually has conventions for changing the ES or DS to point to
the screen page for fast screen update, but in general programs never change
their segment registers, largely because the C compiler won't generate code
that does so.

In practice PC/IX systems seem to be reliable if sluggish.  Even when
debugging, I rarely had bugs that made the machine hang.  It got more
oomph out of a PC XT than I thought was there.  On a PC AT it's pretty
zippy, about the same as a VAX 750 for programs that fit.
-- 
John R. Levine, Cambridge MA, +1 617 492 3869
{ ihnp4 | decvax | cbosgd | harvard | yale }!ima!johnl, Levine@YALE.something
The Iran-Contra affair:  None of this would have happened if Ronald Reagan
were still alive.