Subject: RE: PDP-11 thoughts
To: Johnny Billquist <bqt@Update.UU.SE>
From: P.G. <pgaray@bigfoot.com>
List: port-vax
Date: 11/15/2000 21:04:08
On Wed, 15 Nov 2000, Johnny Billquist wrote:
> And you can do this without supervisor mode as well. Yuo can just as well
> remap your address space to different parts of the memory as required.
> Since you know RSX, the way you do it easiest there is to have memory
> resident overlays. What happens is that the MMU will map different parts
> of the memory into your 32kword space depending on what routine you
> called. But you can do it by hand as well if you want to. The limit is how
> much physical memory you have. But that don't change the limit of 32kword
> address range. You're just manipulating the MMU mapping.
Well, setting up overlays was a major pain and the longest branch of the
overlay had to fit in 32Kwords. (as you went down the call tree, you could not
remove the top, to free space). Supervisor libraries could add to that, as
those things that were in supervisor space were on top of the 32Kword. So it
was good for something. In theory, that could have been done by a kernel call
- much slower. And total amount of memory used up an by overlayed program was
more than it was this way (many lower level functions were included several
times in various overlay branches.)
>
> > This probably was not an option for kernel developers (I think you can not
> call
> > to supervisor mode from kernel mode), but I am not sure about that.
>
> Two points:
> 1) In kernel mode you can do anything you want.
Like crash the machine :-) If you say you can set the MMU up the way you
like, yes. But you only have 8 "regions" so you can not use this to make up
for the missing address - setting up these kind of overlays as the code grew
was a bigger task than writing the code itself.
> 2) Why changer to supervisor when you can do the same thing *in* kernel
> mode. Just remap the MMU as you see fit in the kernel. RSX do it all
> the time. Or did you think that the whole kernel fits within 20Kword?
extra registers can in general be replaced with memory and extra code. The
kernel had its own space so there was no gain maping out and keeping in
memory parts of it if the total was under 32K. RSTS could have parts of the
kernel on disk, I do not recall RSX11M+, RSX-11 (versions???) were memory
resident.
>
> One might ask why the supervisor mode even exist. The only point really is
on PDP I do not recall the supervisor mode used for anything else. On the VAX
it is extensively used by the CLI and debugger on VMS. In theory, that can be
done other ways, but then why do we like the PDP11 or VAX instruction set?
Everything can be done with 2 instructions: Branch on bit, flip bit :-)
> that this allows you a fast way to change your mappings, since you don't
> need to reload the MMU registers, and each mode has it's own stack
> pointer.
Correct, it saves times and complexity on overlay design.
> The same functionality could be done without supervisor mode by a system
> call.
on PDP I do not recall the supervisor mode used for anything not mentioned yet.
On the VAX it is extensively used by the CLI and debugger on VMS. When the
alpha was designed it was a design requirement to have the 4 modes identical
to VAX to ease porting VMS