The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] Pipes in the Third Edition Unix
@ 2017-01-03 20:54 Diomidis Spinellis
  2017-01-03 21:50 ` Clem Cole
  2017-01-03 21:53 ` Warren Toomey
  0 siblings, 2 replies; 8+ messages in thread
From: Diomidis Spinellis @ 2017-01-03 20:54 UTC (permalink / raw)


Peter Salus writes "The other innovation present in the Third Edition 
was the pipe" ("A Quarter Century of Unix", p. 50).  Yet, in the 
corresponding sys/ken/sysent.c, the pipe system call seems to be a stump.

         1, &fpe,                        /* 40 = fpe */
         0, &dup,                        /* 41 = dup */
         0, &nosys,                      /* 42 = pipe */
         1, &times,                      /* 43 = times */

On the other hand, the Fourth Edition manual documents the pipe system 
call, the construction of pipelines through the shell, and the use of wc 
as a filter (without an input file, as was required in the Second Edition).

Would it therefore be correct to say that pipes were introduced in the 
Fourth rather than the Third Edition?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [TUHS] Pipes in the Third Edition Unix
  2017-01-03 20:54 [TUHS] Pipes in the Third Edition Unix Diomidis Spinellis
@ 2017-01-03 21:50 ` Clem Cole
  2017-01-03 21:53 ` Warren Toomey
  1 sibling, 0 replies; 8+ messages in thread
From: Clem Cole @ 2017-01-03 21:50 UTC (permalink / raw)


Hmm.. it's all about where you count.   Clearly, he was working on it if
the stubs is there.  If the only difference between 3rd and 4th is the pipe
code, then it would be fair to say that.

You might say something like:  Pipe's were developed in a 3rd edition
kernel, where there was is evidence of nascent idea (its has a name and
there are subs for it), but the code to fully support it is lacking in the
3rd release.  Pipes became a completed feature in the 4th edition.

On Tue, Jan 3, 2017 at 3:54 PM, Diomidis Spinellis <dds at aueb.gr> wrote:

> Peter Salus writes "The other innovation present in the Third Edition was
> the pipe" ("A Quarter Century of Unix", p. 50).  Yet, in the corresponding
> sys/ken/sysent.c, the pipe system call seems to be a stump.
>
>         1, &fpe,                        /* 40 = fpe */
>         0, &dup,                        /* 41 = dup */
>         0, &nosys,                      /* 42 = pipe */
>         1, &times,                      /* 43 = times */
>
> On the other hand, the Fourth Edition manual documents the pipe system
> call, the construction of pipelines through the shell, and the use of wc as
> a filter (without an input file, as was required in the Second Edition).
>
> Would it therefore be correct to say that pipes were introduced in the
> Fourth rather than the Third Edition?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170103/0661dcdf/attachment-0001.html>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [TUHS] Pipes in the Third Edition Unix
  2017-01-03 20:54 [TUHS] Pipes in the Third Edition Unix Diomidis Spinellis
  2017-01-03 21:50 ` Clem Cole
@ 2017-01-03 21:53 ` Warren Toomey
  2017-01-03 22:04   ` Warren Toomey
  1 sibling, 1 reply; 8+ messages in thread
From: Warren Toomey @ 2017-01-03 21:53 UTC (permalink / raw)


On Tue, Jan 03, 2017 at 10:54:57PM +0200, Diomidis Spinellis wrote:
> Peter Salus writes "The other innovation present in the Third Edition was
> the pipe" ("A Quarter Century of Unix", p. 50).  Yet, in the corresponding
> sys/ken/sysent.c, the pipe system call seems to be a stump.

The Third edition was still written in assembly code. The Fourth edition
was the first to be rewritten in C. So there was a time when both
existed in parallel.
 
>         1, &fpe,                        /* 40 = fpe */
>         0, &dup,                        /* 41 = dup */
>         0, &nosys,                      /* 42 = pipe */
>         1, &times,                      /* 43 = times */

This code, from the nsys kernel, clearly shows this. The kernel was
being rewritten in C. The C version had not yet caught up with the
functionality in the assembly version of the kernel, which did have pipes.

Cheers, Warren


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [TUHS] Pipes in the Third Edition Unix
  2017-01-03 21:53 ` Warren Toomey
@ 2017-01-03 22:04   ` Warren Toomey
  2017-01-03 22:20     ` Paul Ruizendaal
  2017-01-05  0:51     ` Dave Horsfall
  0 siblings, 2 replies; 8+ messages in thread
From: Warren Toomey @ 2017-01-03 22:04 UTC (permalink / raw)


On Wed, Jan 04, 2017 at 07:53:10AM +1000, Warren Toomey wrote:
> The Third edition was still written in assembly code. The Fourth edition
> was the first to be rewritten in C. So there was a time when both
> existed in parallel.

I should have waited to add this. The nsys kernel is dated August 31, 1973 (see
http://www.tuhs.org/Archive/PDP-11/Distributions/research/Dennis_v3/Readme.nsys)
and the Third Edition manuals are dated February 1973 (see
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man0/intro)

The 3e manuals have a pipe syscall:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man2/pipe.2
so pipes existed in February 1973. In fact, they existed as early as
January 15, 1973, as Doug McIlroy put out the notice for a talk which
described the state of UNIX at that time; page 4 describes SYS PIPE and its
implementation, (see
http://www.tuhs.org/Archive/Documentation/Papers/Unix_Users_Talk_Notes_Jan73.pdf)

Interestingly, the pipe manpage says:
	SYNOPSIS	sys pipe	/ pipe = 42.; not in assembler

and I don't quite understand the comment :-) Other manpages with
the same comment are boot(2), csw(2), fpe(2), kill(2), rele(2), sleep(2),
sync(2) and times(2). So it's not particular to pipe(2).

Can anybody help explain the "not in assembler" comment?

Thanks, Warren


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [TUHS] Pipes in the Third Edition Unix
  2017-01-03 22:04   ` Warren Toomey
