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)
 
(Mention space vectors come from)
 
Line 1: Line 1:
Although I have a wide interest in older computers, I worked with [[PDP-11]]'s ''extremely'' 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 '[[segment]]s' (the terminology used in the first version of the documentation; it was later changed to 'pages', for unknown reasons, but this is incorrrect - the functionality provided is that of segmentation, not [[virtual memory|paging]]). Each segment of a 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 Kbytes, in 0100 (64.) byte increments. Segments can grow either up from their base address, or down; the latter to accomodate PDP-11 [[stack]]s, which typically grow down (from higher addresses to lower).
  
Also, I'm an admin here on the CHWiki, 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.
  
"μ"
+
(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.)
  
'''xxx''' might refer to:
+
[[Trap]] and [[interrupt vector]]s and are fetched from Kernel Data space, when memory management is enabled; this allows bad physical main memory at [[absolute address]] 0 to be bypassed, if it is failing.
  
{disambiguation}}
+
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.
  
==Useful links==
+
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.
  
* [http://gunkies.org/w/index.php?title=Special:ListUsers&dir=prev&username=&group=&creationSort=1 New users]
+
===Simplified subset===
* [[Computer History Wiki:News]]
 
* [[MediaWiki:Sidebar]]
 
* [http://gunkies.org/w/index.php?title=Special%3APrefixIndex&prefix=Jnc&namespace=2 My pages]
 
* [[User:Jnc/ToCat|ToCat]]
 
  
==Pages I have added==
+
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).
  
<!-- <small> -->
+
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' to their state before the instruction started execution), and in some cases impossible (e.g. instructions which auto-increment the same register several times).
[[Architecture]]
 
- [[Hierarchy]]
 
- [[Interface]]
 
- [[Network]]
 
- [[Address]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
==Registers==
[[Electron]]
 
- [[Current]]
 
- [[Voltage]]
 
- [[Conductor]]
 
- [[Insulator]]
 
- [[Ground]]
 
- [[Circuit]]
 
<!-- </small> -->
 
  
<!-- <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).
[[Direct current]]
 
- [[Alternating current]]
 
- [[Frequency]]
 
- [[Single-ended signalling‎]]
 
- [[Differential pair]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
===Control===
[[Resistor]]
 
- [[Capacitor]]
 
- [[Inductor]]
 
- [[Semiconductor]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
There are four registers which control the overall operation of the Memory Management Unit:
[[Electronic]]
 
- [[Vacuum tube]]
 
- [[Diode]]
 
- [[Transistor]]
 
- [[Bipolar]]
 
- [[Metal Oxide Semiconductor]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
{| class="wikitable"
[[Power supply‎]]
+
! Address !! Name !! Function
- [[Analog]]
+
|-
- [[Digital]]
+
| 777572 || SSR0 || Control and status
- [[Hardware]]
+
|-
- [[Gate]]
+
| 777574 || SSR1 || Register increment/descrement record
<!-- </small> -->
+
|-
 +
| 777576 || SSR2 || Virtual address associated with the fault (usually the instruction address)
 +
|-
 +
| 777516 || SSR3 || D-space enable/disable (per mode)
 +
|}
  
<!-- <small> -->
+
On the 'simplified subset' machines, SSR1 and SSR3 are not implemented.
[[Frequency Modulation‎]]
 
- [[Modified Frequency Modulation‎]]
 
- [[Non Return to Zero Inverted]]
 
- [[Run-length limited coding]]
 
<!-- </small> -->
 
  
<!-- <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). The layout of SSR0 is:
[[Synchronous]]
+
{{16bit-header}}
- [[Asynchronous]]
+
| Non-resident || Length || Read-only || Trap || colspan=2 | Unused || Enable Trap || Maintenance || Instruction Completed || colspan=2 | CPU Mode || I/D || colspan=3 | Page || Enable
- [[Meta-stability]]
+
{{16bit-bitout}}
- [[Synchronizer]]
 
- [[Arbiter]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
When any of the first three bits (all error aborts) are set, bits 1-7, as well as SSR1 and SSR2, are frozen. On the 'simplified subset' machines, bits 12, 9, 7 and 4 are not implemented.
[[Transistor-transistor logic‎]]
 
- [[Open collector]]
 
- [[Emitter-coupled logic]]
 
- [[Integrated circuit]]
 
- [[74 series]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
SSR1 contains information about register modifications (given there in [[two's complement]]) 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. Its layout is:
[[Jumper]]
+
{{16bit-header}}
- [[Backplane]]
+
| colspan=5 | Change || colspan=3 | Register || colspan=5 | Change || colspan=3 | Register
- [[Wire-wrap]]
+
{{16bit-bitout}}
- [[Printed circuit board]]
 
- [[Berg connector]]
 
- [[Flat cable]]
 
- [[Over the back‎]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
SSR2 contains the address of the instruction which caused the memory management fault.
[[Input/output]]
 
- [[Software]]
 
- [[Program]]
 
- [[Programmer]]
 
<!-- </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. Its layout is:
[[Bit]]
+
{{16bit-header}}
- [[Byte]]
+
| colspan=10 | Unused || Enable UNIBUS Map || Enable 22-bit || Unused || Kernel || Supervisor || User
- [[Word]]
+
{{16bit-bitout}}
- [[Binary]]
 
- [[Binary-coded decimal]]
 
- [[Floating point]]
 
- [[Character]]
 
- [[ASCII]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
The 'Enable 22-bit' bit only applies on machines which support larger memories, i.e. the [[PDP-11/70]], [[PDP-11/44]], and machines with the [[KDF11 CPUs]] and [[KDJ11 CPUs]].
[[Gray code]]
 
- [[Parity]]
 
- [[Checksum]]
 
- [[Cyclic redundancy check‎]]
 
- [[Error-correcting code]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
===PARs and PDRs===
[[Data path]]
 
- [[Register]]
 
- [[First-In First-Out buffer]]
 
- [[Adder]]
 
- [[Arithmetic-logic unit‎]]
 
<!-- </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).
[[Cycle time]]
 
- [[Pipeline]]
 
- [[Cache]]
 
- [[Multi-port memory]]
 
- [[Microcode]]
 
- [[Firmware]]
 
<!-- </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.
[[Central Processing Unit]]
 
- [[Floating point processor]]
 
- [[Instruction]]
 
- [[Multi-processor]]
 
- [[Main memory]]
 
- [[Peripheral]]
 
- [[Device controller]]
 
- [[Secondary storage]]
 
- [[Drive]]
 
- [[Front end]]
 
<!-- </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:
[[Interrupt]]
 
- [[Direct Memory Access]]
 
- [[Programmed I/O]]
 
- [[Trap]]
 
<!-- </small> -->
 
  
<!-- </small> -->
+
{{16bit-header}}
[[Address space]]
+
| Don't Cache || colspan=7 | Length || Trapped || Written || colspan=2 | Unused || Direction || colspan=3 | Access Control
- [[Segment]]
+
{{16bit-bitout}}
- [[Memory management‎]]
 
- [[Base and bounds]]
 
- [[Swapping]]
 
- [[Virtual address]]
 
- [[Virtual memory]]
 
- [[Single-level store]]
 
<!-- <small> -->
 
  
<!-- <small> -->
+
The values of the 'Access Control' field are:
[[Program Counter]]
+
{| class="wikitable"
- [[Processor Status Word]]
+
! Value !! Mode
- [[Stack Pointer]]
+
|-
- [[Index register]]
+
| 0 || Non-resident - abort all accesses
- [[Condition codes]]
+
|-
<!-- </small> -->
+
| 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> -->
+
On the 'simplified subset' machines, only modes 0, 2 and 6 are supported, and neither is the 'Trapped' bit (set on PDR's for memory references that trapped, on the other machines).
[[Stack]]
 
- [[Conditional branch]]
 
- [[Control flow]]
 
- [[Loop]]
 
- [[Array]]
 
- [[Subroutine]]
 
- [[No-op]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
The 'Don't Cache' bit is only available on the [[KDJ11 CPUs]].
[[Object code]]
 
- [[Relocatable binary]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
The addresses of the PAR/PDR sets are:
[[Commercial Instruction Set]]
 
- [[Load-store architecture]]
 
- [[Reduced Instruction Set Computer]]
 
- [[Complex Instruction Set Computer]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
{| class="wikitable"
[[Bootstrap]]
+
! Address !! Name !! Function
- [[Simulator]]
+
|-
- [[Emulator]]
+
| 772200 || SISD0 || Supervisor I-Space PDR #0
<!-- </small> -->
+
|-
 +
| colspan="2" style="text-align:center;" | ...
 +
|-
 +
| 772216 || SISD7 || Supervisor I-Space PDR #7
 +
|-
 +
| 772220 || SDSD0 || Supervisor D-Space PDR #0
 +
|-
 +
| colspan="2" style="text-align:center;" | ...
 +
|-
 +
| 772236 || SDSD7 || Supervisor D-Space PDR #7
 +
|-
 +
| 772240 || SISA0 || Supervisor I-Space PAR #0
 +
|-
 +
| colspan="2" style="text-align:center;" | ...
 +
|-
 +
| 772256 || SISA7 || Supervisor I-Space PAR #7
 +
|-
 +
| 772260 || SDSA0 || Supervisor D-Space PAR #0
 +
|-
 +
| colspan="2" style="text-align:center;" | ...
 +
|-
 +
| 772276 || SDSA7 || Supervisor D-Space PAR #7
 +
|-
 +
| 772300 || KISD0 || Kernel I-Space PDR #0
 +
|-
 +
| colspan="2" style="text-align:center;" | ...
 +
|-
 +
| 772316 || KISD7 || Kernel I-Space PDR #7
 +
|-
 +
| 772320 || KDSD0 || Kernel D-Space PDR #0
 +
|-
 +
| colspan="2" style="text-align:center;" | ...
 +
|-
 +
| 772336 || KDSD7 || Kernel D-Space PDR #7
 +
|-
 +
| 772340 || KISA0 || Kernel I-Space PAR #0
 +
|-
 +
| colspan="2" style="text-align:center;" | ...
 +
|-
 +
| 772356 || KISA7 || Kernel I-Space PAR #7
 +
|-
 +
| 772360 || KDSA0 || Kernel D-Space PAR #0
 +
|-
 +
| colspan="2" style="text-align:center;" | ...
 +
|-
 +
| 772376 || KDSA7 || Kernel D-Space PAR #7
 +
|-
 +
| 777600 || UISD0 || User I-Space PDR #0
 +
|-
 +
| colspan="2" style="text-align:center;" | ...
 +
|-
 +
| 777616 || UISD7 || User I-Space PDR #7
 +
|-
 +
| 777620 || UDSD0 || User D-Space PDR #0
 +
|-
 +
| colspan="2" style="text-align:center;" | ...
 +
|-
 +
| 777636 || UDSD7 || User D-Space PDR #7
 +
|-
 +
| 777640 || UISA0 || User I-Space PAR #0
 +
|-
 +
| colspan="2" style="text-align:center;" | ...
 +
|-
 +
| 777656 || UISA7 || User I-Space PAR #7
 +
|-
 +
| 777660 || UDSA0 || User D-Space PAR #0
 +
|-
 +
| colspan="2" style="text-align:center;" | ...
 +
|-
 +
| 777676 || UDSA7 || User D-Space PAR #7
 +
|}
  
<!-- <small> -->
+
==See also==
[[Programming language]]
 
- [[Source code]]
 
- [[Macro]]
 
- [[Subroutine package]]
 
- [[Assembly language]]
 
- [[Compiler]]
 
- [[Cross-compiler]]
 
- [[Interpreter]]
 
- [[Portable]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
* [[KT11-B Paging Option]] - DEC experiments with paging
[[Stack frame]]
+
* [[KT11-C Memory Management Unit]] - the arcetype
- [[Call stack]]
 
- [[Local variable]]
 
- [[Exception]]
 
- [[Condition handler]]
 
- [[Unwind]]
 
- [[Library]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
{{PDP-11}}
[[Batch]]
 
- [[Multitasking]]
 
- [[Kernel]]
 
- [[Process]]
 
- [[Virtual machine]]
 
- [[Time-sharing]]
 
- [[Real-time system]]
 
- [[Task]]
 
<!-- </small> -->
 
  
<!-- <small> -->
+
[[Category: PDP-11s]]
[[File]]
 
- [[File system]]
 
- [[Hard link]]
 
- [[Byte stream‎]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[User interface]]
 
- [[Command processor]]
 
- [[Application]]
 
- [[Editor]]
 
- [[Text editor]]
 
- [[Screen editor]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Core memory]]
 
- [[Dynamic RAM]]
 
- [[Refresh]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Punched card]]
 
- [[Paper tape]]
 
- [[Terminal]]
 
- [[Keyboard]]
 
- [[Printing terminal]]
 
- [[Teletype]]
 
- [[Mouse]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Magnetic storage]]
 
- [[Head]]
 
- [[Drum]]
 
- [[Disk]]
 
- [[Fixed-head disk‎]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Magnetic tape]]
 
- [[Magnetic tape drive]]
 
- [[Magnetic tape controller]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Modem]]
 
- [[Serial line]]
 
- [[Asynchronous serial line]]
 
- [[Synchronous serial line]]
 
- [[20mA current loop serial line interface]]
 
- [[EIA RS-232 serial line interface]]
 
- [[EIA RS-422 serial line interface]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Cathode Ray Tube]]
 
- [[Cursor]]
 
- [[Character generator]]
 
- [[Video terminal]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[SCSI]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Mainframe]]
 
- [[Minicomputer]]
 
- [[Personal computer]]
 
- [[Microprocessor]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[User]]
 
- [[Multi-user]]
 
- [[End-user]]
 
- [[Original Equipment Manufacturer]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[System Module]]
 
- [[DEC card form factor]]
 
- [[DEC edge connector contact identification]]
 
- [[System unit]]
 
- [[DEC alphabet]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[H960 rack]]
 
- [[BA11 mounting boxes]]
 
- [[BA11 mounting box]]
 
- [[BA11-K mounting box]]
 
- [[BA11-L mounting box]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[H742 Power Supply]]
 
<!-- </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]]
 
- [[PDP-11 Commercial Instruction Set]]
 
<!-- </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]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[KB11-A CPU]]
 
- [[KB11-B CPU]]
 
- [[KB11-C CPU]]
 
- [[KB11-D CPU]]
 
- [[KD11-A CPU]]
 
- [[KD11-B CPU]]
 
- [[KD11-E CPU]]
 
- [[KD11-EA CPU]]
 
- [[KD11-Z CPU]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[KY11-LA Operator's Console]]
 
- [[KY11-LB Programmer's Console]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[KE11-E Extended Instruction Set]]
 
- [[KT11-C Memory Management Unit]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[KE11-F Floating Instruction Set]]
 
- [[FP11-A Floating-Point Processor]]
 
- [[FP11-B Floating-Point Processor]]
 
- [[FP11-C Floating-Point Processor]]
 
- [[FP11-F Floating-Point Processor]]
 
<!-- </small> -->
 
 
 
<!-- </small> -->
 
[[KK11-A Cache Memory]]
 
- [[MS11 Semiconductor Memory System]]
 
- [[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> -->
 
[[Able ENABLE]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[UNIBUS memories]]
 
- [[MM11-D core memory]]
 
- [[MM11-K core memory]]
 
- [[MM11-L core memory]]
 
- [[MM11-U core memory]]
 
- [[MS11 32KB MOS memory]]
 
- [[MS11-L MOS 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]]
 
- [[M9312 ROM]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[QBUS boot ROMs]]
 
- [[BDV11 Bus Terminator/ROM‎]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[DEC bootstrap device codes]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[RH11 MASSBUS controller]]
 
- [[RH70 MASSBUS controller]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[RC11 disk controller]]
 
- [[RK11-C disk controller]]
 
- [[RP11 disk controller]]
 
- [[RL11 disk controller]]
 
- [[RX11 floppy disk controller]]
 
- [[RX211 floppy disk 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]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[TU16 magtape drive]]
 
- [[TE16 magtape drive]]
 
- [[TS03 magtape drive]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[KW11-L Line Time Clock]]
 
- [[VT11 Graphic Display Processor]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[DR11 parallel interface]]
 
- [[DR11-B parallel interface]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[DL11 asynchronous serial line interface]]
 
- [[DH11 asynchronous serial line interface]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Texas Instruments]]
 
- [[Intel]]
 
- [[MIPS]]
 
- [[Xerox]]
 
<!-- <small> -->
 
 
 
<!-- <small> -->
 
[[UNIVAC I]]
 
- [[IBM 704]]
 
- [[IBM 709]]
 
- [[IBM 7090]]
 
- [[IBM 7094]]
 
- [[Honeywell 6000 series‎‎]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Lear Siegler ADM-3A]]
 
- [[Term-Mite ST Smart Terminal]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Intel 8085]]
 
- [[Intel x86]]
 
- [[Motorola M68000 Family]]
 
- [[Motorola MC68000]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[National Semiconductor NS405 and NS455 Terminal Management Processor]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Xerox Alto]]
 
- [[IBM PC‎]]
 
- [[IBM-compatible PC]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Ersatz-11]]
 
- [[Bochs]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Compatible Time-Sharing System]]
 
- [[TOPS-10]]
 
- [[TENEX]]
 
- [[MOS operating system]]
 
<!-- </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]]
 
- [[Running UNIX V6 on an -11/23]]
 
- [[Installing Unix Seventh Edition]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[ALGOL]]
 
- [[BCPL]]
 
- [[Typesetter C]]
 
<!-- </small> -->
 
 
 
<!-- </small> -->
 
[[Vi editor]]
 
<!-- <small> -->
 
 
 
<!-- <small> -->
 
[[Communication network]]
 
- [[Reliable byte stream‎]]
 
- [[Protocol]]
 
- [[Protocol suite]]
 
- [[Circuit-switching]]
 
- [[Host]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Packet]]
 
- [[Datagram]]
 
- [[Physical network]]
 
- [[Packet switch]]
 
- [[Internetwork]]
 
- [[Router]]
 
- [[Internetworking layer]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Sequence number‎]]
 
- [[Acknowledgement]]
 
- [[Timeout]]
 
- [[Retransmission]]
 
- [[Big-endian]]
 
- [[Little-endian]]
 
- [[Local area network‎]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Host-to-IMP Protocol‎]]
 
- [[PARC Universal Packet]]
 
- [[Internet]]
 
- [[Internet Protocol]]
 
- [[Transmission Control Protocol]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Telnet]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Engineering Change Order]]
 
