UNIX Second Edition

From Computer History Wiki
Revision as of 03:54, 20 October 2023 by Jnc (talk | contribs) (Mention archaeology without kernel source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Unix V2
Type: Multi-tasking, multi-user
Creator: AT&T/Western Electric
Architecture: PDP-11
Previous Version: V1
This Version: V2
Next Version: V3
Date Released: June, 1972


UNIX Second Edition (often referred to as UNIX V2 or V2 UNIX - 'Unix' was still normally given in all capital letters at this point in time) was an early version of UNIX. The source code for the kernel has been completely lost, so it is not possible to make authoritative, detailed, statements about it; but documentation, and source for some commands still exists, which allows technological archaeologists to draw some conclusions about it.

There were 10 instances of UNIX running inside Bell at this point. It still ran on the PDP-11/20 model of the PDP-11.

Support for protection (and relocation - i.e. memory that looks, to user code, as if it's at 0, but is actually at, say, 060000 in physical terms) in PDP-11 UNIX actually pre-dates the later PDP-11/45 (the first PDP-11 model on which it was a standard). DEC had a rare, and now almost forgotten "Memory Protect & Relocate" memory management option for the -11/20, the KS11. Some of the -11/20's running V2 UNIX had a KS11 - "the current system, which has relocation and protection hardware". (core(V))

One big question concerns details of how a process' address space was laid out - the man pages for ld(I) and exec(II) simply say nothing about this at all. With the KS11, one can assume it started at 0 - but who knows? Without the KS11, it must have started at a higher address (since on the PDP-11, interrupt vectors are in low memory), as on MINI-UNIX; but again, neither V1's ld(I) nor exec(II) mentions this detail. One could work it out from the V1 kernel source (which does still exist, if one is really interested...

Some possibly did not have a KE11-A (mandatory in V1 - V1 used the KE11-A, and was not conditionalized to be able to run without it). (It's important to realize that not all the machines running UNIX would have had their hardware updated simultaneously: e.g. the patent group's -11/20 would not have needed the KS11 as much, since it was running mature applications. So V2 UNIX was probably conditionalized to run with and without the KS11.)

The -11/45 was apparently expected in the near future; V2 seems to have started looking forward to it - "a trap is simulated by the floating point simulator" (core(V)); "if they correspond to 11/45 floating point instructions". (fptrap(III)) It is possible that they already had the -11/45 at this point, but one would tend to doubt it: "immediate mode ((pc)+) is not supported, since the PDP-11/45 handbook is not clear on what to do about it." (If they had it, a simple experiment would have produced the answer.) And "Double precision results are probably less correct than the hardware will be" (note tense). (All from fptrap(III).)

The file system is almost identical to the V6 one; the only major differences are that i) the free blocks are stored as a bit array, rather than a linked list, and ii) device 'special files' are indicated by inode numbers below 41. (not via a flag in the 'mode' word in the inode, as later).

Source

As mentioned, a complete copy of Second Edition does not seem to be extant. TUHS claims to have the source code for some of its user code: an early version of the first C compiler (C was just being defined at the point in time), and many commands (but see below). The 'UNIX Programmer's Manual: Second Edition' is also available.

The 'cmd' directory at TUHS actually seems to be for V3 (see discussion there). However, the sources for some V2 commands were reconstructed by decompiling the object code for some that were located in an old dump (in the 's2-bits.tar.gz' file in the TUHS archive, below). The binaries seem to be a mixture of 'naked' binaries, along with some in V1 and V2 a.out formats.

External links