From: John Cowan <cowan@ccil.org>
To: Marc Rochkind <mrochkind@gmail.com>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: [TUHS] Re: Pipes (was Re: After 50 years, what has the Impact of Unix been?)
Date: Thu, 5 Dec 2024 12:53:06 -0500 [thread overview]
Message-ID: <CAD2gp_SUWyBukKki6boxq5m4ebCgwD97dyeMArCEmwOu6vJ14g@mail.gmail.com> (raw)
In-Reply-To: <CAOkr1zV7goW0H3WwtCquuTLCWs4m=aEp8HR0hnKUJMjkMH_Juw@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2889 bytes --]
There was no concurrency in mini-Unix; the first pipeline component ran to
completion, and when it exited the next component ran, and so on. In this
way a pipeline could be arbitrarily long using just two disk files.
On Thu, Dec 5, 2024, 12:07 PM Marc Rochkind <mrochkind@gmail.com> wrote:
> I don't think files as pipes would be "transparent to the user." Reading
> an empty pipe causes a wait until the bytes requested are available, unless
> the pipe is closed first. Reading to the end of a file results in an
> end-of-file error. This problem is avoided if the source process completes
> before the target process begins, but then there is a different lack of
> transparency, which is that the processes don't run simultaneously. (I
> think this is the case with the implementation that Heinz showed.)
>
> Still, the same sort of pseudo-pipes were in MS-DOS, and they were
> occasionally useful.
>
> Marc
>
> On Thu, Dec 5, 2024 at 9:17 AM Heinz Lycklama <heinz@osta.com> wrote:
>
>> John, thanks for the reminder of the implementation
>> of pipes on a constrained version of UNIX in the early
>> days. The exact implementation is described on page 2095
>> of the BSTJ July-Aug 1978 for interested parties.
>>
>>
>>
>> Heinz
>>
>> On 12/5/2024 8:00 AM, John R Levine wrote:
>>
>> On Thu, 5 Dec 2024, Dan Cross wrote:
>>
>> Pipes were invented at least three times I'm aware of, but what made them
>> work so well in Unix is that they looked to the program the same as a
>> file
>> so any program could use them for input or output without special
>> arrangements,
>> and the shell made it easy to start two programs and pipe them together.
>>
>>
>> Once you have coroutines and queues for passing data between them, a
>> lot of things start to look like pipes.
>>
>>
>> They also can look a lot like temporary files. Someone, probably Heinz,
>> did a shell for the tiny Unix that ran on floppies so this
>>
>> foo | bar
>>
>> actually did this
>>
>> foo > tmpfile ; bar < tmpfile; rm tmpfile
>>
>> to avoid having to swap programs in and out on floppies. The main
>> disadvantage was that the tmpfile could overflow the tiny disks of the
>> time.
>>
>> They were invented again at IBM in the 1970s and described in this
>> paper. I wrote
>> them a letter, which they published, saying that Unix pipes did the same
>> thing.
>>
>> https://dl.acm.org/doi/10.1147/sj.174.0383
>>
>>
>> Don't forget CMS pipelines, too!
>>
>> Sadly, the Morrison paper cited above is not easily accessible, though
>>
>>
>> If anyone else needs a copy, just ask.
>>
>> Regards,
>> John Levine, johnl@taugh.com, Taughannock Networks, Trumansburg NY
>> Please consider the environment before reading this e-mail. https://jl.ly
>>
>>
>>
>
> --
> *My new email address is mrochkind@gmail.com <mrochkind@gmail.com>*
>
[-- Attachment #1.2: Type: text/html, Size: 4921 bytes --]
[-- Attachment #2: RGxkomgHdfzyhAUv.png --]
[-- Type: image/png, Size: 138780 bytes --]
next prev parent reply other threads:[~2024-12-05 17:53 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 3:17 [TUHS] After 50 years, what has the Impact of Unix been? sjenkin
2024-12-04 13:05 ` [TUHS] " Marc Donner
2024-12-04 13:40 ` William Cheswick
2024-12-04 15:02 ` Rich Salz
2024-12-05 3:08 ` John Levine
2024-12-05 15:19 ` [TUHS] Re: Pipes (was Re: After 50 years, what has the Impact of Unix been?) Dan Cross
2024-12-05 16:00 ` John R Levine
2024-12-05 16:17 ` Heinz Lycklama
2024-12-05 17:06 ` Marc Rochkind
2024-12-05 17:53 ` John Cowan [this message]
2024-12-05 18:05 ` John Levine
2024-12-05 17:22 ` Paul Winalski
2024-12-05 18:19 ` Ron Natalie
2024-12-06 2:29 ` Adam Thornton
2024-12-07 20:38 ` Ron Natalie
2024-12-05 16:55 ` Adam Thornton
2024-12-05 17:35 ` Chet Ramey via TUHS
2024-12-05 20:55 ` arnold
2024-12-05 21:12 ` Dan Cross
2024-12-05 21:50 ` Marc Rochkind
2024-12-05 22:03 ` Warner Losh
2024-12-05 22:19 ` Chet Ramey via TUHS
2024-12-05 23:07 ` Marc Rochkind
2024-12-06 8:16 ` Diomidis Spinellis
2024-12-06 0:46 ` Alexis
2024-12-06 21:46 ` Chet Ramey via TUHS
2024-12-05 23:07 ` arnold
2024-12-06 1:09 ` G. Branden Robinson
2024-12-06 1:31 ` Greg A. Woods
2024-12-06 2:05 ` Steve Nickolas
2024-12-06 16:44 ` arnold
2024-12-05 22:05 ` Bakul Shah via TUHS
2024-12-06 2:02 ` John Levine
2024-12-06 2:21 ` Dan Cross
2024-12-06 16:46 ` arnold
2024-12-06 2:26 Douglas McIlroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAD2gp_SUWyBukKki6boxq5m4ebCgwD97dyeMArCEmwOu6vJ14g@mail.gmail.com \
--to=cowan@ccil.org \
--cc=mrochkind@gmail.com \
--cc=tuhs@tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).