Path: utzoo!mnetor!uunet!husc6!bloom-beacon!mit-eddie!uw-beaver!teknowledge-vaxc!sri-unix!quintus!ok
From: ok@quintus.UUCP (Richard A. O'Keefe)
Newsgroups: comp.arch
Subject: Re: Is the Intel memory model safe from NO-ONE ?!?
Message-ID: <953@cresswell.quintus.UUCP>
Date: 9 May 88 10:30:36 GMT
References: <1806@obiwan.mips.COM> <2904@omepd> <353@cf-cm.UUCP> <22830abd:a11@snark.UUCP>
Organization: Quintus Computer Systems, Mountain View, CA
Lines: 47

In article <22830abd:a11@snark.UUCP>, eric@snark.UUCP (Eric S. Raymond) writes:
> In article <2411@louie.udel.EDU>, rminnich@udel.EDU (Ron Minnich) writes:
> >    But having used segmented machines (done right, at Burroughs) and
> > non-segmented machines, i can say that i trust programs running
> > on segmented machines a whole lot more. And I trust C programs
> > running on non-segmented machines not-a-whit- just ask anybody
> > who knows about NULL pointers.
> 
> Waaaait a second, here. It sounds to me like two very different issues are
> being confused. Let's have some definitions:
> 
>      Segmented architecture -- one in which the register width is not
>          sufficient to address all of memory, so that full addresses must
>          be base/offset or segment-descriptor/address pairs.
> 
>      Memory protection -- the ability to enforce memory addressing restrictions
>          on execution threads so that references outside a 'legal' region are
>          detected and trapped (in UNIX terms, raise a SIGSEGV).
> 
I don't see what segmented addressing has to do with register width.
On the Burroughs machines, "registers" (well, there are some top-of-stack
registers) that hold descriptors are much wider than physical memory
addresses, and the virtual address space is a tree which doesn't have any
well defined upper bound on its size.

"Segments" on the Burroughs machines are like "objects" in SmallTalk,
and the original memory management scheme on those machines was not
unlike object swapping.  There is no such thing as a virtual address
as such, you can only talk about a location within an object.  Since
segments usually correspond to logical entities (such as files,
arrays, procedures, &c) this means that wild addressing out of an
array is simply impossible.  On a Burroughs system, separate processes
can share objects (arrays, open files, &c) without having to share
intervals of their address space, worrying about page boundaries &c.

"Segments" in the 8086 are indeed a kludge to buy you 20-bit addressing
on a 16-bit machine.  Just because two segment registers hold different
values doesn't mean that you can't address the same location through them.

Segment registers on the 80386 can be used for either purpose, depending
on the operating system, but there really aren't enough segment numbers
to do much in the way of segments as objects, and system V/386 simply
ignores them.

The problem isn't 16-bit or 32-bit or N-bit address spaces,
it's the assumption that an address space is a one-dimensional array.
Viva tree-structured address spaces!