Difference between revisions of "UNIX Second Edition"

From Computer History Wiki
Jump to: navigation, search
m (+next version)
(Mention archaeology without kernel source)
 
(6 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
| creator = AT&T/[[Western Electric]]
 
| creator = AT&T/[[Western Electric]]
 
| year introduced = June, 1972
 
| year introduced = June, 1972
| next version = [[UNIX Third Edition]]
+
| previous version = [[UNIX First Edition|V1]]
 +
| current version = V2
 +
| next version = [[UNIX Third Edition|V3]]
 
| type = [[Multi-tasking]], [[multi-user]]
 
| type = [[Multi-tasking]], [[multi-user]]
 
| architecture = [[PDP-11 architecture|PDP-11]]
 
| architecture = [[PDP-11 architecture|PDP-11]]
 
}}
 
}}
  
'''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]]. There were 10 instances of UNIX running inside Bell at this point.
+
'''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.
  
It still ran on the [[PDP-11/20]] model of the PDP-11; the [[PDP-11/45]] was apparently expected in the near future. The [[file system]] is almost identical to the [[UNIX file system|V6 one]]; the only major differences are that i) the free blocks are stored as a bit [[array]], rather than a [[list]], and ii) [[peripheral|device]] 'special files' are indicated by [[inode]] numbers below 41. (not via a flag in the 'mode' word in the inode, as later).
+
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.  
  
A copy of Second Edition does not seem to be extant. [[The Unix Heritage Society|TUHS]] has the [[source code]] for some of its user code: an early version of the first [[C programming language|C]] [[compiler]] (C was just being defined at the point in time), and many commands. The 'NIX Programmer's Manual: Second Edition' is also available.
+
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). [[Digital Equipment Corporation|DEC]] had a rare, and now almost forgotten "Memory Protect & Relocate" [[memory management]] option for the -11/20, the [[KS11 Memory Protection and Relocation option|KS11]]. Some of the -11/20's running V2 UNIX had a KS11 - "the current system, which has relocation and protection hardware". ([http://squoze.net/UNIX/v2man/man5/core 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 vector]]s are in low memory), as on [[MINI-UNIX#Implementation_details|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 Extended Arithmetic Element|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 [[application]]s. 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" ([http://squoze.net/UNIX/v2man/man5/core core(V)]); "if they correspond to 11/45 floating point [[instruction]]s". ([http://squoze.net/UNIX/v2man/man3/fptrap 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 [[UNIX file system|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) [[peripheral|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. [[The Unix Heritage Society|TUHS]] claims to have the [[source code]] for some of its user code: an early version of the first [[C programming language|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 [[UNIX Third Edition|V3]] (see discussion there). However, the sources for some V2 commands were reconstructed by [[decompilation|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 [[UNIX a.out file|a.out formats]].
  
 
==External links==
 
==External links==
  
* [https://minnie.tuhs.org/cgi-bin/utree.pl?file=V2 V2]
+
* [https://minnie.tuhs.org/cgi-bin/utree.pl?file=V2 V2] - file tree at TUHS
 +
** [https://minnie.tuhs.org/cgi-bin/utree.pl?file=V2/cmd cmd] - not really
 +
* [https://www.tuhs.org/Archive/Distributions/Research/1972_stuff 1972 stuff] - the source for the above
 +
** [https://www.tuhs.org/Archive/Distributions/Research/1972_stuff/Readme Readme] - a discussion of what's there
 +
* [https://wiki.tuhs.org/doku.php?id=systems:2nd_edition Second Edition Unix]
 +
* [https://minnie.tuhs.org/mailman3/hyperkitty/list/tuhs@tuhs.org/thread/Y5CHHVMQY3JUOKI4PD7OVB4FBD4ILV2O/ S2-bits V2 Source Code Restoration]
 +
* [https://gitlab.com/segaloco/v2src v2src]
 
* [http://squoze.net/UNIX/v2man/ UNIX Programmer's Manual: Second Edition]
 
* [http://squoze.net/UNIX/v2man/ UNIX Programmer's Manual: Second Edition]
 
** [http://squoze.net/UNIX/v2man/man0 Introduction]
 
** [http://squoze.net/UNIX/v2man/man0 Introduction]

Latest revision as of 03:54, 20 October 2023


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