On Segments and Pages
The PDP-11 MMU divides the 16-bit address space into 8 thingies, each
with a size of 8 kBytes. In very early documentation, most notably the
"pdp11/45 processor handbook" from 1971, this object was called Segment.
The MMU was called Memory Segmentation Unit, and the registers
DEC quickly changed the wording, and already the 1973 edition of the
pdp11/45 processor handbook
uses the term Page and emphasizes the concept of virtual memory
Consequently, the registers are now named
The MMU status registers were named
In later documentation, these registers were eventually referred to as
These name changes left their mark on the software. In 2.11BSD, the MMU
status registers are for example still named
I had the 1971 edition of the "pdp11/45 processor handbook" as a steady
companion on my table in the early phases of the w11 project.
But of course I also consulted many other documents.
Unfortunately, this led to a mixed language, such as the use of
ssr1 together with
pdr in quite a few places.
Johnny Billquist discovered my sloppy mixed language in the context of the
"Mysteries of MMR1" discussion and convinced me to get this
cleaned up, in my mind and in the whole w11 code base.
Quite a few commits were the result of this:
But why did DEC change the naming in the first place ? I can only
speculate. The MMU thingies have an individually configurable length,
which is a key feature in memory segmentation systems, and is unheard of
for memory paging systems. That might have led to the initial wording.
On the other hand, the MMU divides the address space into equal-sized objects
that are selected via the upper part of the address.
That's exactly how memory paging systems are built.
And the MMU provides in
the information needed to re-execute an aborted instruction, also
an essential feature of memory paging systems.
This is used in 2.11BSD to implement automatic stack extension.
The official terminology has another advantage:
- page: is used for the hardware objects controlled by the MMU
- segment: is used for software objects managed by the operating systems, such as text, data and stack in 2.11BSD. These segments have variable lengths, and can span more than one page.