- [[Request for Comments]]
 
- [[Bitsavers]]
 
- [[Vonada's Engineering Maxims]]
 
<!-- </small> -->
 
 
 
==Pages I have substantially upgraded==
 
 
 
<!-- <small> -->
 
[[Dual Inline Package]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Operating system]]
 
- [[Symbolic link]]
 
<!-- </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> -->
 
[[MSV11-J QBUS memory]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[RF11 disk controller]]
 
- [[RK11 disk controller]]
 
- [[RK05 disk drive]]
 
- [[RL0x disk drive]]
 
- [[RP06 disk drive]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[TU10 magtape drive]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[M7821]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Multics]]
 
- [[Incompatible Timesharing System]]
 
- [[UNIX Sixth Edition]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[FORTRAN]]
 
- [[Emacs editors‎‎]]
 
<!-- </small> -->
 
 
 
<!-- <small> -->
 
[[Interface Message Processor]]
 
- [[Network Control Program]]
 
- [[Ethernet]]
 
- [[TCP/IP]]
 
<!-- </small> -->
 

Revision as of 13:12, 1 January 2019

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' (the terminology used in the first version of the documentation; it was later changed to 'pages', for unknown reasons, but this is incorrrect - the functionality provided is that of segmentation, not paging). Each segment of a 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 Kbytes, in 0100 (64.) byte increments. Segments can grow either up from their base address, or down; the latter 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.)

