[TUHS] Unix & Memory Management Units (MMU)

Paul Ruizendaal pnr at planet.nl
Thu Dec 8 18:50:41 AEST 2016


>> DEC's Custom Special Systems (CSS) group .. build a simple base/limi
>> register device, soon after the 11/20 was released.> ... So an early
>> version of after the original 11/20 port from the PDP-7 had this
>> however.....
> 
> Oh, right, I'd forgotten about that: the KS-11 - I've previously enquired to
> see if anyone had _any_ documentation for this, but so far, nada.

I was looking for that a few years back. Dennis Ritchie's home pages have
some info on this (https://www.bell-labs.com/usr/dmr/www/odd.html).
At the bottom of that page he writes:

""Back around 1970-71, Unix on the PDP-11/20 ran on hardware that not only did not support virtual memory, but didn't support any kind of hardware memory mapping or protection, for example against writing over the kernel. This was a pain, because we were using the machine for multiple users. When anyone was working on a program, it was considered a courtesy to yell "A.OUT?" before trying it, to warn others to save whatever they were editing.
[..snip..]
We knew the PDP-11/45, which did support memory mapping and protection for the kernel and other processes, was coming, but not instantly; in anticipation, we arranged with Digital Special Systems to buy a PDP-11/20 with KS-11 add-on. This was an extra system unit bolted to the processor that made it distinguish kernel from user mode, and provided a classical PDP-10 style "hi-seg" "low-seg" memory mapping unit. I seem to recall that maybe 6 of these had been made when we ordered it.""

My hypothesis is that the very first versions of Unix were using a memory scheme similar to that used in the later LSX and MX derivatives: the kernel resides in lower memory and the user program in upper memory; each process switch implied a swap. Disclaimer: I have not studied the V0 source to verify this hypothesis.

When this topic had my interest I looked for (but did not find) information on what ""the classical PDP-10 style "hi-seg" "low-seg" memory mapping unit"" was. Here my hypothesis would be that in kernel mode mapping was off, and that in user mode there were two segments, each with a base and limit into physical memory -- and that this setup has an echo in how the later KL-11 MMU was used.

Does anyone have an idea what PDP-10 MMU Dennis may have been referring to?

> (the early 'versions' weren't very formal, there was a continuous process of
> change/improvement going on, apparently).
Can't find the reference now, but it is my understanding that this remained the case throughout. The outside world had editions, but inside Bell Labs it was a continuous process. 

>> I believe that this is when "magic
>> numbers" were really introduced so that could be supported.
My understanding is that the first magic number (0407) was present in the earliest PDP11 versions. Apparently, executables were loaded into memory including the header, and control jumped to the first word loaded. This first word then contained a "jmp $+8" to jump over the header. It stayed as a relic until reused to distinguish between regular and pure text binaries. Here, too, I must admit that I have not scrutinized the V0 source to find support for this understanding.

Paul






More information about the TUHS mailing list