Difference between revisions of "UNIX Second Edition"

From Computer History Wiki
Jump to: navigation, search
(Add my archaeology)
m (Use common man ref format)
Line 12: Line 12:
 
'''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. It still ran on the [[PDP-11/20]] model of the 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. 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 ''pre-dates'' the [[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)]).
+
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 ''pre-dates'' the [[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 the process' address space was laid out - the man pages for ld(III) and exec(II) simply say nothing 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(III) nor exec(II) mentions this detail. One could work it out from the V1 [[kernel]] source, if one is ''really'' interested...
 
One big question concerns details of how the process' address space was laid out - the man pages for ld(III) and exec(II) simply say nothing 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(III) nor exec(II) mentions this detail. One could work it out from the V1 [[kernel]] source, if one is ''really'' interested...
Line 18: Line 18:
 
Some also had [[KE11-A Extended Arithmetic Element]]s. (It's important to remember 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. V1 used the KE11-A, and was not conditionalized to be able to run without it, though.)
 
Some also had [[KE11-A Extended Arithmetic Element]]s. (It's important to remember 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. V1 used the KE11-A, and was not conditionalized to be able to run without it, though.)
  
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 -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 26: Line 26:
 
A 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.
 
A 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). They seem to be a mixture of 'naked' binaries, along with some in V1 and V2 [[UNIX a.out file|a.out
+
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, with some in V1 and V2 [[UNIX a.out file|a.out formats]].
formats]].
 
  
 
==External links==
 
==External links==

Revision as of 18:51, 18 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. 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 pre-dates the 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 the process' address space was laid out - the man pages for ld(III) and exec(II) simply say nothing 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(III) nor exec(II) mentions this detail. One could work it out from the V1 kernel source, if one is really interested...

Some also had KE11-A Extended Arithmetic Elements. (It's important to remember 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. V1 used the KE11-A, and was not conditionalized to be able to run without it, though.)

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

A 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, with some in V1 and V2 a.out formats.

External links