Difference between pages "User:Jnc" and "PDP-11 Memory Management"

From Computer History Wiki
(Difference between pages)
Jump to: navigation, search
m (Pages I have added: +1)
 
(PARs and PDRs: Add PDR details)
 
Line 1: Line 1:
Although I have a wide interest in older computers, I worked with [[PDP-11]]'s very extensively 'back in the day', and consider them perhaps the most elegant architecture ever devised (the power and flexibility they obtained with only 16-bit wide instructions were a revelation when they first appeared), so I have focused on them.
+
[[PDP-11]]s which provide [[memory management]] use a standard '''PDP-11 Memory Management''' architecture. When memory management is enabled, the basic 64 Kbyte [[address space]] of the [[PDP-11 architecture]] is divided into 8 '''segments'''; each segment of the virtual address space can be assigned to any location in physical [[main memory]].
  
For more about me, see my [http://www.chiappa.net/~jnc home page].
+
Each segment can be set to any length between 0 bytes and 8 Kbtes, in 0100 (64.) byte increments. Segments can grow either up from their base address, or down; this is to accomodate PDP-11 [[stack]]s, which typically grow down (from higher addresses to lower).
  
Also, I'm an admin on the Computer History Wiki, so if there are any admin-type tasks you need doing (e.g. deleting a page with a typo in the name; merging edit histories; etc) just drop me a line.
+
The [[Central Processing Unit|CPU]] can be in one of three modes; 'Kernel', 'Supervisor', and 'User'; each has its own separate set of mapping [[register]]s, to provide separate virtual address spaces for each mode.
  
==Prototypes==
+
An additional enhancement is that [[instruction]] and data fetches can be set to go to separate 64 Kbyte address spaces, the so-called '''Split I+D space''' capability; this increases the memory available to the operating system, and each user, to 128 Kbytes.
  
{| class="wikitable"
+
(Since immediate operands and absolute addresses are stored contiguous with their instructions, fetches of them are considered to be instruction fetches, for the purposes of deciding which space to use for them.)
! Table !! Prototype
 
|-
 
| colspan="2" style="text-align:center;" | Headers
 
|-
 
| aa || bb
 
|-
 
| yy || zz
 
|}
 
  
'''xxx''' might refer to:
+
If any instruction causes a fault (i.e. an attempt to perform a memory operation which cannot be completed, because of the settings of the memory management - e.g. an attempt to write into a segment set as 'read only'), execution of the instruction is aborted, and a memory management [[trap]] occurs.
  
{disambiguation}}
+
===Simplified subset===
  
==Useful links==
+
A number of the smaller PDP-11's (notably the [[PDP-11/40]], [[PDP-11/34]], [[PDP-11/23]] and [[PDP-11/24]]) provide only a limited subset of the standard memory management facilities. In these machines, there is no support for Split I+D, and no Supervisor mode (just Kernel and User).
  
