Difference between revisions of "UNIX Second Edition"
(Add Matthew Gilmore's archaeology on V2 commands) |
(Mention archaeology without kernel source) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
}} | }} | ||
− | '''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]]. | + | '''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 | + | 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). [[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). | 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). | ||
Line 18: | Line 26: | ||
==Source== | ==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 '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]]. |
− | formats]]. | ||
==External links== | ==External links== | ||
Line 29: | Line 36: | ||
* [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 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://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://minnie.tuhs.org/mailman3/hyperkitty/list/tuhs@tuhs.org/thread/Y5CHHVMQY3JUOKI4PD7OVB4FBD4ILV2O/ S2-bits V2 Source Code Restoration] | ||
* [https://gitlab.com/segaloco/v2src v2src] | * [https://gitlab.com/segaloco/v2src v2src] |
Latest revision as of 02: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
- V2 - file tree at TUHS
- cmd - not really
- 1972 stuff - the source for the above
- Readme - a discussion of what's there
- Second Edition Unix
- S2-bits V2 Source Code Restoration
- v2src
- UNIX Programmer's Manual: Second Edition
v • d • e UNIX Versions, Vendors and Related |
---|
Research Unix PDP-7 UNIX • V1 • V2 • V3 • V4 • V5 • V6 • V7 • V8 • V9 • V10 • LSX • MINI-UNIX • Unix/32V
AT&T - CB-UNIX • PWB/UNIX • USG UNIX • System III • System IV • System V BSD - 2.9 BSD • 2.10 BSD • 2.11 BSD • 3BSD • 4BSD • 4.1 BSD • 4.2 BSD • 4.3 BSD • 4.4 BSD BSD Descendants 386BSD • NetBSD • FreeBSD • OpenBSD • NeXTSTEP • Darwin |
Other - xv6 • AMIX • SunOS • Solaris • ULTRIX • A/UX • XENIX • AIX • Dell UNIX |