Trap and interrupt vectors and are fetched from Kernel Data space, when memory management is enabled; this allows bad physical main memory at absolute address 0 to be bypassed, if it is failing.

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.

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' to their state before the instruction started execution), 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)

On the 'simplified subset' machines, SSR1 and SSR3 are not implemented.

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). The layout of SSR0 is:

Non-resident Length Read-only Trap Unused Enable Trap Maintenance Instruction Completed CPU Mode I/D Page Enable
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00

When any of the first three bits (all error aborts) are set, bits 1-7, as well as SSR1 and SSR2, are frozen. On the 'simplified subset' machines, bits 12, 9, 7 and 4 are not implemented.

SSR1 contains information about register modifications (given there in two's complement) 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. Its layout is:

Change Register Change Register
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00

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. Its layout is:

Unused Enable UNIBUS Map Enable 22-bit Unused Kernel Supervisor User
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00

The 'Enable 22-bit' bit only applies on machines which support larger memories, i.e. the PDP-11/70, PDP-11/44, and machines with the KDF11 CPUs and KDJ11 CPUs.

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:


Don't Cache 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

On the 'simplified subset' machines, only modes 0, 2 and 6 are supported, and neither is the 'Trapped' bit (set on PDR's for memory references that trapped, on the other machines).

The 'Don't Cache' bit is only available on the KDJ11 CPUs.

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

See also