* [http://gunkies.org/w/index.php?title=Special:ListUsers&dir=prev&username=&group=&creationSort=1 New users]
+
Also, there is no SSR1 register (below), which can make re-starting instructions which cause a fault laborious (the fault-handling code has to decipher the instruction and effectively simulate its operation, to work out which registers need to be 'backed out'), and in some cases impossible (e.g. instructions which auto-increment the same register several times).
* [[Computer History Wiki:News]]
 
* [[Template:Infobox Machine]]
 
* [[Template:Infobox OS]]
 
* [[Template:Infobox Disk drive]]
 
  
==Pages I have added==
+
==Registers==
  
<!-- <small> -->
+
The memory management is entirely controlled by groups of registers in the CPU (unlike many virtual memory systems, which use page tables held in main memory, and cached in the CPU).
[[Architecture]]
 
- [[Program]]
 
- [[Programmer]]
 
- [[Protocol]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
===Control===
[[Binary]]
 
- [[Gray code]]
 
- [[Floating point]]
 
- [[Frequency Modulation‎]]
 
- [[Modified Frequency Modulation‎]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
There are four registers which control the overall operation of the Memory Management Unit:
[[Electron]]
 
- [[Current]]
 
- [[Voltage]]
 
- [[Resistor]]
 
- [[Semiconductor]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
{| class="wikitable"
[[Meta-stability]]
+
! Address !! Name !! Function
- [[Synchronizer]]
+
|-
- [[Arbiter]]
+
| 777572 || SSR0 || Control and status
<!-- </small> -->
+
|-
 +
| 777574 || SSR1 || Register increment/descrement record
 +
|-
 +
| 777576 || SSR2 || Virtual address associated with the fault (usually the instruction address)
 +
|-
 +
| 777516 || SSR3 || D-space enable/disable (per mode)
 +
|}
  
<!-- <small> -->
+
SSR0 contains control bits (e.g. enabling memory management) and status bits (e.g. information about memory operations which caused a memory management fault, and the segment involved).
[[Vacuum tube]]
 
- [[Diode]]
 
- [[Transistor]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
SSR1 contains information about register modifications performed during the course of an instruction, to allow those modifications to be 'backed out' if the instruction needs to be restarted after a memory management fault.
[[Transistor–transistor logic‎]]
 
- [[Metal Oxide Semiconductor]]
 
- [[Integrated circuit]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
SSR2 contains the address of the instruction which caused the memory management fault.
[[Central Processing Unit]]
 
- [[Instruction]]
 
- [[Memory management‎]]
 
- [[Main memory]]
 
- [[Secondary storage]]
 
- [[Load-store architecture]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
SSR3 contains bits to enable Split I+D in the three modes; on machines which have [[UNIBUS map]]s, the enable for it is also here.
[[Arithmetic-logic unit‎]]
 
- [[Register]]
 
- [[Microcode]]
 
- [[First-In First-Out buffer]]
 
- [[Cache]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
===PARs and PDRs===
[[Program Counter]]
 
- [[Processor Status Word]]
 
- [[Condition codes]]
 
- [[Conditional branch]]
 
- [[Base and bounds]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
Each segment (up to 48 in total; 8 each Instruction and Data, for the three different modes) is described by a pair of registers, a Page Descriptor Register (PDR) and a Page Address Register (PAR).
[[Object code]]
 
- [[Relocatable binary]]
 
- [[Virtual address]]
 
- [[Virtual memory]]
 
- [[Single-level store]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
The PAR contains the base physical address for the segment (in units of 0100/64. bytes). On machines which have only [[UNIBUS]] memory (e.g. PDP-11/40, [[PDP-11/45]], etc) these registers are 12 bits long, since the maximum amount of physical memory on these machines is 248 Kbytes. On machines which support up to 4 MBytes of physical memory (e.g. [[PDP-11/70]], [[PDP-11/44]], PDP-11/23, etc), they are 16 bits long.
[[Stack]]
 
- [[Stack Pointer]]
 
- [[Loop]]
 
- [[Subroutine]]
 
- [[Control flow]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
The PDR contains the segment's length, along with the direction of growth, the access control field (read/only, read/write, etc), a 'dirty' bit (maintained by the hardware), etc. The layout of the PDR is:
[[Reduced Instruction Set Computer]]
 
- [[Complex Instruction Set Computer]]
 
- [[IBM-compatible PC]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
{{16bit-header}}
[[Mainframe]]
+
| Unused || colspan=7 | Length || Trapped || Written || colspan=2 | Unused || Direction || colspan=3 | Access Control
- [[Minicomputer]]
+
{{16bit-bitout}}
- [[Personal computer]]
 
- [[Microprocessor]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
The values of the 'Access Control' field are:
[[Bootstrap]]
+
{| class="wikitable"
- [[Simulator]]
+
! Value !! Mode
- [[Emulator]]
+
|-
<!-- </small> -->
+
| 0 || Non-resident - abort all accesses
 +
|-
 +
| 1 || Read-only watched - abort on write, trap on read
 +
|-
 +
| 2 || Read-only - abort on write
 +
|-
 +
| 3 || Unused, reserved - abort all accesses
 +
|-
 +
| 4 || Read/write all watched - trap on read or write
 +
|-
 +
| 5 || Read/write watched - trap on write
 +
|-
 +
| 6 || Read/write - none
 +
|-
 +
| 7 || Unused, reserved - abort all accesses
 +
|}
  
<!-- <small> -->
+
The addresses of the PAR/PDR sets are:
[[Programming language]]
 
- [[Source code]]
 
- [[Macro]]
 
- [[Assembly language]]
 
- [[Compiler]]
 
- [[Cross-compiler]]
 
- [[Interpreter]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
{| class="wikitable"
[[Stack frame]]
+
! Address !! Name !! Function
- [[Call stack]]
+
|-
- [[Local variable]]
+
| 772200 || SISD0 || Supervisor I-Space PDR #0
- [[Exception]]
+
|-
- [[Condition handler]]
+
| colspan="2" style="text-align:center;" | ...
- [[Unwind]]
+
|-
<!-- </small> -->
+
| 772216 || SISD7 || Supervisor I-Space PDR #7
 
+
|-
<!-- <small> -->
+
| 772220 || SDSD0 || Supervisor D-Space PDR #0
[[Batch]]
+
|-
- [[Multitasking]]
+
| colspan="2" style="text-align:center;" | ...
- [[Process]]
+
|-
- [[Virtual machine]]
+
| 772236 || SDSD7 || Supervisor D-Space PDR #7
- [[Time-sharing]]
+
|-
- [[Real-time system]]
+
| 772240 || SISA0 || Supervisor I-Space PAR #0
<!-- </small> -->
+
|-
 
+
| colspan="2" style="text-align:center;" | ...
<!-- <small> -->
+
|-
[[File]]
+
| 772256 || SISA7 || Supervisor I-Space PAR #7
- [[File system]]
+
|-
- [[Command processor]]
+
| 772260 || SDSA0 || Supervisor D-Space PAR #0
- [[DOS]]
+
|-
<!-- </small> -->
+
| colspan="2" style="text-align:center;" | ...
 
+
|-
<!-- <small> -->
+
| 772276 || SDSA7 || Supervisor D-Space PAR #7
[[Interrupt]]
+
|-
- [[Direct Memory Access]]
+
| 772300 || KISD0 || Kernel I-Space PDR #0
- [[Programmed I/O]]
+
|-
- [[Trap]]
+
| colspan="2" style="text-align:center;" | ...
<!-- </small> -->
+
|-
 
+
| 772316 || KISD7 || Kernel I-Space PDR #7
<!-- <small> -->
+
|-
[[Paper tape]]
+
| 772320 || KDSD0 || Kernel D-Space PDR #0
<!-- </small> -->
+
|-
 
+
| colspan="2" style="text-align:center;" | ...
<!-- <small> -->
+
|-
[[Magnetic storage]]
+
| 772336 || KDSD7 || Kernel D-Space PDR #7
- [[Head]]
+
|-
- [[Magnetic tape]]
+
| 772340 || KISA0 || Kernel I-Space PAR #0
- [[Drum]]
+
|-
- [[Disk]]
+
| colspan="2" style="text-align:center;" | ...
- [[Fixed-head disk‎]]
+
|-
<!-- </small> -->
+
| 772356 || KISA7 || Kernel I-Space PAR #7
 
+
|-
<!-- <small> -->
+
| 772360 || KDSA0 || Kernel D-Space PAR #0
[[Core memory]]
+
|-
- [[Dynamic RAM]]
+
| colspan="2" style="text-align:center;" | ...
<!-- </small> -->
+
|-
 
+
| 772376 || KDSA7 || Kernel D-Space PAR #7
<!-- <small> -->
+
|-
[[Modem]]
+
| 777600 || UISD0 || User I-Space PDR #0
- [[Serial line]]
+
|-
- [[Asynchronous serial line]]
+
| colspan="2" style="text-align:center;" | ...
- [[Synchronous serial line]]
+
|-
- [[20mA current loop serial line interface]]
+
| 777616 || UISD7 || User I-Space PDR #7
- [[EIA RS-232 serial line interface]]
+
|-
<!-- </small> -->
+
| 777620 || UDSD0 || User D-Space PDR #0
 
+
|-
<!-- <small> -->
+
| colspan="2" style="text-align:center;" | ...
[[Backplane]]
+
|-
- [[Wire-wrap]]
+
| 777636 || UDSD7 || User D-Space PDR #7
- [[Printed circuit board]]
+
|-
<!-- </small> -->
+
| 777640 || UISA0 || User I-Space PAR #0
 
+
|-
<!-- <small> -->
+
| colspan="2" style="text-align:center;" | ...
[[System Module]]
+
|-
- [[DEC card form factor]]
+
| 777656 || UISA7 || User I-Space PAR #7
- [[System unit]]
+
|-
- [[DEC alphabet]]
+
| 777660 || UDSA0 || User D-Space PAR #0
<!-- </small> -->
+
|-
 
+
| colspan="2" style="text-align:center;" | ...
<!-- <small> -->
+
|-
[[H960 rack]]
+
| 777676 || UDSA7 || User D-Space PAR #7
- [[BA11 mounting boxes]]
+
|}
- [[BA11 mounting box]]
 
- [[BA11-K mounting box]]
 
- [[BA11-L mounting box]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[DECtape]]
 
- [[LINC tape]]
 
- [[DEC indicator panel]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[LINC]]
 
- [[LINC-8]]
 
- [[PDP-9]]
 
- [[PDP-12]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[PDP-6]]
 
- [[KA10]]
 
- [[KI10]]
 
- [[KL10]]
 
- [[KS10]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[PDP-15]]
 
- [[UNICHANNEL 15 System]]
 
- [[MX15-B Memory Multiplexer]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[PDP-11 Memory Management]]
 
- [[UNIBUS map]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[PDP-11 Extended Instruction Set]]
 
- [[FP11 floating point]]
 
- [[FIS floating point]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Bus grant line]]
 
- [[Non-Processor Request]]
 
- [[Upgrading QBUS backplanes]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Small Peripheral Controller]]
 
- [[Modified UNIBUS Device]]
 
- [[Extended UNIBUS]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[CD interconnect]]
 
- [[Private Memory Interconnect]]
 
- [[MASSBUS]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[G727 grant continuity card]]
 
- [[G7273 grant continuity card]]
 
- [[UNIBUS H854 header pinout]]
 
- [[DEC asynchronous serial line pinout]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[KA11 CPU]]
 
- [[KT11-B Paging Option]]
 
- [[KA11 changes for the KT11-B]]
 
- [[KT11-B Technical Manual]]
 
- [[KT11-B Major State circuitry]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[PDP-11/05]]
 
- [[PDP-11/34A]]
 
- [[KD11-E CPU]]
 
- [[KD11-EA CPU]]
 
- [[KY11-LA Operator's Console]]
 
- [[KY11-LB Programmer's Console]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[FP11-A Floating-Point Processor]]
 
- [[FP11-B Floating-Point Processor]]
 
- [[FP11-C Floating-Point Processor]]
 
<!-- </small> -->
 
 
 
<!-- </small> -->
 
[[KK11-A Cache Memory]]
 
- [[MJ11 memory system]]
 
- [[MK11 memory system]]
 
<!-- <small> -->
 
 
 
<!-- <small> -->
 
[[LSI-11]]
 
- [[F-11 chip set]]
 
- [[KTF11-A memory management chip]]
 
- [[KEF11-A floating point chip]]
 
- [[KDF11 CPUs]]
 
- [[KDF11-U CPU]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[FPJ11 floating point accelerator]]
 
- [[KDJ11 CPUs]]
 
- [[KDJ11-B CPU]]
 
- [[KDJ11-E CPU]]
 
- [[KTJ11-B UNIBUS adapter]]
 
- [[PDP-11/83]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[UNIBUS memories]]
 
- [[MM11-D core memory]]
 
- [[MM11-L core memory]]
 
- [[MM11-U core memory]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[QBUS memories]]
 
- [[CMV-504|CMV-[25]xx]]
 
- [[CMV-4000|CMV-[14]000]]
 
- [[MK8022]]
 
- [[National Semiconductor NS23M]]
 
- [[National Semiconductor NS23C]]
 
- [[Q-RAM 11]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[UNIBUS boot ROMs]]
 
- [[BM792 ROM]]
 
- [[BM873 ROM]]
 
- [[M9301 ROM]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[QBUS boot ROMs]]
 
- [[BDV11 Bus Terminator/ROM‎]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[RK11-C disk controller]]
 
- [[RP11 disk controller]]
 
- [[RL11 disk controller]]
 
- [[RH11 MASSBUS controller]]
 
- [[RH70 MASSBUS controller]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[RK02 disk drive]]
 
- [[RP02 disk drive]]
 
- [[RP03 disk drive]]
 
- [[RP04 disk drive]]
 
- [[RX0x floppy drive]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[TC11 DECtape controller]]
 
- [[TM11 magtape controller]]
 
- [[TM02 magtape controller]]
 
- [[TM03 magtape controller]]
 
- [[TU16]]
 
- [[TE16]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[DR11 parallel interface]]
 
- [[DR11-B parallel interface]]
 
- [[DL11 asynchronous serial line interface]]
 
- [[DH11 asynchronous serial line interface]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[IBM 709]]
 
- [[IBM 7090]]
 
- [[IBM 7094]]
 
-[[Honeywell 6000 series‎‎]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Intel 8085]]
 
- [[Motorola M68000 Family]]
 
- [[Motorola MC68000]]
 
- [[MIPS]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[IBM PC‎]]
 
- [[IBM-compatible PC]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Ersatz-11]]
 
- [[Bochs]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Compatible Time-Sharing System]]
 
- [[TOPS-10]]
 
- [[TENEX]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[2.10BSD]]
 
- [[2.11BSD]]
 
- [[UNIX file system]]
 
- [[BSD Fast File System]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Installing UNIX Sixth Edition]]
 
- [[Installing UNIX Sixth Edition on Ersatz-11]]
 
- [[Running an LSI-11 from Unix V6]]
 
- [[Installing UNIX Seventh Edition]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[ALGOL]]
 
- [[BCPL]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Internet]]
 
- [[Request for Comments]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Vonada's Engineering Maxims]]
 
- [[Engineering Change Order]]
 
- [[Bitsavers]]
 
<!-- </small> -->
 
 
 
==Pages I have substantially upgraded==
 
 
 
<!-- <small> -->
 
[[Operating system]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Ethernet]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Digital Equipment Corporation]]
 
- [[International Business Machines]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[FLIP CHIP]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[PDP-10]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[PDP-11 architecture]]
 
- [[UNIBUS]]
 
- [[QBUS]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[PDP-11/04]]
 
- [[PDP-11/10]]
 
- [[PDP-11/24]]
 
- [[PDP-11/34]]
 
- [[PDP-11/45]]
 
- [[PDP-11/70]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[KDF11-A CPU]]
 
- [[KDF11-B CPU]]
 
- [[KDJ11-A CPU]]
 
- [[J-11 chip set]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[RK11 disk controller]]
 
- [[RK05 disk drive]]
 
- [[RL01 disk drive]]
 
- [[RL02 disk drive]]
 
- [[RP06 disk drive]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[TU10]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[M7821]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
When split I+D is not enabled in any particular mode, only a single 64 Kbyte address space is provided, using only the I-space registers for that mode.
[[Multics]]
 
- [[Incompatible Timesharing System]]
 
- [[UNIX Sixth Edition]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
{{PDP-11}}
[[FORTRAN]]
 
<!-- </small> -->
 

Revision as of 18:43, 15 December 2017

PDP-11s which provide memory management use a standard PDP-11 Memory Management architecture. When memory management is enabled, the basic 64 Kbyte address space of the PDP-11 architecture is divided into 8 segments; each segment of the virtual address space can be assigned to any location in physical main memory.

Each segment can be set to any length between 0 bytes and 8 Kbtes, in 0100 (64.) byte increments. Segments can grow either up from their base address, or down; this is to accomodate PDP-11 stacks, which typically grow down (from higher addresses to lower).

The CPU can be in one of three modes; 'Kernel', 'Supervisor', and 'User'; each has its own separate set of mapping registers, to provide separate virtual address spaces for each mode.

An additional enhancement is that instruction and data fetches can be set to go to separate 64 Kbyte address spaces, the so-called Split I+D space capability; this increases the memory available to the operating system, and each user, to 128 Kbytes.

(Since immediate operands and absolute addresses are stored contiguous with their instructions, fetches of them are considered to be instruction fetches, for the purposes of deciding which space to use for them.)

If any instruction causes a fault (i.e. an attempt to perform a memory operation which cannot be completed, because of the settings of the memory management - e.g. an attempt to write into a segment set as 'read only'), execution of the instruction is aborted, and a memory management trap occurs.

Simplified subset

A number of the smaller PDP-11's (notably the PDP-11/40, PDP-11/34, PDP-11/23 and PDP-11/24) provide only a limited subset of the standard memory management facilities. In these machines, there is no support for Split I+D, and no Supervisor mode (just Kernel and User).

Also, there is no SSR1 register (below), which can make re-starting instructions which cause a fault laborious (the fault-handling code has to decipher the instruction and effectively simulate its operation, to work out which registers need to be 'backed out'), and in some cases impossible (e.g. instructions which auto-increment the same register several times).

Registers

The memory management is entirely controlled by groups of registers in the CPU (unlike many virtual memory systems, which use page tables held in main memory, and cached in the CPU).

Control

There are four registers which control the overall operation of the Memory Management Unit:

Address Name Function
777572 SSR0 Control and status
777574 SSR1 Register increment/descrement record
777576 SSR2 Virtual address associated with the fault (usually the instruction address)
777516 SSR3 D-space enable/disable (per mode)

SSR0 contains control bits (e.g. enabling memory management) and status bits (e.g. information about memory operations which caused a memory management fault, and the segment involved).

SSR1 contains information about register modifications performed during the course of an instruction, to allow those modifications to be 'backed out' if the instruction needs to be restarted after a memory management fault.

SSR2 contains the address of the instruction which caused the memory management fault.

SSR3 contains bits to enable Split I+D in the three modes; on machines which have UNIBUS maps, the enable for it is also here.

PARs and PDRs

Each segment (up to 48 in total; 8 each Instruction and Data, for the three different modes) is described by a pair of registers, a Page Descriptor Register (PDR) and a Page Address Register (PAR).

The PAR contains the base physical address for the segment (in units of 0100/64. bytes). On machines which have only UNIBUS memory (e.g. PDP-11/40, PDP-11/45, etc) these registers are 12 bits long, since the maximum amount of physical memory on these machines is 248 Kbytes. On machines which support up to 4 MBytes of physical memory (e.g. PDP-11/70, PDP-11/44, PDP-11/23, etc), they are 16 bits long.

The PDR contains the segment's length, along with the direction of growth, the access control field (read/only, read/write, etc), a 'dirty' bit (maintained by the hardware), etc. The layout of the PDR is:


Unused Length Trapped Written Unused Direction Access Control
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00

The values of the 'Access Control' field are:

Value Mode
0 Non-resident - abort all accesses
1 Read-only watched - abort on write, trap on read
2 Read-only - abort on write
3 Unused, reserved - abort all accesses
4 Read/write all watched - trap on read or write
5 Read/write watched - trap on write
6 Read/write - none
7 Unused, reserved - abort all accesses

The addresses of the PAR/PDR sets are:

Address Name Function
772200 SISD0 Supervisor I-Space PDR #0
...
772216 SISD7 Supervisor I-Space PDR #7
772220 SDSD0 Supervisor D-Space PDR #0
...
772236 SDSD7 Supervisor D-Space PDR #7
772240 SISA0 Supervisor I-Space PAR #0
...
772256 SISA7 Supervisor I-Space PAR #7
772260 SDSA0 Supervisor D-Space PAR #0
...
772276 SDSA7 Supervisor D-Space PAR #7
772300 KISD0 Kernel I-Space PDR #0
...
772316 KISD7 Kernel I-Space PDR #7
772320 KDSD0 Kernel D-Space PDR #0
...
772336 KDSD7 Kernel D-Space PDR #7
772340 KISA0 Kernel I-Space PAR #0
...
772356 KISA7 Kernel I-Space PAR #7
772360 KDSA0 Kernel D-Space PAR #0
...
772376 KDSA7 Kernel D-Space PAR #7
777600 UISD0 User I-Space PDR #0
...
777616 UISD7 User I-Space PDR #7
777620 UDSD0 User D-Space PDR #0
...
777636 UDSD7 User D-Space PDR #7
777640 UISA0 User I-Space PAR #0
...
777656 UISA7 User I-Space PAR #7
777660 UDSA0 User D-Space PAR #0
...
777676 UDSA7 User D-Space PAR #7

When split I+D is not enabled in any particular mode, only a single 64 Kbyte address space is provided, using only the I-space registers for that mode.