On 2017-06-07 19:01, "Ron Natalie"<ron(a)ronnatalie.com> wrote:
> The original FORTRAN and BASIC arrays started indexing at one because everybody other than computer scientists start counting at 1.
FORTRAN, yes. BASIC (which dialect might we be talking about?) normally
actually start with 0. However, BASIC is weird, in that the DIM
statement is actually specifying the highest usable index, and not the
size of the array.
Thus:
DIM X(10)
means you get an array with 11 elements. So, people who wanted to use
array starting at 1 would still be happy, and if you wanted to start at
0, that also worked. You might unintentionally have a bit of wasted
memory, though.
> These languages were for scientists and the beginner, so you wanted to make things compatible with their normal concepts.
True.
> PASCAL on the other hand required you to give the minimum and maximum index for the array.
In a way, PASCAL makes the most sense. You still what range you want,
and you get that. Anything works, and it's up to you.
That said, PASCAL could get a bit ugly when passing arrays as arguments
to functions because of this.
> Of course, C’s half-assaed implementation of arrays kind of depends on zero-indexing to work.
:-)
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
On 2017-06-07 22:14, "Walter F.J. Mueller"<w.f.j.mueller(a)retro11.de> wrote:
> Hi,
>
> a few remarks on the feedback on the kernel panic after a 'here document' in tcsh.
>
> To Michael Kjörling question:
> > I'm curious whether the same thing happens if you try that in some
> > other shell? (Not sure how widely here documents were supported back
> > then, but I'm asking anyway.)
> And Johnny Billquist remark
> > Not sure if any of the other shells have this.
>
> 'here documents' are available and work fine in sh and csh.
> And are in fact used, examples
Ah. Thanks. Too lazy to check.
> To Michael Kjörling remark
> > The PC value in the panic report ("pc 161324") strikes me as high
> and Johnny Billquist remark
> > This is in kernel mode, and that is in the I/O page.
>
> 211bsd uses split I/D space and uses all 64 kB I space for code.
D'oh! Color me stupid. I should have thought of that.
> The top 8 kB are in fact the overlay area, and the crash happened
> in overlay 4 (as indicated by ov 4). With a simple
>
> nm /unix | sort | grep " 4"
>
> one gets
>
> 161254 t ~psignal 4
> 162302 t ~issignal 4
>
> so the crash is just 050 bytes after the entry point of psignal. So the
> PC address is fine and not the problem. For psignal look at
>
> http://www.retro11.de/ouxr/211bsd/usr/src/sys/sys/kern_sig.c.html#s:_psignal
>
> the crash must be one of the first lines. psignal is an internal kernel
> function, called from
>
> http://www.retro11.de/ouxr/211bsd/usr/src/sys/sys/kern_sig.c.html#xref:s:_p…
>
> and has nothing to do with the libc function psignal
>
> http://www.retro11.de/ouxr/211bsd/usr/man/cat3/psignal.0.html
> http://www.retro11.de/ouxr/211bsd/usr/src/lib/libc/gen/psignal.c.html
The libc function would be in user mode, so that one was pretty clear.
Ok. Digging through this a little for real then.
psignal gets called with a signal from the trap handler. The actual
signal is weird. It would appear to be 0160750, which would be -7704 if
I'm counting right. That does not make sense as a signal.
The psignal code pulls a value based on the signal number, which is the
line:
prop = sigprop[sig];
which uses the signal number as an index. With a random, weird signal
number, this access wherever that might end up. Which is when you get
the crash.
On my system, sigprop is at address 0012172, which, with a signal of
-7704 ends up at address 0173142, which by (un)luck happens to be in the
middle of the diagnostics bootstrap rom space. So I don't get a Unibus
timeout error, while you do. Probably because sigprop is at a slightly
different address in your kernel.
So, the real question is how trap can be calling psignal with such a
broken signal number.
I might dig further down that question another day. But unless you
already got this far, I might have saved you a few minutes of digging. I
did start looking into the trap code, which is in pdp/trap.c, but this
is not entirely straight forward. It goes through a bunch of things
trying to decide what signal to send, before actually calling psignal.
> To Johnny Billquist remark
> > Could you (Walter) try the latest version of 2.11BSD and see if you
> > still get that crash?
>
> very interesting that you see a core dump of tcsh rather a kernel panic.
Indeed.
> Whatever tcsh does, it should not lead to a kernel panic, and if it does,
> it is primarily a bug of the kernel. It looks like there are two issues,
> one in tcsh, and one in the kernel. I've a hunch were this might come from,
> but that will take a weekend or two to check on.
Agree that the kernel should not crash on this.
Also, tcsh should not really crash either, but it's a separate issue,
even though one might have triggered the other here.
But yes, there are two bugs in here.
If you can recreate the kernel crash on the latest version, that would
be good.
But it smells like trap.c have some path where it does not even set what
signal to deliver, and then calls psignal with whatever the variable i
got at the function start. Which would be some random stuff on the stack.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
On 2017-06-08 22:17, Dave Horsfall<dave(a)horsfall.org> wrote:
>
> Just to diverge from this thread a little, it probably isn't all that
> remarkable that programming languages tend to reflect the hardware for
> which they were designed.
>
> Thus, for example, we have the C construct:
>
> do { ... } while (--i);
>
> which translated right into the PDP-11's "SOB" instruction (and
> reminiscent of FORTRAN's insistence that DO loops are run at least once
> (there was a CACM article about that once; anyone have a pointer to it?)).
>
> And of course the afore-mentioned FORTRAN, which really reflects the
> underlying IBM 70x architecture (shudder).
FORTRAN stopped running the loops at least once already with FORTRAN 77.
The last who insisted on running loops at least once was FORTRAN IV.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
I learned the other day that array indexes in some languages start at 1
instead of 0. This seems to be an old trend that changed around the 70s?
Who started this? Why was the change made?
It seems to have come about around the same time as C, but interestingly
enough Lua is kinda in between (you can start an array at 0 or 1).
Smalltalk can probably have a 0 base index just by it's nature, but I
wonder whether that would work in a 40 year old interpreter.
> Basically, until C came along, the standard practice was for indices
> to start at 1. Certainly Fortran and Pascal did it that way.
Mercury Autocode used 0.
http://www.homepages.ed.ac.uk/jwp/history/mercury/manual/autocode/4.jpg
-- Richard
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
Hi,
a few remarks on the feedback on the kernel panic after a 'here document' in tcsh.
To Michael Kjörling question:
> I'm curious whether the same thing happens if you try that in some
> other shell? (Not sure how widely here documents were supported back
> then, but I'm asking anyway.)
And Johnny Billquist remark
> Not sure if any of the other shells have this.
'here documents' are available and work fine in sh and csh.
And are in fact used, examples
/usr/adm/daily (a /bin/sh script)
su uucp << EOF
/etc/uucp/clean.daily
EOF
/usr/crash/why (a /bin/csh script)
adb -k {unix,core}.$1 << 'EOF'
version/sn"Backtrace:"n
$c
'EOF'
To Michael Kjörling remark
> The PC value in the panic report ("pc 161324") strikes me as high
and Johnny Billquist remark
> This is in kernel mode, and that is in the I/O page.
211bsd uses split I/D space and uses all 64 kB I space for code.
The top 8 kB are in fact the overlay area, and the crash happened
in overlay 4 (as indicated by ov 4). With a simple
nm /unix | sort | grep " 4"
one gets
161254 t ~psignal 4
162302 t ~issignal 4
so the crash is just 050 bytes after the entry point of psignal. So the
PC address is fine and not the problem. For psignal look at
http://www.retro11.de/ouxr/211bsd/usr/src/sys/sys/kern_sig.c.html#s:_psignal
the crash must be one of the first lines. psignal is an internal kernel
function, called from
http://www.retro11.de/ouxr/211bsd/usr/src/sys/sys/kern_sig.c.html#xref:s:_p…
and has nothing to do with the libc function psignal
http://www.retro11.de/ouxr/211bsd/usr/man/cat3/psignal.0.htmlhttp://www.retro11.de/ouxr/211bsd/usr/src/lib/libc/gen/psignal.c.html
To Johnny Billquist remark
> Could you (Walter) try the latest version of 2.11BSD and see if you
> still get that crash?
very interesting that you see a core dump of tcsh rather a kernel panic.
Whatever tcsh does, it should not lead to a kernel panic, and if it does,
it is primarily a bug of the kernel. It looks like there are two issues,
one in tcsh, and one in the kernel. I've a hunch were this might come from,
but that will take a weekend or two to check on.
With best regards, Walter
On 2017-06-06 04:00, Michael Kjörling <michael(a)kjorling.se> wrote:
>
> On 5 Jun 2017 16:12 +0200, from w.f.j.mueller(a)retro11.de (Walter F.J. Mueller):
>> I'm using 211bsd (Version 447) and found that a 'here document' in tcsh
>> leads to a kernel panic. It's absolutely reproducible on my system, both
>> when run it on my FPGA PDP-11 or in simh. Just doing
>>
>> tcsh
>> cat << EOF
> I'm curious whether the same thing happens if you try that in some
> other shell? (Not sure how widely here documents were supported back
> then, but I'm asking anyway.)
Not sure if any of the other shells have this. We're basically talking
csh, sh and ksh unless I remember wrong.
But it's a good question. If noone else have tried it by tomorrow, I
could check.
>> is enough, and I get
>>
>> ka6 31333 aps 147472
>> pc 161324 ps 30004
>> ov 4
>> cpuerr 20
>> trap type 0
>> panic: trap
>> syncing disks... done
>>
>> looking at the crash dump gives
>>
>> cd /etc/crash
>> ./why 4
>> Backtrace:
>> 0147372: _boot(05000,0100) from ~panic+072
>> 0147414: _etext(011350) from ~trap+0350
>> 0147450: ~trap() from call+040
>> 0147516: _psignal(0101520,0160750) from ~trap+0364
>> 0147554: ~trap() from call+040
>>
>> so the crash is in psignal, which is afaik the kernel internal
>> mechanism to dispatch signals.
> The PC value in the panic report ("pc 161324") strikes me as high, but
> 161324 octal is 58068 decimal, so it's not excessively so, and perhaps
> in line with what one might expect to see with a kernel pinned near
> top of memory. Are the offsets in the backtrace constant, i.e. does it
> always crash on the same code?
161324 is way high. This is in kernel mode, and that is in the I/O page.
Basically no code lives in the I/O page (some boot roms and hardware
diagnostics excepted). This smells like corrupted memory (pointer or
stack), or something else very funny.
> Not knowing what cpuerr 20 is specifically doesn't help, and at least
> http://www.retro11.de/ouxr/29bsd/usr/src/sys/sys/trap.c.html#n:112
> (which doesn't seem to be too far from what you are running) isn't
> terribly enlightening; CPUERR is simply a pointer into a memory-mapped
> register of some kind, as seen at
> http://www.retro11.de/ouxr/29bsd/usr/include/sys/iopage.h.html#m:CPUERR,
> and at least pdp11_cpumod.c from the simh source code at
> http://simh.trailing-edge.com/interim/pdp11_cpumod.c wasn't terribly
> enlightening, though of course I could be looking in entirely the
> wrong place.
Like others said - the cpu error register is documented in the processor
handbook.
020 means Unibus Timeout, which is consistent with trying to access
something in the I/O page, where there is no device configured to
respond to that address.
I just tried the same thing on a simh system here, and I do not get a
crash. This on 2.11BSD at patch level 449, running on an emulated 11/94.
I do however get tcsh to crash.
simh:/home/bqt> su -
Password:
erase, kill ^U, intr ^C
# tcsh
simh:/# cat << EOF
Illegal instruction - core dumped
#
Suspended (tty input)
simh:/home/bqt>
simh:/home/bqt> cat /VERSION
Current Patch Level: 448
Date: January 5, 2010
Yes, it says patch level 448, but it really is 449. This was the system
where I worked together with Steven when doing the 449 patch set, but I
never got around to actually updating the VERSION file itself.
Also, this was while running on the console.
Could you (Walter) try the latest version of 2.11BSD and see if you
still get that crash?
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
Hi,
I'm using 211bsd (Version 447) and found that a 'here document' in tcsh
leads to a kernel panic. It's absolutely reproducible on my system, both
when run it on my FPGA PDP-11 or in simh. Just doing
tcsh
cat << EOF
is enough, and I get
ka6 31333 aps 147472
pc 161324 ps 30004
ov 4
cpuerr 20
trap type 0
panic: trap
syncing disks... done
looking at the crash dump gives
cd /etc/crash
./why 4
Backtrace:
0147372: _boot(05000,0100) from ~panic+072
0147414: _etext(011350) from ~trap+0350
0147450: ~trap() from call+040
0147516: _psignal(0101520,0160750) from ~trap+0364
0147554: ~trap() from call+040
so the crash is in psignal, which is afaik the kernel internal
mechanism to dispatch signals.
Questions:
1. has anybody seen this before ?
2. any idea what the reason could be ?
With best regards, Walter
> From: Jacob Ritorto
> Where might one find the list of trap_types
Look in:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.11BSD/sys/pdp/scb.s
which maps from trap vector locations (built into the hardware; consult a
PDP-11 CPU manual for details) to trap type numbers, which are defined here:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.11BSD/sys/pdp/trap.h
and handled here:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.11BSD/sys/pdp/trap.c
> and cpuerrs?
That just prints the contents of the CPU Error Register; see an appropriate
PDP-11 CPU manual - 11/70, /44, /73, /83 or /84 for what all the bits mean.
Also the "KDJ11-A CPU Module User's Guide", which also documents it.
In theory, there's also a KDJ11-B UG, but it's not online. If anyone has one,
can we please get it scanned? Thanks!
Noel
> The people working on TCP/IP did know of the Spider work (like they knew of
> the Cambridge ring work), but it didn't really have any impact; it was a
> totally different direction than the one we were going in.
I'm aware of that, and I think it was the same the other way around. My
interest is tracing how the networking API of Unix developed in the very
early days, and that's were there is a link.
When I asked a few months back why Bell Labs did not jump onto the work
done at UoI, Doug observed that the lab's focus was on Datakit and that
triggered my interest.
>>>> it turns out that the TIU driver was in Warren's repo all along:
>
> V4?! Wow. I'd have never guessed it went that far back.
My current understanding is that Spider development began in 1969 and
that it was first operational in 1972. By '73/'74 it connected a dozen
computers at Murray Hill and Unix had gained basic network programs.
From Sandy Fraser's "Origins of ATM" video lecture I understand that the
Spider learnings included that using a mini to simulate a switch/router
was too slow and too costly, and that doing flow control inside the network
induced avoidable complexity (I guess Fraser/Cerf/Pouzin all learned that
lesson around the same time). The follow-on, custom designed Datakit switch
was to correct these issues.
Work started in 1974 and I guess that prototypes may have been available
around 1978 (when Spider was apparently switched off at Murray Hill).
By 1981 a multi-site Datakit network connected various Bell labs and by
1983 Datakit was introduced as a commercial service.
As to the Spider network API, it currently seems that it was relatively
simple: it exposed the switch as a group of character mode devices, with
the user program responsible for doing all protocol work. Interestingly,
Spider used a high speed DMA based I/O board (DR11-B), whereas the
Datakit switch was apparently connected to a low speed polled I/O board
(DR11-C).
I did not find the Datakit device driver(s) in the V7 source tree (only a
few references in tty.h), so it is hard to be sure of anything. However,
it seems that in V7 the Datakit switch was used as "a fancy modem" so to
speak, supporting the uucp software stack.
There is source for a Datakit driver in the V8 tree, but I currently
have no time to study that (and perhaps it is beyond my scope anyway).
All input and corrections much appreciated.
> From: Paul Ruizendaal
>>> The report I have is: "SPIDER-a data communication experiment"
>>> ...
>>> I think it can be public now, but doing some checks.
OK, that would be great to have online. I _think_ the hardcopy I have
(somewhere! :-) is that report, but my memory should not be trusted.
The people working on TCP/IP did know of the Spider work (like they knew of
the Cambridge ring work), but it didn't really have any impact; it was a
totally different direction than the one we were going in.
>>> it turns out that the TIU driver was in Warren's repo all along:
V4?! Wow. I'd have never guessed it went that far back.
>>> The code calls snstat()
>> The object code for snstat() is in libc.a in the dmr's V5 image.
>> Reconstructed, the source code is here:
>> ...
>> In short, snstat() is a modified stty call
Yes, I looked and found the original source, appended below.
>>> Could that be the tiu sys call (#45) in the sysent.c table for V4-V6?
I wonder if we'll ever be able to find a copy of the kernel code for that
tiu() system call. And I wonder what it did?
> [1] Oldest alarm() code I can find is in PWB1
> ...
> Either alarm existed in V5 and V6 .. or is was added after V6 was
> released, perhaps soon after. In the latter case the 'nfs' code that we
> have must be later than 1974
Remember, that source came from the MIT system, which is a modified PWB1.
So it's not surprising it's using PWB1 system calls.
Noel
--------
/ C interface to spider status call
.globl _snstat
.globl cerror
_snstat:
mov r5,-(sp)
mov sp,r5
mov 4(r5),r0
mov 6(r5),0f
mov 8(r5),0f+2
sys stty; 0f
bec 1f
jmp cerror
1:
clr r0
mov (sp)+,r5
rts pc
.data
0: .=.+6
Below what I've been able to find about alarm():
[1] Oldest alarm() code I can find is in PWB1, dated July 1977:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1/sys/sys/os/sys4.chttp://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1/sys/sys/os/clock.c
Either alarm existed in V5 and V6, and was removed from distributions
(which seems unlikely to me), or is was added after V6 was released,
perhaps soon after. In the latter case the 'nfs' code that we have must
be later than 1974 (even though the man page is dated that way).
It could be from the 2nd half of 1975.
[2] Interestingly, the idea to implement sleep() in terms of alarm()
seems to originate in UoI network unix:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=SRI-NOSC/ken/sys2.c -- sslep()
This occurs in Oct 1977. In V7 this idea is taken to user space and
sleep() is no longer a system call.
[3] The UoI code has an instance of alarm() being used to break out of
a potentially stalled network call, so that usage seems to have
established itself early on.
Progressed a little further:
[1] The 'ufs' command was a variation on the 'nfs' command. The man page
that Noel provided for nfs includes the paragraph:
"There is a command /usr/usg/tom/ufs which transfers files to
the USG Unix systems. The option letter 7 for the 11/70 or
4 for the 11/45 should be used. Otherwise 'ufs' is similar to
'nfs'."
This means there must have been a Unix based File Store (server).
Does anybody have a suggestion who 'tom' at USG might have been?
[2] The V5 man pages in the archive have a man page for 'npr',
in section VI. It says:
NAME
npr - print file on Spider line-printer
SYNOPSIS
npr file …
DESCRIPTION
Npr prints files on the line, printer in the Spider room,
sending them over the Spider loop. If there are no arguments,
the standard input is read and submitted. Thus npr may be used
as a filter.
FILES
/dev/tiu/d2 tiu to loop
It suggests that the printer was hooked up to the Spider switch and that
channel 2 was hardcoded to it.
[3] Upon closer inspection, the tiu.c driver is a character mode device,
the use of disk buffers and a strategy() routine had me confused.
It is just a reflection of the fact that it uses DMA hardware.
The code for tiu.c in NSYS/V4 is rather different from the code in
the SRI-NOSC tree: thinking on how to select channels seems to have
changed in between these two versions.
[4] Also I found the below post that mentions the snstat() call:
http://minnie.tuhs.org/pipermail/tuhs/2015-December/006286.html
The object code for snstat() is in libc.a in the dmr's V5 image.
Reconstructed, the source code is here:
http://chiselapp.com/user/pnr/repository/Spider/artifact/a93175746bd9f94f
In short, snstat() is a modified stty call, an evolution in the direction of
the later ioctl() system call.
No progress as yet on the early history of 'alarm()'.
Paul
>> It is a paper copy, but I can make a scan for you.
>
> That makes it sounds like it might not be possible to put it online?
> What's the exact title, so I can look and see if it's already online?
> I'm pretty sure I've got a hardcopy of some Spider thing, but it would
> probably take me a while to find it... ;-)
The report I have is:
"SPIDER-a data communication experiment", Tech Report 23 , Bell Lab, 1974.
I did not find it online, but it may be out there somewhere.
I think it can be public now, but doing some checks.
> OK, the only one I have is 'nfs'. Here's the source, and man page:
>
> http://ana-3.lcs.mit.edu/~jnc/tech/unix/s2/nfs.a
> http://ana-3.lcs.mit.edu/~jnc/tech/unix/man6/nfs.6
Many thanks! There is some puzzling stuff in there that I'd like to
figure out, but that is easier to discuss once the report is online.
Also, it turns out that the TIU driver was in Warren's repo all along:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/nsys/dmr/tdir/tiu.chttp://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man4/tiu.4
It's fun to read that the V4 man page says "The precise nature of the
UNIX interface has not been defined yet." and Noel's version says:
"The precise nature of the UNIX interface is defined elsewhere." (yet
the dates are the same!).
Some things are surprising (to me, at least):
First of all, opening a connection to the File Store is a single open on
data channel 1:
http://chiselapp.com/user/pnr/repository/Spider/artifact/854a591c0e7a3a54?l…
I would expected the code to first have sent a connection request to the
switch on control channel 1. Perhaps the File Store was an integral part
of the switch/router (a Tempo minicomputer
ftp://bitsavers.informatik.uni-stuttgart.de/pdf/tempoComputers/TEMPO-1_ad_Nov69.pdf)
with channel 1 functionality hardwired.
Next, the code has a hackish form of non-blocking I/O:
http://chiselapp.com/user/pnr/repository/Spider/artifact/55ee75831bd98d6c?l…
I'm puzzled about the alarm() sys call. That did not exist in 1973 -- or did it
only exist in Bell Labs private builds?
The code calls snstat(), for instance here:
http://chiselapp.com/user/pnr/repository/Spider/artifact/55ee75831bd98d6c?l…
That seems to be a sys call to here:
http://chiselapp.com/user/pnr/repository/Spider/artifact/2c7d65073a7cb0a5?l…
Could that be the tiu sys call (#45) in the sysent.c table for V4-V6?
Ok, I just did an experiment with the rm command and the results surprised me.
On Unix v5 logged in as root I created a small test file then did
chmod 444 on it. Unfortunately it appears that mere users can still rm
the file and also directories are not safe from the rmdir command
(even directories set to mode 444).
This seems to be the case for v6 and v7 as well.
To be fair rm will prompt the user with: test1: 0100444 mode
but the user only has to type y and hit enter and the file is toast.
Is there no way to completely protect files from being deleted?
Mark
> From: Paul Ruizendaal
>>> the 1974 report on Spider
>> Is that online? If not, any chances you can make it so?
> It is a paper copy, but I can make a scan for you.
That makes it sounds like it might not be possible to put it online?
What's the exact title, so I can look and see if it's already online?
I'm pretty sure I've got a hardcopy of some Spider thing, but it would
probably take me a while to find it... ;-)
> I think that in the lifespan of Spider (1972-1978) there were 3 main
> network programs (basing myself on McIlroy's Unix Reader):
> - 'nfs' an FTP-like program ...
> - 'ufs' not sure what it was, but I think a telnet-like facility
> - 'npr' a network printing program
OK, the only one I have is 'nfs'. Here's the source, and man page:
http://ana-3.lcs.mit.edu/~jnc/tech/unix/s2/nfs.ahttp://ana-3.lcs.mit.edu/~jnc/tech/unix/man6/nfs.6
Noel
>
>> I'm looking into the history of Spider and early Datakit. Sandy Fraser
>> was kind enough to send me the 1974 report on Spider
>
> Is that online? If not, any chances you can make it so?
It is a paper copy, but I can make a scan for you.
> which contains the drivers tiu.c, mpx.c - I'm not sure what other files there
> are part of it?
I think tiu.c might be all. The TIU ("terminal access unit") was the network card,
so to speak (actually some 5 boards in a rack) and did a lot of the heavy lifting.
From the tiu.c file I understand that a DR11-B parallel I/O card was used on
the PDP side to connect to the TIU, and that access was structured as a block
device driver.
> I'm not at all clear how this stuff got there - someone at Bell must have just
> dumped the contents of the 'dmr' directory, and sent it all off?
Looks like it.
> The PWB1-based MIT systems also have a lot of the Spider software (although it
> was never used). It's a slightly different version than the one above: 'diff'
> shows that 'tiu.c' is almost identical, but mpx.c has more significant
> differences.
>
> It also contains man pages, and sources for some (?) user programs; I have the
> source and manpage for 'nfs'. What other names should I be looking for? (The
> man page for 'nfs' doesn't list any other commands.) I'll put them up
> momentarily.
I think that in the lifespan of Spider (1972-1978) there were 3 main network
programs (basing myself on McIlroy's Unix Reader):
- 'nfs' an FTP-like program to copy files to/from a central File Store.
I'm not sure whether the File Store was a Unix machine or something else.
- 'ufs' not sure what it was, but I think a telnet-like facility
- 'npr' a network printing program
A little surprising, but no reference to a Spider mail program in that document.
> In the meantime, I'll append the 'tiu' man page.
Thanks! It is from October 1973, which sounds right for Spider. I guess this
code is the first networking on Unix, predating the UoI work by about 18 months.
> From: Paul Ruizendaal
> I'm looking into the history of Spider and early Datakit. Sandy Fraser
> was kind enough to send me the 1974 report on Spider
Is that online? If not, any chances you can make it so?
> Does anybody know of surviving v5/v6/v7 code for Spider networking (e.g.
> the 'tiu' device driver, the 'nfs' file transfer package, etc.)?
You're in luck.
To start with, check out:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=SRI-NOSC/dmr/oldstuff
which contains the drivers tiu.c, mpx.c - I'm not sure what other files there
are part of it?
I'm not at all clear how this stuff got there - someone at Bell must have just
dumped the contents of the 'dmr' directory, and sent it all off?
The PWB1-based MIT systems also have a lot of the Spider software (although it
was never used). It's a slightly different version than the one above: 'diff'
shows that 'tiu.c' is almost identical, but mpx.c has more significant
differences.
It also contains man pages, and sources for some (?) user programs; I have the
source and manpage for 'nfs'. What other names should I be looking for? (The
man page for 'nfs' doesn't list any other commands.) I'll put them up
momentarily.
In the meantime, I'll append the 'tiu' man page. There isn't one for mpx,
alas.
Noel
--------
.th TIU IV 10/28/73
.sh NAME
tiu \*- Spider interface
.sh DESCRIPTION
Spider
is a fast digital switching network.
.it Tiu
is a directory which contains
files each referring to a Spider control
or data channel.
The file /dev/tiu/d\fIn\fR refers to data channel \fIn;\fR
likewise /dev/tiu/c\fIn\fR refers to control channel \fIn\fR.
.s3
The precise nature of the UNIX interface
is specified elsewhere.
.sh FILES
/dev/tiu/d?, /dev/tiu/c?
.sh BUGS
>> There are two other routes to TCP/IP on a PDP11 without split I/D:
>> ...
>> DCEC's adaptation of the Wingfield TCP/IP library, designed to work
>> with V6. It is mostly a user space daemon, but requires some kernel
>> enhancements.
>
> I wonder what the performance would be like, since the TCP is in a user
> process (a different one from the application), i.e. there's a process switch
> every time the application goes to send or receive data. This wouldn't have
> been such an issue when the code was written, since ARPANet-type networks
> were not very fast, but with a better network, it would have been limiting.
IEN98 (http://www.rfc-editor.org/rfc/ien/ien98.txt, page 2) has the answer: about 10kb/s.
The DCEC version used shared memory instead of rand ports and was claimed to be
a bit more performant, but I have no number. I'd be surprised if it was twice as fast,
so perhaps 15kb/s.
Paul
> From: Clem Cole
> So some other mechanism (also discussed here) needed to be created to
> avoid blocking in the application.
> ...
> Rand, UNET & Chaos had something else that gave the save async function,
> who's name I've forgotten at the moment
I don't think the RAND code had the non-blocking stuff; AFAICR, all it had was
named pipes (effectively). Jack Haverty at BBN defined and implemented two new
calls (IIRC, 'capac()' and 'await()') to do non-blocking I/O. The
documentation for that is in the 'BBN' branch at TUHS:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=BBN-V6/doc/ipc/awaithttp://minnie.tuhs.org/cgi-bin/utree.pl?file=BBN-V6/doc/ipc/ipc
My memory might be incorrect, but I don't think it was asynchronous (i.e. a
process issued a read() or write(), and that returned right away, before the
I/O was actually done, and the system notified the process later when the I/O
actually completed).
I actually did implement asyn I/O for an early LAN device driver - and just to
make it fun, the device was a DMA device, and we didn't want the overhead of a
copy, so the DMA was direct to buffers in the process - i.e. 'raw' I/O. So
that required some major system tweaks, to keep the process from being swapped
out - or moved around - while the I/O was pending.
> I believe Noel posted the code for same in the last year from one of the
> MIT kernels
I found it on the dump of an MIT machine, but it was never run on any machine
at MIT - we just had the source in case we had any use fot it.
Noel
> From: Paul Ruizendaal
> There are two other routes to TCP/IP on a PDP11 without split I/D:
> ...
> DCEC's adaptation of the Wingfield TCP/IP library, designed to work
> with V6. It is mostly a user space daemon, but requires some kernel
> enhancements.
I wonder what the performance would be like, since the TCP is in a user
process (a different one from the application), i.e. there's a process switch
every time the application goes to send or receive data. This wouldn't have
been such an issue when the code was written, since ARPANet-type networks
were not very fast, but with a better network, it would have been limiting.
> From: Steve Simon
> do you have pointers to any documentation on the rand/MIT network API?
There was no 'MIT' network API. He was talking about the CHAOSNet API. The
TCP/IP done in the CSR group at MIT used a totally different API.
The various Unix systems at MIT were pretty well out of touch with each other,
and did not exchange code. The only exceptions were the DSSR (later RTS) and
CSR groups in Tech Sq, who used pretty much the same system.
Noel
I had somehow convinced myself that Ultrix-11 needed split I/D, but indeed it does not:
# file unix
unix: (0450) pure overlay executable not stripped
# size unix
14784+(8192,8000,8064,8000,8064,8128,8000,7808,7936,7936,7680,7360,1344)+3524+13500 = 31808b = 076100b (111296 total text)
With only 16KB of permanent kernel there will be a lot of overlay switching. I'm not entirely sure why bss could not be 1KB smaller, enabling 8KB more of permanent kernel. The loss of performance from 2 disk buffers less really outweighed less overlay switching?
If I understand correctly, the network code continuously switches around segment 5 to access the right mbuf.
According to the notes in the TUHS archive (http://www.tuhs.org/Archive/Distributions/DEC/Ultrix-11/Fred-Ultrix3/setup-…) running Ultrix-11 with networking on a 11/40 class machine is borderline workable:
"I have personally tested it on a 23+, 53 and 83. I know it runs
fine on the 73. The smaller machines (34, 40 etc) should work
akin to the 23, meaning using overlays and be very tight on RAM
for the drivers. TCP/IP is a biiiiig load for those systems!"
There are two other routes to TCP/IP on a PDP11 without split I/D:
- 3COM's TCP/IP package (initially an overlay over V7, soon after also over 2BSD); I believe the source to this is lost.
- DCEC's adaptation of the Wingfield TCP/IP library, designed to work with V6. It is mostly a user space daemon, but requires some kernel enhancements. The Wingfield code is in the TUHS archive, but that version has a modified V6 kernel that also supports NCP networking and requires split I/D. If used with a minimally enhanced V6 kernel, it would easily fit in 64KB, without overlays.
Note that these last two options have very different API's and would not be so easy to work with.
Paul
-----Original Message-----
From: pechter(a)gmail.com
To: arnold(a)skeeve.com
Sent: Sat, 20 May 2017 16:41
Subject: Re: [TUHS] Unix with TCP/IP for small PDP-11s
Missed the reply all on the phone. Phil Karn had KA9Q in the 80s... It is mentioned on Wikipedia... Don't know much more. PPP might be better than slip.
Bill
-----Original Message-----
From: arnold(a)skeeve.com
To: pechter(a)gmail.com
Sent: Sat, 20 May 2017 16:12
Subject: Re: [TUHS] Unix with TCP/IP for small PDP-11s
Yes! Do you want to follow up to the list please?
Thanks,
Arnold
William Pechter <pechter(a)gmail.com> wrote:
> KA9Q sound right?
>
> -----Original Message-----
> From: arnold(a)skeeve.com
> To: imp(a)bsdimp.com, bqt(a)update.uu.se
> Cc: tuhs(a)minnie.tuhs.org
> Sent: Sat, 20 May 2017 15:06
> Subject: Re: [TUHS] Unix with TCP/IP for small PDP-11s
>
> Warner Losh <imp(a)bsdimp.com> wrote:
>
> > I read the sources to see the TCP/IP support was there (that's the bit
> > about adding Berkeley Sockets). I see nowhere that it's excluded for the
> > non I/D machines, but haven't tried it first hand. I got interested not
> > because of the PDP-11, but because I have an old Rainbow that recently
> > started running Venix (v7-based version) and was trolling around for some
> > way to do TCP/IP to it (though w/o readily available ethernet cards, I'm
> > not sure it is a viable project).
>
> Boy is the memory going. What was the TCP/IP implementation people
> ran on DOS to do connections over serial lines? Could that be found
> and revived for such a system?
>
> Thanks,
>
> Arnold
On 2017-05-21 23:27, Clem Cole <clemc(a)ccc.com> wrote:
> Actually, the 11/60's main claim to fame was it supposed to be a
> 'commercial' PDP-11 and was built for the small business market. The WCS
> was a side effect.
As you mentioned in another mail, it's main claim to fame was probably
the short time it actually existed in the market. DEC seriously did some
things wrong on it, such as only 18-bit address, and no split I/D space,
at a time when pretty much any other PDP-11 was going there.
But it was also one of a couple of -11 models where you had the ability
to write your own microcode. But I've never heard of anyone who had the
WCS option. (But at one point, I was playing with four 11/60 machines in
a computer club.)
I don't remember if it was you or someone else who said that there were
several microcode bugs in the 11/60. It ran the DEC OSes, but there were
some issues with Unix. I seem to also remember seeing some special code
in the RSX kernel for some 11/60 oddity, but I would have to search
through the code to remember exactly what that was about.
> It was to built to run RSTS and RSX and had a commercial instruction set
> exten *etc.*. Somebody had written a 'dentist office' package for it and a
> 'car dealership package' IIRC. And was physically packaged a tad
> differently than the other 11's as it was trying to be marketing to places
> that might want to show it off instead of hiding it in a computer room.
Uh? I have not seen any plans ever mentioning CIS for the 11/60, but I
guess it's possible it was considered at some point. But I can assure
you no CIS ever existed for the 11/60.
The only machines that ever had the CIS option was the 11/44 and
11/23,11/24.
But I have no idea how many machines ever actually had the option installed.
One nice detail of the 11/60 is that it had the FPP build in. But there
was also an optional hardware FPP accelerator available.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
I'm trying to find out if there is any existing Unix for the PDP-11
which supports TCP/IP on /40-/34-23 class machines (i.e. non-I+D
machines)?
Does 2.9 BSD with TCP/IP (assuming such a thing exists) fit on those
machines? (I know 2.9 does run on them, but I don't know about the TCP/IP
part.)
The reason I ask is that MIT did a TCP/IP for V6 which would run on them
(only incoming packet de-mux is in the kernel - the TCP is in with the
application, in the user process), which has recently been recovered from a
backup tape.
I'm trying to figure out if there is any use for it, as it would take some
work to make it usable (I'd have to write device drivers for available
Ethernet cards, and adapt an ARP implementation for it).
Noel