Difference between revisions of "LSX"

From Computer History Wiki
Jump to: navigation, search
(More details; mostly from the source)
m (External links: complete cats)
 
(7 intermediate revisions by the same user not shown)
Line 13: Line 13:
 
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.
 
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 somewhat the same as that of V6, so that existing V6 [[device driver]]s can easily be modified to run under LSX. In particular, there can only be one type each of 'character' (un-structured) devices and 'block' ([[mass storage]]) devices (unlike V6, which allows a semi-arbitrary number of each); the single character device ''must'' be a 'tty' ([[terminal]]) device. Other than that, the interface to character devices is identical, as is that to the tty driver; the interface to the block device buffer system is also identical.
+
The interface to the I/O system is somewhat the same as that of V6, so that existing V6 [[device driver]]s can easily be modified to run under LSX. In particular, there can only be one type each of 'character' (un-structured) devices and 'block' ([[mass storage]]) devices (unlike V6 and MINI-UNIX, which allow a semi-arbitrary number of each); the single character device ''must'' be a 'tty' ([[terminal]]) device. Other than that, the interface to character devices is identical, as is that to the tty driver; the interface to the block device buffer system is also identical.
  
 
Two other minor aspects that are changed are:
 
Two other minor aspects that are changed are:
Line 20: Line 20:
 
