UNIX Implementation on PERQ
19 October 1981
This was a discussion paper for a meeting between SERC and ICL on 19 October 1981
This paper discusses issues involved in the implementation of UNIX
on PERQs. Objectives of ICL and SERC are presented. A set of possible
strategies is enumerated, major work items are identified and arguments
are presented.
1. OBJECTIVES
ICL
- To provide the UNIX operating system, version 7,
on the PERQ as an alternative to the 3RCC system.
This system must be capable of running any software
written to the UNIX Programming Interface (subject to
any implementation restrictions; however, the implementation
should not be more restrictive than the PDP-11
implementation).
- To implement UNIX in a way that will give
maximum compatibility with other ICL UNIX systems.
- To implement UNIX in a way that fits
in with ICL's plans for distributed
systems and networking.
- To provide a system which is reliable,
well documented, easily maintained, and easily upgradeable.
- to implement UNIX and FORTRAN as soon as possible.
SERC
- To implement UNIX with at least the functionality of
Bell Labs version 7, including FORTRAN-77, in the shortest
possible time.
- To provide a large virtual address
space for each process.
- To provide the ability to mix code written in
different languages
within the same process: at least C, FORTRAN-77, and Pascal.
- To maximise the amount of software obtainable elsewhere
which will run on PERQ UNIX. This should preferably include 3RCC
and Carnegie-Mellon University software.
2. STRATEGIES
- Implement the UNIX kernel and utilities (including the shell)
using the current (D.5) Q-code.
-
Implement the UNIX C program interface (and hence utilities and shell)
using the SPICE-81 kernel functions.
C programs see UNIX as a set of functions which provide services
such as IO, memory management, process spawning etc. The SPICE-81
kernel provides functions for inter-process communication,
process-kernel communication, virtual memory management, and process management.
The UNIX program interface functions would be implemented as a library
of functions which use the SPICE-81 kernel primitives. the SPICE-81
process management primitives are closely modelled on those of UNIX,
for example, the UNIX fork function could be implemented by sending
a single message to the SPICE kernel, followed by a reply giving
the status of the process in the parent-child relationship.
-
Implement (via microcode) a target machine designed for C, and
implement the UNIX kernel and utilities on that.
The Q-code supported by the 3RCC microcode is designed for Pascal
and is not the best language for supporting C (in which UNIX is written).
Under strategy 3, a target machine for the C language is defined,
and the PERQ microcode is rewritten to support a new (C-code) language.
This gives the most efficient execution of programs written in C.
The work for Strategy 3 consists of defining the target machine,
writing the microcode, and the standard porting activities for a
UNIX system.
- Implement both 2 and 3 in parallel
3. WORK ITEMS
Tasks are;
- Implement C to Q-code compiler. It is anticipated that the
SPICE-81 Q-code will be similar to the current one, and that
the compiler will generate assembler code.
- Implement an assembler/linker for Q-code.
-
Implement the machine-dependent parts of the UNIX kernel.
This includes memory management. process management and swapping,
signals, inter-process and user-kernel communication,
device drivers.
- Implement the UNIX C program interface. This involves a library
of functions which would use the SPICE-81 kernel functions.
- Specify target machine, design microcode and code-generator of C compiler.
- Implement microcode for C target machine, and iterative refinement to 5.
- Implement C compiler and linker, and iterative refinement to 5
- Implement UNIX shell and utilities
- Compiler testing (same for all strategies).
- Utilities testing and user documentation (same for all strategies).
|
Strategy Number |
|
|
1 |
2 |
3 |
4 |
Tasks |
1 |
3 × 2 |
3 × 2 |
|
3 × 2 |
2 |
2 × 1 |
2 × 1 |
|
2 × 1 |
3 |
3 × 2 |
|
3 × 2 |
3 × 2 |
4 |
|
1.5 × 2 |
|
1.5 × 2 |
5 |
|
|
1 × 3 |
1 × 3 |
6 |
|
|
4 × 1 |
4 × 1 |
7 |
|
|
4 × 2 |
4 × 2 |
8 |
4 × 1 |
4 × 1 |
4 × 1 |
4 × 1.5 |
9 |
2 × 1 |
2 × 1 |
2 × 1 |
2 × 1 |
10 |
2 × 1 |
2 × 1 |
2 × 1 |
2 × 1 |
Figures are months × people |
5. ARGUMENTS
- pro 1,2
-
- C compiler work may overlap with implementation for either
P-code machines (SERC).
- Con 1
-
- Limited address space per process.
- PERQ Pascal compiler will not run without modification.
- C to Q-code mapping is likely to be inefficient (ICL).
- Pro 2
-
- Existence of SPICE kernel potentially shortens development time.
- 3RCC and CMU software would be compatible
(Pascal, ADA, LISP etc), i.e should run with at most minor changes.
- 32 bit paged virtual memory per process.
- Pre-release SPICE-81 kernel will probably be available to SERC on Nov 12
- It is likely that 3RCC will adopt SPICE-81 as their standard
operating system, and will support it.
- SPICE is likely to be in the public domain and therefore may be free.
- Con 2
-
- Availability of SPICE not under our control.
- SPICE-81 kernel may be unstable for a while.
- Possible cost of SPICE licences and royalties unknown (ICL)
- SPICE message passing facilities may not fit in with ICL's
distributed systems strategy.
- ICL believe that work item 4 might take longer than estimated,
especially if acceptable performance is to be achieved.
- Pro 3
-
- Under our control
- A well-designed target machine would enable a more efficient
implementation of the C language.
- Lower support costs due to complete knowledge
of the microcode (ICL).
- Con 3
-
- SERC believe that work item 5 might take longer than estimated,
especially if the refinements in item 6 and 7 are to be minor.
- 3RCC and CMU software would not run (SERC)
- (SERC) Microcode support tools run under 3RCC operating
system, requiring that files be transferring between file systems
throughout the development cycle. (SERC)
- Pro 4
-
- Satisfies both ICL and SERC objectives.
- Provides backup plan in case one path fails.
- Commonality of effort in utilities (8) and testing (9.10),
and some in the compiler development (depending on the C machine
specification).
- Con 4
-
- Extra manpower would be required. The extra expert manpower
needed is:
- ICL: 1 code generator expert
- SERC: 1 microcode expert
4. TIME ESTIMATES
These timescales do not account for the Christmas break.
SERC: strategy 2
0 1 2 3 4 5 6 7
1 |----------2------------|
2 |-------1-------|
9 |-------1-------|
4 |------1----|
8 |--------------1----------------|
10 |-------1-------|
max manpower 5
Note: This requires SPICE-81 kernel at month 3 and the
specification of SPICE Q-code at month 0
ICL: strategy 3
0 1 2 3 4 5 6 7
3 |-----------2-----------|
5 |---3---|
6 |-------------1-------------|
7 |-------------2-------------|
9 |--------1------|
8 |-------------1-------------|
10 |--------1------|
max manpower 6
Note: This requires UNIX licence and source at month 0. PDP-11
running UNIX and 2 PERQs at month 1.
SERC have these resources.