@ 2017-01-03 22:20     ` Paul Ruizendaal
  2017-01-05  0:51     ` Dave Horsfall
  1 sibling, 0 replies; 8+ messages in thread
From: Paul Ruizendaal @ 2017-01-03 22:20 UTC (permalink / raw)


> Can anybody help explain the "not in assembler" comment?

In early 'as' some syscall mnemonics were predefined, see for instance:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/source/as/as29.s

'pipe' isn't one of those.

Paul



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [TUHS] Pipes in the Third Edition Unix
  2017-01-03 22:04   ` Warren Toomey
  2017-01-03 22:20     ` Paul Ruizendaal
@ 2017-01-05  0:51     ` Dave Horsfall
  1 sibling, 0 replies; 8+ messages in thread
From: Dave Horsfall @ 2017-01-05  0:51 UTC (permalink / raw)


On Wed, 4 Jan 2017, Warren Toomey wrote:

> Interestingly, the pipe manpage says:
> 	SYNOPSIS	sys pipe	/ pipe = 42.; not in assembler
> 
> and I don't quite understand the comment :-) Other manpages with
> the same comment are boot(2), csw(2), fpe(2), kill(2), rele(2), sleep(2),
> sync(2) and times(2). So it's not particular to pipe(2).
> 
> Can anybody help explain the "not in assembler" comment?

As I recall, it means that those symbols are not recognised by the 
assembler, so had to be defined by hand.

-- 
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [TUHS] Pipes in the Third Edition Unix
@ 2017-01-03 23:52 Noel Chiappa
  0 siblings, 0 replies; 8+ messages in thread
From: Noel Chiappa @ 2017-01-03 23:52 UTC (permalink / raw)


    > From: Clem Cole

    > You might say something like: Pipe's were developed in a 3rd edition
    > kernel, where there was is evidence of nascent idea (its has a name and
    > there are subs for it), but the code to fully support it is lacking in
    > the 3rd release. Pipes became a completed feature in the 4th edition.

To add to what others have pointed out (about the assembler and C kernels),
let me add one more data-bit. In the Unix oral histories done by Michael S.
Mahoney, there's this:

  McIlroy: .. And on-e day I came up with a syntax for the shell that went
  along with the piping, and Ken said, "I'm going to do it!" He was tired of
  hearing all this stuff, and that was - you've read about it several times,
  I'm sure - that was absolutely a fabulous day the next day. He said, "I'm
  going to do it." He didn't do exactly what I had proposed for the pipe
  system call; he invented a slightly better one that finally got changed
  once more to what we have today. He did use my clumsy syntax. 

  He put pipes into Unix, he put this notation [Here McIlroy pointed to the
  board, where he had written f > g > c] into shell, all in one night. The next
  morning, we had this - people came in, and we had - oh, and he also changed
  a lot of - most of the programs up to that time couldn't take standard
  input, because there wasn't the real need. So they all had file arguments;
  grep had a file argument, and cat had a file argument, and Thompson saw
  that that wasn't going to fit with this scheme of things and he went in and
  changed all those programs in the same night. I don't know how ... And the
  next morning we had this orgy of one-liners.

So I don't think that suggested text, that it was added slowly, is
appropriate. If this account is correct, it was pretty atomic.

It sounds more the correct answer to the stuff in the source is the one
proposed, that it got added to the assembler version of the system before it
was done in the C version.

	Noel


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [TUHS] Pipes in the Third Edition Unix
@ 2017-01-03 22:14 Norman Wilson
  0 siblings, 0 replies; 8+ messages in thread
From: Norman Wilson @ 2017-01-03 22:14 UTC (permalink / raw)


Warren:

  Can anybody help explain the "not in assembler" comment?

====

I think it means `as(1) has predefined symbols with the
numbers of many system calls, but not this one.'

Norman Wilson
Toronto ON


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-01-05  0:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-03 20:54 [TUHS] Pipes in the Third Edition Unix Diomidis Spinellis
2017-01-03 21:50 ` Clem Cole
2017-01-03 21:53 ` Warren Toomey
2017-01-03 22:04   ` Warren Toomey
2017-01-03 22:20     ` Paul Ruizendaal
2017-01-05  0:51     ` Dave Horsfall
2017-01-03 22:14 Norman Wilson
2017-01-03 23:52 Noel Chiappa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).