* 'raw devices' (which can do [[Direct Memory Access|DMA]] transfers directly from the device to a buffer in the user's process) are not supported.
 
* 'raw devices' (which can do [[Direct Memory Access|DMA]] transfers directly from the device to a buffer in the user's process) are not supported.
  
The [[file system]] apparently supports contiguous storage of files, as an alternative to the normal random allocation of blocks in UNIX;; the details are currently obscure. This was probably done to produce higher performance with the [[floppy disk]]s intended for mass storage on LSI-11 LSX systems. '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.
+
The [[file system]] supports contiguous storage of files, as an alternative to the normal random allocation of blocks in UNIX. This was probably done to produce higher performance with the [[floppy disk]]s intended for mass storage on LSI-11 LSX systems. The details are currently obscure, since the [[kernel]] does not support the creation of such files; the paper describing LSX (below) indicates there were two separate programs, one to allocate space for such files, and one to move a file into such an area, but they do not seem to be extant. When contiguous files are in use, the free list is kept as an array in the superblock, rather than as a threaded list of blocks (the normal method in V6).
 +
 
 +
'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.
  
 
The [[scheduler]] is a simple round-robin time-slicing one. The system optionally supports a 'background' [[process]], which runs when foreground processes are waiting for tty input.
 
The [[scheduler]] is a simple round-robin time-slicing one. The system optionally supports a 'background' [[process]], which runs when foreground processes are waiting for tty input.
Line 28: Line 30:
 
===User-visible compatability===
 
===User-visible compatability===
  
LSX supports almost all the standard V6 system calls, with the excepion of:
+
LSX supports most of the standard V6 system calls, with the excepion of:
  
 
* pipe()
 
* pipe()
 
* ptrace()
 
* ptrace()
 
* getid()/setgid()
 
* getid()/setgid()
 +
* setuid()
 
* prof()
 
* prof()
 +
* times()
 
* mount()
 
* mount()
 
* umount()
 
* umount()
 
* chown()
 
* chown()
 +
* sleep()
 +
* nice()
  
 
[[Pipe]]s 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.
 
[[Pipe]]s 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.
Line 50: Line 56:
 
There is no support for command images with 'pure texts', or for so-called 'split I+D' mode.
 
There is no support for command images with 'pure texts', or for so-called 'split I+D' mode.
  
The maximum file size supported is 1MB; 'large' files are supported, but not 'huge' files (those with two levels of indirect blocks).
+
The maximum file size supported is 1MB; 'large' files are supported, but not 'huge' files (those with two levels of indirect blocks). LSX also does not support file systems with more than 100 [[inode]]s; again, almost certainly bringing a slight reduction in kernel size.
  
 
===Modified commands===
 
===Modified commands===
Line 59: Line 65:
 
* Linker 'ld' - minor modification to change target address
 
* Linker 'ld' - minor modification to change target address
 
* [[Debugger]] 'db' - minor modification to change program address
 
* [[Debugger]] 'db' - minor modification to change program address
 +
* File system initializer 'mkfs' - make up for system simplification of free inodes
  
 
A few other commands have minor changes, but they are not of any great consequence. Some have been slightly modified to fit into the 32KB available for user processes.
 
A few other commands have minor changes, but they are not of any great consequence. Some have been slightly modified to fit into the 32KB available for user processes.
Line 64: Line 71:
 
==Further reading==
 
==Further reading==
  
* Heinz Lycklama, ''UNIX on a Microprocessor'', Bell System Technical Journal, Vol. 57, No. 6, July-August 1978
+
* Heinz Lycklama, [https://www.heinzlycklama.com/docs/bstj57-6-2087.pdf. ''UNIX on a Microprocessor''], Bell System Technical Journal, Vol. 57, No. 6, July-August 1978
 +
 
 +
==External links==
  
<!-- ==External links==
+
* [https://www.tuhs.org/Archive/Documentation/TechReports/Heinz_Tech_Memos/UNIX_on_a_Microprocessor_19780322.pdf UNIX on a Microprocessor]
 +
* [http://www.mailcom.com/lsx/index.html LSX Unix Restoration Page]
 +
* [https://www.tuhs.org/cgi-bin/utree.pl?file=LSX LSX] - LSX at the [[The Unix Heritage Society|TUHS]] archive
  
* [http://ana-3.lcs.mit.edu/~jnc/tech/unix/Mini/Mini.html Running MINI-UNIX on the LSI-11]
+
{{Nav Unix}}
* [http://www.tavi.co.uk/unixhistory/mini-unix/munix-documents.zip MINI-UNIX documents] -->
 
  
 +
[[Category: PDP-11 Operating Systems]]
 +
[[Category: Non-DEC Operating Systems]]
 
[[Category: Unix OS's]]
 
[[Category: Unix OS's]]

Latest revision as of 07:14, 8 November 2022

LSX is a somewhat limited variant of V6 Unix, intended for use on the LSI-11 model of the PDP-11, which did not have memory management (which was required for early Unix versions from 4 onward). Support for other models without memory management (such as the PDP-11/05) was also included. It was targeted to systems with a minimal amount of main memory, as little as 40KB (a real concern for LSX, on early LSI-11s, which usually came with very limited amounts). Although it is not full Unix, it retains a large amount of the functionality of the original.

Most V6 applications run without source modification on LSX, although it is not binary-compatible with V6. This is a result of the lack of memory management on LSI-11; 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.

There was a second, later, stripped-down variant of V6 for PDP-11's without memory management, MINI-UNIX. It differed from LSX in being for machines less limited amounts of main memory; it was targeted at machines with the full 56KB possible on such PDP-11's.

Implementation details

Because of the way user commands are run in high memory in a single address space, user commands are linked to run at a high address (usually 040000, instead of at 0 as on standard V6.

Thus, 16KB (notionally) is normally allocated to hold the kernel (with a small number of processes and disk buffers), leaving up to 40KB (the exact amount will depend on the amount of main memory on the machine) available for user commands/applications. (The "notionally" is because that 16KB also includes the 'user' structure: a per-process swappable data area, 1KB in size; thus 15KB is actually available 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 somewhat the same as that of V6, so that existing V6 device drivers can easily be modified to run under LSX. In particular, there can only be one type each of 'character' (un-structured) devices and 'block' (mass storage) devices (unlike V6 and MINI-UNIX, which allow a semi-arbitrary number of each); the single character device must be a 'tty' (terminal) device. Other than that, the interface to character devices is identical, as is that to the tty driver; the interface to the block device buffer system is also identical.

Two other 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.

The file system supports contiguous storage of files, as an alternative to the normal random allocation of blocks in UNIX. This was probably done to produce higher performance with the floppy disks intended for mass storage on LSI-11 LSX systems. The details are currently obscure, since the kernel does not support the creation of such files; the paper describing LSX (below) indicates there were two separate programs, one to allocate space for such files, and one to move a file into such an area, but they do not seem to be extant. When contiguous files are in use, the free list is kept as an array in the superblock, rather than as a threaded list of blocks (the normal method in V6).

'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.

The scheduler is a simple round-robin time-slicing one. The system optionally supports a 'background' process, which runs when foreground processes are waiting for tty input.

LSX uses the standard C compiler, which generate EIS intructions. For LSI-11s which do not have the KEV11-A or -B chip to provide EIS, and other PDP-11 models which do not have EIS, an simulation package is available which is called into action when a trap is produced by an otherwise un-supported instruction.

User-visible compatability

LSX supports most of the standard V6 system calls, with the excepion of:

  • pipe()
  • ptrace()
  • getid()/setgid()
  • setuid()
  • prof()
  • times()
  • mount()
  • umount()
  • chown()
  • sleep()
  • nice()

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).

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.

Although the system retains a limited capability to join a separate filesystem on a second mass storage device onto the file system hierarchy, the capability is not general; the user cannot 'mount' and 'unmount' file systems.

File ownership, along with most protection modes, is not supported; it is as if all users are the 'super-user'.

There is no support for command images with 'pure texts', or for so-called 'split I+D' mode.

The maximum file size supported is 1MB; 'large' files are supported, but not 'huge' files (those with two levels of indirect blocks). LSX also does not support file systems with more than 100 inodes; again, almost certainly bringing a slight reduction in kernel size.

Modified commands

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
  • File system initializer 'mkfs' - make up for system simplification of free inodes

A few other commands have minor changes, but they are not of any great consequence. Some have been slightly modified to fit into the 32KB available for user processes.

Further reading

External links