Someone on one of these lists seems to be at ok-labs.com; well...
aneurin% host ok-labs.com
;; connection timed out; no servers could be reached
aneurin%
Houston, we have a problem... Could whoever is responsible please
sprinkle some fairy dust somewhere?
Thanks.
-- Dave
Does anybody know how much memory was configured on the PDP-11 that
Lion's used for the commentary system. Here's what the book says about
the system:
; from lions, page 1
; The code selection presumes a "model" system consisting of:
; PDP11/40 processor;
; RK05 disk drives;
; LP11 line printer;
; PC11 paper tape reader/punch;
; KL11 terminal interface.
I usually add the mag tape, too
; TM10 magnetic tape - not in lions, but super handy
It seems like he must have had an MMU and 128k memory, but I don't know.
I'm hoping y'all remember, know, or can otherwise divine the correct
value. I've run with no MMU - crash on boot. I've also run with less
memory, but then cc won't build mkconf, when I have the TM10 enabled
kernel loaded. As a reminder, his book was published in 1977.
Thanks,
Will
> From: Will Senn
> Does anybody know how much memory was configured on the PDP-11 that
> Lion's used for the commentary system. Here's what the book says about
> the system:
> ..
> ; PDP11/40 processor;
> ...
> It seems like he must have had an MMU
V6 absolutely requires an MMU; the need for it is all throughout basic
attributes of the system - e.g. user processes start their address space at 0.
(BTW, there are V6 descendants, MINI-UNIX:
http://gunkies.org/wiki/MINI-UNIX
and LSX, which don't use/need an MMU, and run on -11 models without memory
managament, such as -11/05's, but I don't think they were in wide use outside
Bell.)
> and 128k memory
The -11/40, as originally released, only supported the MM11-L, which came in
multiples of 16KB (for a 3-board set). Use of the later MM11-U (32KB units)
required a new main power harness, which only came in on
higher-serial-numbered -11/40's.
The -11/40 (as it was at first) that I had at LCS had, to start with, I'm
pretty sure, 3 MM11-L units (i.e. one MM11-L backplane full) - i.e. 48KB. I
know this sounds incredible, and I'm having a hard time believing it myself,
wondering if my memory is failing with age; but it definitely had
extraordinarily little.
I just looked on my V6 (running in a simulator), and it appears that by
trimming all parameters (e.g. number of disk buffers) to the absolute bone,
the kernel could be trimmed to about 36KB. (I haven't actually tried it,
since I don't feel like recompiling all the kernel modules, but one can
estimate it - take the current system size [44KB], delete 10 buffers @ .5KB
gives 39KB, etc, etc.)
That would allow a maximum user process of 12KB on a 48KB machine - and
MINI-UNIX, which runs basically stock V6 user code, can manage with user
processes that small.
I see Andrew's email which reports that the Lions machine had more main
memory, 128KB (maybe 4 MM11-U's - two MM11-U backplanes full); that
woould have made their life a lot easier.
Noel
> The X11 tree was a heavily ifdef-ed. And it needed to be, I don't have
> an answer as to how you would reuse all that code on different hardware
> in a better way.
Plan 9 did it with #include. The name of the included file was the same for
every architecture. Only the search path for include files changed. Done with
care, this eliminates the typical upfront #ifdefs.that define constants and set
flags.
Other preprocessor conditionals can usually be replaced by a regular if, letting
the compiler optimize away the unwanted alternative. This makes conditionals
obey the scope rules of C.
Doug
6th Edition used the Thompson shell as /bin/sh. I don't think it had
those capabilities. Sometimes you could find an early version of the
Bourne shell in /bin/nsh (new shell) in v6.
The 7th Edition made the Bourne shell /bin/sh. And there sometimes
you could find the Thompson shell in /bin/osh (old shell).
Will Senn wrote:
> Login commands question:
>
> I'm sure it's simple, but I can't figure it out. How do I get something
> to run at login in v6? Right now, I use ed to create a file 'setprof'
> that contains:
>
> stty erase[space][backspace][return]
> stty nl0 cr0
>
> Then after logging in:
>
> sh setprof
>
> It works, but, it is pretty clunky.
>
> stty question:
>
> So, I looked at stty.c and it looks like the following should work, if
> the terminal is sending ^H for backspace:
>
> #define BS0 0
> #define BS1 0100000
>
> modes[]
> ...
> "bs0",
> BS0, BS1,
>
> "bs1",
> BS1, BS1,
>
>
> but:
>
> stty bs0
> or
> stty bs1
>
> don't result in proper backspace handling..
>
> but:
>
> stty[space][^h][return]
>
>
> works...
>
> Thoughts?
Login commands question:
I'm sure it's simple, but I can't figure it out. How do I get something
to run at login in v6? Right now, I use ed to create a file 'setprof'
that contains:
stty erase[space][backspace][return]
stty nl0 cr0
Then after logging in:
sh setprof
It works, but, it is pretty clunky.
stty question:
So, I looked at stty.c and it looks like the following should work, if
the terminal is sending ^H for backspace:
#define BS0Â Â Â Â 0
#define BS1Â Â Â Â 0100000
modes[]
...
       "bs0",
       BS0, BS1,
       "bs1",
       BS1, BS1,
but:
stty bs0
or
stty bs1
don't result in proper backspace handling..
but:
stty[space][^h][return]
works...
Thoughts?
> From: Clem Cole
> what I don't remember was it in v5
Your memory is going! :-) We discussed this recently (well, recently in _our_
timescale :-); it's built into in 'cc' in V5:
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/cc.c
see "expand(file)".
Noel
> From: Will Senn
> My question is - how did y'all run things - with CSR zero and no kernel
> messages ... or with CSR non-zero and kernel messages.
On the -11/45 V6+ at MIT, we didn't have a printing terminal on the console,
just a VT52. We had a tool at MIT called 'dmesg':
http://ana-3.lcs.mit.edu/~jnc/tech/unix/man8/dmesg.8
which made up for that a bit.
We normally ran with the CSR set to 173030 - the 'boot in single-user'
setting. That's because at one point the machine was in the 9th floor machine
room, but the console VT52 was on the 5th floor (where our offices were - the
famous print of the GE-645 Multics was on the hallway wall outside mine :-),
and I'd added a 'reboot()' system call (nothing fancy, it just jumped to the
bootstrap ROM), so we could reboot the machine without going up in the
elevator (not if it had crashed, of course). Later on, after we'd done with
kernel hacking (adding a network interface, and IP), and the machine stayed up
for long periods, we moved the console up next to the machine (since if it
crashed, you had to use the front panel to restart it, so you had to be up
there anyway); we stayed with the default CSR setting, though. (If it panic'd,
you could see the reason why when you went to reboot it.)
> Oh, BTW, I know I've seen this noted elsewhere, but I can't remember
> where.
Maybe at:
https://gunkies.org/wiki/UNIX_Sixth_Edition#Distros
which discusses it?
Noel
I noticed in v6 source that putch in prf.c - the system kernel printf's
character routine, only prints to the console if the Console Switch
Register is non-zero.
My question is - how did y'all run things - with CSR zero and no kernel
messages (seems dangerous to me, being naive and all) or with CSR
non-zero and kernel messages.
On my FreeBSD instance, I value the messages that show up on console as
they've alerted me to big problems in the past, but on my Mac, not as
much (sure you can run Console and see them, but they aren't immediate).
Oh, BTW, I know I've seen this noted elsewhere, but I can't remember
where. Dennis's v6 doesn't have the Western Electric message:
mem = 435
RESTRICTED RIGHTS
Use, duplication or disclosure is subject to
restrictions stated in Contract with Western
Electric Company, Inc.
It was a bit of a head scratcher as I was trying to read from the Dennis
version of the distro on my mac while running Wellsch's tape on simh. I
spent quite a while spinning my wheels looking for "Western" in the
files to no avail. I thought something was screwy with the files or my mac.
All,
I got sick of poring over my Peer-to-Peer communications version of
Lion's commentary - trying to read it while digging around in v6 was
getting annoying. Of course, if you don't already own, rush out and by a
copy. It's great stuff. Anyhow, the problem is that it's perfect bound,
landscape and it's not searchable. Hunting around the internet, I found
pdfs that were searchable, but they were based on v7 being
back-engineered to v6 code. So, I located a decent source of
electronically readable Lion's source at
https://warsus.github.io/lions-/ and off I went. I took the code and did
a bit (quite a bit) of tweakage on it to get it formatted in pdf, and
created a version in letter format that I find pretty useful. It can be
read from a printout while messing around in v6. I've done some
proofing, but I don't claim it's perfect. If you find any issues with
it, let me know and I'll try to fix them (thanks, Clem for early
suggestions).
Here's what's in the letter sized pdf:
Tweaked Cover Page
Improved Table of Contents
Lion's version of V6 Source Code
Appendices
   Source File Sheets Alphabetical List
   Source File Locations in Running V6 System
What isn't in the pdf:
Original Forewords, Prefaces, or Letters (not needed for coding)
Symbol Lists, Cross references, or Indexes (beyond my skills at the moment)
All in all, I have found it quite readable and useful for my own work. I
don't claim any ownership or contribution, other than in improving the
readability of the work for modern readers. If the cross reference thing
kills you, just use gnu ctags on the source directories and ctags -x for
the line numbers.
Here's the link to the posting:
http://decuser.blogspot.com/2022/02/tweaked-version-of-lions-v6-source-code…
- will