Difference between revisions of "MINI-UNIX"
Revision as of 11:44, 1 November 2020
There was a second, earlier, stripped-down variant of V6 for PDP-11's without memory management, LSX; it differed from MINI-UNIX in being targeted at machines with more limited amounts of main memory (a real concern with early machines, which often came with limited amounts of expensive core memory.
Most V6 applications run without source modification on MINI-UNIX, although it is not binary-compatible with V6. This is a result of the lack of memory management in the machines which run MINI-UNIX; the kernel and user commands (as processes) share a single PDP-11 address space, with the kernel in low memory, and the processes (one at a time) in high memory.
MINI-UNIX did not originally support the LSI-11, but there are no significant architectural differences between the LSI-11 and other 'small' PDP-11's, so MINI-UNIX was historically brought up on the LSI-11. (The main significant difference is that in the LSI-11, access to the PS requires use of special instructions; see here for other issues.)
That version has since apparently been lost; however, because of the wide availability of the LSI-11 in the vintage computer community, MINI-UNIX has recently been ported to the LSI-11 again.
Thus, 24KB (notionally) is normally allocated to hold the kernel (with a modest number of processes and disk buffers), leaving 32KB available for user commands/applications. (The "notionally" is because that 24KB also includes the 'user' structure: a per-process swappable data area, 1KB in size; thus 23KB is actually avaqilable for the kernel.)
This division can be altered, albeit painfully (all the command binaries have to be re-linked to the new address), to allow the size of the kernel to vary.
The interface to the I/O system is mostly un-modified, so that existing V6 device drivers can basically be 'dropped in', mostly un-modified. In particular, the interface to the 'tty' driver, and the block device buffer system, is un-modified. The two minor aspects that are changed are:
- since the system is limited to less than 64KB of memory, the 'extended memory' field in the buffer header is not present;
- 'raw devices' (which can do DMA transfers directly from the device to a buffer in the user's process) are not supported.
MINI-UNIX uses the standard C compiler, which generate EIS intructions. On PDP-11 CPU models which do not support the EIS, an simulation package is available which is called into action when a trap is produced by an unknown instruction.
The scheduler is a simple round-robin time-slicing one.
MINI-UNIX supports almost all the standard V6 system calls, with the excepion of:
Pipes not supported not only because of space in the OS, but because a process swap-out and -in will be required every time a different stage needs to run, leading to poor performance.
Although pipes are not supported, the shell supports the pipe command syntax ('|'), by use of temporary files (modulo the amount of free space on the disk, of course).
There is no support for command images with 'pure texts', or for so-called 'split I+D' mode.
The removal of ptrace() means there is no interactive debugging; this is not a major hardship, as the lack of memory management means a buggy user program can crash the system anyway.
The maximum file size supported is 1MB; 'large' files are supported, but not 'huge' files (those with two levels of indirect blocks).
'Read-ahead' has also been removed from the file system implementation; this saves on address space in the kernel at the cost of a slight degradation of performance.
Only a few commands have significant changes:
- Shell - no pipes
- Linker 'ld' - minor modification to change target address
- Debugger 'db' - minor modification to change program address
A few other commands have minor changes, but they are not of any great consequence. (See Section 4 of the "The MINI-UNIX System" memorandum for details.) Some have been slightly modified to fit into the 32KB available for user processes.