I believe the practice John Holden describes from Mini-UNIX (only one
process in memory at a time, hence a context switch is the same as a
swap) was also part of the very earliest UNIXes, on the PDP-7 and the
11/20, neither of which had hardware memory management. Dennis Ritchie's
`Evolution of the UNIX Time-Sharing System' paper (in the October 1984
Bell Labs Technical Journal, the second issue to be devoted entirely to
UNIX), tells how it worked in some detail. It wouldn't surprise me if
the swap-to-fork mechanism lived on for a while even after the system
learned about memory management, but I don't actually know that. (Warren:
wbat does the old system you have do?)
Anyone who wants to verify what John describes for V6 can look in (among
other places) the Lions book; newproc is at line 1826, at the beginning
of slp.c.
Norman Wilson
Received: (from major@localhost)
by minnie.cs.adfa.edu.au (8.9.3/8.9.3) id LAA55770
for pups-liszt; Tue, 27 Feb 2001 11:15:35 +1100 (EST)
(envelope-from owner-pups(a)minnie.cs.adfa.edu.au)
From Warren Toomey <wkt(a)henry.cs.adfa.edu.au> Tue
Feb 27 10:15:44 2001
Received: from henry.cs.adfa.edu.au (henry.cs.adfa.edu.au
[131.236.21.158])
by minnie.cs.adfa.edu.au (8.9.3/8.9.3) with ESMTP id LAA55766
for <pups(a)minnie.cs.adfa.edu.au>; Tue, 27 Feb 2001 11:15:33 +1100 (EST)
(envelope-from wkt(a)henry.cs.adfa.edu.au)
Received: (from wkt@localhost)
by henry.cs.adfa.edu.au (8.11.2/8.9.3) id f1R0IOT10330;
Tue, 27 Feb 2001 11:18:24 +1100 (EST)
(envelope-from wkt)
From: Warren Toomey <wkt(a)henry.cs.adfa.edu.au>
Message-Id: <200102270018.f1R0IOT10330(a)henry.cs.adfa.edu.au>
Subject: Re: [pups] Forks under V6
In-Reply-To: <200102262353.KAA55588(a)minnie.cs.adfa.edu.au> from Norman Wilson
at "Feb 26, 2001 06:49:13 pm"
To: Norman Wilson <norman(a)nose.cs.utoronto.ca>
Date: Tue, 27 Feb 2001 11:15:44 +1100 (EST)
CC: PDP-11 Unix Preservation Society <pups(a)minnie.cs.adfa.edu.au>
Reply-To: wkt(a)cs.adfa.edu.au
X-Mailer: ELM [version 2.4ME+ PL68 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: owner-pups(a)minnie.cs.adfa.edu.au
Precedence: bulk
In article by Norman Wilson:
I believe the practice John Holden describes from
Mini-UNIX (only one
process in memory at a time, hence a context switch is the same as a
swap) was also part of the very earliest UNIXes, on the PDP-7 and the
11/20, neither of which had hardware memory management. Dennis Ritchie's
`Evolution of the UNIX Time-Sharing System' paper (in the October 1984
Bell Labs Technical Journal, the second issue to be devoted entirely to
UNIX), tells how it worked in some detail. It wouldn't surprise me if
the swap-to-fork mechanism lived on for a while even after the system
learned about memory management, but I don't actually know that. (Warren:
wbat does the old system you have do?)
Norman Wilson
For the versions on the 11/20 [that's V1, V2 and V3], as there was no
memory protection, there was only 1 process in core at any time. Thus,
the parent was definitely swapped out.
The Nsys kernel (just before V4) also swaps the parent out:
newproc()
{
/*
* make proc entry for new proc
*/
/*
* swap out old process
* to make image of new proc
*/
}
(
http://minnie.cs.adfa.edu.au/UnixTree/Nsys/sys/nsys/ken/slp.c.html)
We don't have kernel source for V4 :-(. It looks like V5 also swaps
the parent out:
http://minnie.cs.adfa.edu.au/UnixTree/V5/usr/sys/ken/slp.c.html
By V6, the parent could stay in core if there was enough room:
newproc()
{
/*
* If there is not enough core for the
* new process, swap out the current process to generate the
* copy.
*/
if(a2 == NULL) {
savu(u.u_ssav);
xswap(rpp, 0, 0);
} else {
/*
* There is core, so just copy.
*/
rpp->p_addr = a2;
while(n--) copyseg(a1++, a2++);
}
u.u_procp = rip;
return(0);
}
(
http://minnie.cs.adfa.edu.au/UnixTree/V6/usr/sys/ken/slp.c.html)
I've omitted some lines of code here and there.
Warren
Received: (from major@localhost)
by minnie.cs.adfa.edu.au (8.9.3/8.9.3) id OAA56632
for pups-liszt; Tue, 27 Feb 2001 14:06:49 +1100 (EST)
(envelope-from owner-pups(a)minnie.cs.adfa.edu.au)
From John Holden <johnh(a)psych.usyd.edu.au> Tue
Feb 27 13:02:55 2001
Received: from psychwarp.psych.usyd.edu.au
(psychwarp.psych.usyd.edu.au [129.78.83.26])
by minnie.cs.adfa.edu.au (8.9.3/8.9.3) with ESMTP id OAA56628
for <pups(a)minnie.cs.adfa.edu.au>; Tue, 27 Feb 2001 14:06:45 +1100 (EST)
(envelope-from johnh(a)psychwarp.psych.usyd.edu.au)
Received: (from johnh@localhost)
by psychwarp.psych.usyd.edu.au (8.9.1a/8.9.1) id OAA31721
for pups(a)minnie.cs.adfa.edu.au; Tue, 27 Feb 2001 14:02:55 +1100 (EST)
Date: Tue, 27 Feb 2001 14:02:55 +1100 (EST)
From: John Holden <johnh(a)psych.usyd.edu.au>
Message-Id: <200102270302.OAA31721(a)psychwarp.psych.usyd.edu.au>
To: pups(a)minnie.cs.adfa.edu.au
Subject: Re: [pups] 2.11BSD boot hangs.
Sender: owner-pups(a)minnie.cs.adfa.edu.au
Precedence: bulk
On BA-23 boxes, there is a small, two lever DIP switch. Switch 1 in the
ON position (down) enables BEVENT on the Qbus. Without it enabled, there
will no line time clock interrupts generated, even if the LTC register at
777546 in enabled.
The second switch enables the 'restart' button when ON. Pressing
'restart'
starts a powerup sequence, running diagnostics and starting ODT or the
bootstrap (equivalent to cycling the power).
On the earlier BA-11 series boxes for the LSI-11 (and /23), there was an
equivalent switch on the front panel labeled "Aux". It could be used either to
enable the BEVENT or the remote switch for the cabinet power controller. The
11/23plus, 11/53/73 have programable LTC registers, so the switch is normally
left on. On the LSI-11,/2 and early 11/23, you would initially boot the machine
with it off, then enable it.
As for machines hanging without the LTC running, the problem is that the
scheduler (sched) never gets to run, since it sleeps waiting for the 'lbolt'
flag that is only ever set in the clock interrupt service routine. The timeout
queue also doesn't run, so only the internal 'init' process will ever get
to run
PS
You can run into problems with the BHALT line, which can be asserted by a line
break on the console line (if enabled), or on some DHV serial card emulations.
Turning off a terminal may be enough to halt the process if it generates a
serial break as the power goes down.
Received: (from major@localhost)
by minnie.cs.adfa.edu.au (8.9.3/8.9.3) id OAA57000
for pups-liszt; Tue, 27 Feb 2001 14:58:23 +1100 (EST)
(envelope-from owner-pups(a)minnie.cs.adfa.edu.au)
From Jay Jaeger <cube1(a)home.com> Tue Feb 27
13:50:59 2001
Received: from
mail2.rdc1.il.home.com (
mail2.rdc1.il.home.com
[24.2.1.77])
by minnie.cs.adfa.edu.au (8.9.3/8.9.3) with ESMTP id OAA56996
for <pups-digest(a)minnie.cs.adfa.edu.au>; Tue, 27 Feb 2001 14:58:19 +1100 (EST)
(envelope-from cube1(a)home.com)
Received: from
ddjay.home.com ([65.3.254.22]) by
mail2.rdc1.il.home.com
(InterMail vM.4.01.03.00 201-229-121) with ESMTP
id <20010227035419.WQFR26655.mail2.rdc1.il.home.com(a)ddjay.home.com>;
Mon, 26 Feb 2001 19:54:19 -0800
Message-Id: <4.3.2.7.2.20010226213702.04607d00@cirithi>
X-Sender: cube1@cirithi
X-Mailer: QUALCOMM Windows Eudora Version 4.3.2
Date: Mon, 26 Feb 2001 21:50:59 -0600
To: pups-digest(a)minnie.cs.adfa.edu.au
From: Jay Jaeger <cube1(a)home.com>
Subject: Re: [pups] Swap device in V6?
Cc: kwellsch(a)tampabay.rr.com, johnh(a)psych.usyd.edu.au
In-Reply-To: <200102262232.JAA55097(a)minnie.cs.adfa.edu.au>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Sender: owner-pups(a)minnie.cs.adfa.edu.au
Precedence: bulk
In case someone didn't put 2+2 together... The V6 distribution has various
unix kernels. I don't recall for sure which kernel is linked to /unix, but
for sure it is only one of them.
So, if /rpunix is linked to /unix, and you boot rkunix, and then do a ps,
it will search /unix for the symbol for swapdev, look for the RP device in
/dev, and not find one. no swap dev.
The cure is, of course, quite simple:
# chdir /
# ln rkunix unix
And ps will now work fine.
[ Ian might have gotten this directly had he not hidden his real e-mail
address... ;-) ]
Jay Jaeger
At 09:32 AM 2/27/01 +1100, you wrote:
Date: Sun, 25 Feb 2001 23:49:22 -0800
From: "Ian King" <iking(a)killthewabbit.org>
Subject: [pups] Swap device in V6?
This is a multi-part message in MIME format.
- ------=_NextPart_000_0007_01C09F85.94050E80
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I'm working with the install image provided by Ken Wellsch, and when I =
execute the 'ps' command I get an error that says "no swap device".
I'm =
------------------------------
Date: Mon, 26 Feb 2001 10:27:12 -0800
From: Ian King <iking(a)microsoft.com>
Subject: RE: [pups] Swap device in V6?
I, too, have /dev/rk0 mknod'ed as 0,0. Relaetd to this, ps does something
odd (at least to my experience) with the open() system call - it calls 'open
("/dev")', without a second argument for mode; that seems like a no-no in
C,
- -----Original Message-----
From: Ken Wellsch [mailto:kwellsch@tampabay.rr.com]
Sent: Monday, February 26, 2001 9:52 AM
To: Roger Ivie
Cc: PUPS(a)minnie.cs.adfa.edu.au
Subject: Re: [pups] Swap device in V6?
The "ps" command source appears to be poking around /dev looking for a
block device that matches the kernel value for swapdev (or something like
that) and confirming it is a block device.
Yet I see I have /dev/rk0 mknod'ed 0/0 and it is a block device but "ps"
still gripes about "no swap device."
So I'm missing something I guess.
Date: Tue, 27 Feb 2001 08:44:23 +1100 (EST)
From: John Holden <johnh(a)psych.usyd.edu.au>
Subject: Re: [pups] Swap device in V6?
<< snip >>
The 'ps' command looks up the symbol table of
the unix kernel, and gets
the device entry for swap (_swapdev), and the process table (_proc)
It would open /dev as file, and read the directory entries to find a matching
device entry, so it then had the name of a device to open (you cannot open
a device based only in the major and minor device entries from a user
process).
It also uses /dev to decode tty entries into names.
For 'ps' to work correctly, /unix had to be linked to the real kernel, say
rkunix.
---
Jay R. Jaeger The Computer Collection
cube1(a)home.com visit
http://members.home.net/thecomputercollection
Received: (from major@localhost)
by minnie.cs.adfa.edu.au (8.9.3/8.9.3) id WAA58909
for pups-liszt; Tue, 27 Feb 2001 22:07:53 +1100 (EST)
(envelope-from owner-pups(a)minnie.cs.adfa.edu.au)
From Martijn van Buul <pino(a)dohd.org> Tue Feb 27
21:03:54 2001
Received: from mud.stack.nl (mud.stack.nl [131.155.141.98])
by minnie.cs.adfa.edu.au (8.9.3/8.9.3) with ESMTP id WAA58905
for <pups(a)minnie.cs.adfa.edu.au>; Tue, 27 Feb 2001 22:07:49 +1100 (EST)
(envelope-from martijnb(a)stack.nl)
Received: by mud.stack.nl (Postfix, from userid 587)
id 47EB97F14; Tue, 27 Feb 2001 12:03:54 +0100 (CET)
Date: Tue, 27 Feb 2001 12:03:54 +0100
From: Martijn van Buul <pino(a)dohd.org>
To: pups(a)minnie.cs.adfa.edu.au
Subject: Re: [pups] 2.11BSD boot hangs.
Message-ID: <20010227120354.A9872(a)mud.stack.nl>
Reply-To: Martijn van Buul <pino(a)dohd.org>
References: <200102270302.OAA31721(a)psychwarp.psych.usyd.edu.au>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.3i
In-Reply-To: <200102270302.OAA31721(a)psychwarp.psych.usyd.edu.au>; from
johnh(a)psych.usyd.edu.au on Tue, Feb 27, 2001 at 02:02:55PM +1100
Sender: owner-pups(a)minnie.cs.adfa.edu.au
Precedence: bulk
John Holden wrote:
You can run into problems with the BHALT line, which
can be asserted by a line
break on the console line (if enabled), or on some DHV serial card emulations.
Turning off a terminal may be enough to halt the process if it generates a
serial break as the power goes down.
On my /53+ running 2.11, it's enough to kick in ODT.. Very anoying, really.
Is there any way to disable this functionality, save rewiring the backplane?
--
Martijn van Buul - Pino(a)dohd.org -
http://www.stack.nl/~martijnb/
Geek code: G-- - Visit OuterSpace: mud.stack.nl 3333
Kees J. Bot: The sum of CPU power and user brain power is a constant.
Received: (from major@localhost)
by minnie.cs.adfa.edu.au (8.9.3/8.9.3) id EAA61301
for pups-liszt; Wed, 28 Feb 2001 04:43:03 +1100 (EST)
(envelope-from owner-pups(a)minnie.cs.adfa.edu.au)
From "Ian King" <iking(a)microsoft.com>
Wed Feb 28 02:56:06 2001
Received: from
mail4.microsoft.com (
mail4.microsoft.com
[131.107.3.122])
by minnie.cs.adfa.edu.au (8.9.3/8.9.3) with SMTP id EAA61297
for <pups-digest(a)minnie.cs.adfa.edu.au>; Wed, 28 Feb 2001 04:42:46 +1100 (EST)
(envelope-from iking(a)microsoft.com)
Received: from 157.54.9.101 by
mail4.microsoft.com (InterScan E-Mail VirusWall NT); Tue,
27 Feb 2001 08:56:20 -0800 (Pacific Standard Time)
Received: from
red-msg-06.redmond.corp.microsoft.com ([157.54.12.71]) by
inet-imc-01.redmond.corp.microsoft.com with Microsoft SMTPSVC(5.0.2195.1600);
Tue, 27 Feb 2001 08:55:28 -0800
X-MimeOLE: Produced By Microsoft Exchange V6.0.4418.65
content-class: urn:content-classes:message
Subject: RE: [pups] Swap device in V6?
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Date: Tue, 27 Feb 2001 08:56:06 -0800
Message-ID:
<8D25F244B8274141B5D313CA4823F39C018EEC0A(a)red-msg-06.redmond.corp.microsoft.com>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: [pups] Swap device in V6?
Thread-Index: AcCgdE7qokpl8pfARPebGWEtnq6FUgAaQ5uQ
From: "Ian King" <iking(a)microsoft.com>
To: "Jay Jaeger" <cube1(a)home.com>,
<pups-digest(a)minnie.cs.adfa.edu.au>
Cc: <kwellsch(a)tampabay.rr.com>, <johnh(a)psych.usyd.edu.au>
X-OriginalArrivalTime: 27 Feb 2001 16:55:28.0605 (UTC) FILETIME=[1670D0D0:01C0A0DE]
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by minnie.cs.adfa.edu.au id EAA61298
Sender: owner-pups(a)minnie.cs.adfa.edu.au
Precedence: bulk
The good news is, this fixed my ps problem - ps now works. The bad news
is that cc still fails with the following error:
fFatal error in /lib/c0
The lowercase f appears, followed shortly by the rest of the line. I've
tried the -c option to suppress linking, and still get this error. I
don't get this error on the Supnik emulator.
Obviously, one way to do things would be to rebuild the kernel on the
emulator, and transfer it to the PDP-11. But that seems like cheating.
:-) Besides, the Supnik emulator is just too freeform; my 11/34a
doesn't have a half-dozen instructions the emulator implements. I've
tried the DBit E11 emulator (since it gives more control over processor
features), but I can't get it to boot these images. -- Ian
-----Original Message-----
From: Jay Jaeger [mailto:cube1@home.com]
Sent: Monday, February 26, 2001 7:51 PM
To: pups-digest(a)minnie.cs.adfa.edu.au
Cc: kwellsch(a)tampabay.rr.com; johnh(a)psych.usyd.edu.au
Subject: Re: [pups] Swap device in V6?
In case someone didn't put 2+2 together... The V6 distribution has
various
unix kernels. I don't recall for sure which kernel is linked to /unix,
but
for sure it is only one of them.
So, if /rpunix is linked to /unix, and you boot rkunix, and then do a
ps,
it will search /unix for the symbol for swapdev, look for the RP device
in
/dev, and not find one. no swap dev.
The cure is, of course, quite simple:
# chdir /
# ln rkunix unix
And ps will now work fine.
[ Ian might have gotten this directly had he not hidden his real e-mail
address... ;-) ]
Jay Jaeger
At 09:32 AM 2/27/01 +1100, you wrote:
Date: Sun, 25 Feb 2001 23:49:22 -0800
From: "Ian King" <iking(a)killthewabbit.org>
Subject: [pups] Swap device in V6?
This is a multi-part message in MIME format.
- ------=_NextPart_000_0007_01C09F85.94050E80
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I'm working with the install image provided by Ken Wellsch, and when I
=
execute the 'ps' command I get an error that
says "no swap device".
I'm =
------------------------------
Date: Mon, 26 Feb 2001 10:27:12 -0800
From: Ian King <iking(a)microsoft.com>
Subject: RE: [pups] Swap device in V6?
I, too, have /dev/rk0 mknod'ed as 0,0. Relaetd to this, ps does
something
odd (at least to my experience) with the open() system
call - it calls
'open
("/dev")', without a second argument for
mode; that seems like a no-no
in C,
- -----Original Message-----
From: Ken Wellsch [mailto:kwellsch@tampabay.rr.com]
Sent: Monday, February 26, 2001 9:52 AM
To: Roger Ivie
Cc: PUPS(a)minnie.cs.adfa.edu.au
Subject: Re: [pups] Swap device in V6?
The "ps" command source appears to be poking around /dev looking for a
block device that matches the kernel value for swapdev (or something
like
that) and confirming it is a block device.
Yet I see I have /dev/rk0 mknod'ed 0/0 and it is a block device but
"ps"
still gripes about "no swap device."
So I'm missing something I guess.
Date: Tue, 27 Feb 2001 08:44:23 +1100 (EST)
From: John Holden <johnh(a)psych.usyd.edu.au>
Subject: Re: [pups] Swap device in V6?
<< snip >>
The 'ps' command looks up the symbol table of
the unix kernel, and gets
the device entry for swap (_swapdev), and the process table (_proc)
It would open /dev as file, and read the directory entries to find a
matching
device entry, so it then had the name of a device to
open (you cannot
open
a device based only in the major and minor device
entries from a user
process).
It also uses /dev to decode tty entries into names.
For 'ps' to work correctly, /unix had to be linked to the real kernel,
say
rkunix.
---
Jay R. Jaeger The Computer Collection
cube1(a)home.com visit
http://members.home.net/thecomputercollection
Received: (from major@localhost)
by minnie.cs.adfa.edu.au (8.9.3/8.9.3) id FAA61575
for pups-liszt; Wed, 28 Feb 2001 05:32:00 +1100 (EST)
(envelope-from owner-pups(a)minnie.cs.adfa.edu.au)
From Jay Jaeger [mailto:cube1@home.com] Wed Feb 28
04:27:56 2001
Received: from
chiton.ucsd.edu (
chiton.ucsd.edu [192.135.238.128])
by minnie.cs.adfa.edu.au (8.9.3/8.9.3) with ESMTP id FAA61571
for <pups(a)minnie.cs.adfa.edu.au>; Wed, 28 Feb 2001 05:31:57 +1100 (EST)
(envelope-from cdl(a)mpl.ucsd.edu)
Received: (from cdl@localhost)
by
chiton.ucsd.edu (8.9.3/8.9.3) id KAA16090
for pups(a)minnie.cs.adfa.edu.au; Tue, 27 Feb 2001 10:27:56 -0800 (PST)
Date: Tue, 27 Feb 2001 10:27:56 -0800 (PST)
From: Carl Lowenstein <cdl(a)mpl.ucsd.edu>
Message-Id: <200102271827.KAA16090(a)chiton.ucsd.edu>
To: pups(a)minnie.cs.adfa.edu.au
Subject: Re: [pups] 2.11BSD boot hangs.
Sender: owner-pups(a)minnie.cs.adfa.edu.au
Precedence: bulk
From owner-pups(a)minnie.cs.adfa.edu.au Mon Feb 26 13:32
PST 2001
From: jkunz(a)unixag-kl.fh-kl.de
Date: Mon, 26 Feb 2001 22:15:52 +0100 (CET)
Subject: Re: [pups] 2.11BSD boot hangs.
To: sms(a)moe.2bsd.com
cc: pups(a)minnie.cs.adfa.edu.au
System
configuration:
11/73 (M8192), one with FP accel. or one without. (Jumpers W1..W6 in,
W7..W9 out, so that the CPU enters ODT at power up.)
There is a jumper (I forget which one) that enables/disables the
'halt' instruction.
BINGO! Pulling W5 solved the problem. But then I
seted it again to
double check. (I changed location today and took only the cards and
disk with me.) In the "new" BA23 the system runs even with the W5
jumper installed. Then I noticed the different setting of the front
panel DIP swich. The upper switch is off and the lower on. The switches
of the other cabinet are both on. If I boot the machine with W5
installed and the upper switch on it hangs. It continues to run
immediately if it is switched off. What is the purpose of this
switches?
Quote from _Microcomputer Products Handbook_ EB26078 41/85 (DEC)
"Control Panel
. . .
The 2-position linetime clock (LTC) switch (switch 1) is used to enable
or disable the LTC function. Setting switch 1 ON enables the LTC to
function under software control. Setting switch 1 to the OFF position
disables the LTC function. The other 2-position switch (switch 2) is
not used."
Note (by me) this refers to microPDP usage of the BA23. The LTC is not
used by the microVAX which could occupy the same box.
carl