The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Clem Cole <clemc@ccc.com>
To: Noel Chiappa <jnc@mercury.lcs.mit.edu>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: Re: [TUHS] VFS prior to 1984
Date: Wed, 24 Jun 2020 11:21:41 -0400	[thread overview]
Message-ID: <CAC20D2PLhOKmV6bWtcb8k7ywqV0wZi=y5whWawpTUbF-M1YfKw@mail.gmail.com> (raw)
In-Reply-To: <20200624143129.1913318C0BD@mercury.lcs.mit.edu>

[-- Attachment #1: Type: text/plain, Size: 2280 bytes --]

On Wed, Jun 24, 2020 at 10:32 AM Noel Chiappa <jnc@mercury.lcs.mit.edu>
wrote:

>     > From: Dave Horsfall <dave@horsfall.org>
>
>     > Ioctl: the Swiss Army knife of system calls.  I thought it was a neat
>     > idea when it arrived (much better then those primitive stty/gtty
> calls)
>     > but now...
>
> Like they say, when the only tool you have is a hammer...
>
> Better syntax than stty/gtty, maybe but I'm not sure the semantics are that
> much better. The problem is that, especially with devices, what the I/O
> commands do is so widely varied that it's hard to fit them all under a
> unified umbrella. Maybe some (e.g. asynchronous I/O), but not all.
>
I remember the change from stty/gtty which was peculiar to tty's in v6 to
ioctl in v7 and thinking it was a nice clean generalization. Then I
realized it had at least two big issues -- no concept of direction nor the
size of the container being moved.   So, then I see it start to get abused
and I said -- oh my -- that was clearly not well thought out.   Plan 9's
solution of the CTL file with an ASCII interface, I thought was cleaner.
 IIRC TRIX had a controller interface too, but I've forgotten the details
now.

Here is the problem....   if you make everything a byte stream (which is a
great fundamental way of building up a small cooperating program with a
common interface), how do you handle the mechanisms to modify the stream in
a manner than make sense (control if you will) in an out-of-band manner,
but not end up with a fisherman's stew of different and special things
(access methods, frameworks, *et al*) that are peculiar to that specific
stream?

The problem with stty/getty was is was specific to TTY's.  It was a fine
OOB scheme, but did not make sense for say changing parameters on other
devices (tape as an example).   The tape solution was different names,
which worked there because you were not supposed to change things like
density mid tape write.  Other peripherals worked differently.   ioctl
became the only way out, as Noel points out.

So ... this begs the question?  Does the ctl file idea work better than
ioctl?   You still have to know what the ctl interface is for that device?
 It is ASCII which is nice and huge improvement over the binary command
encoding crap.

Clem

[-- Attachment #2: Type: text/html, Size: 3539 bytes --]

  reply	other threads:[~2020-06-24 15:22 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24 14:31 Noel Chiappa
2020-06-24 15:21 ` Clem Cole [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-06-29  9:11 Paul Ruizendaal
2020-06-29 14:45 ` Larry McVoy
2020-06-29 14:53   ` Paul Ruizendaal
2020-06-29 15:14     ` Larry McVoy
2020-06-29 16:34 ` Heinz Lycklama
2020-06-25 20:25 Noel Chiappa
2020-06-26  5:49 ` Lars Brinkhoff
2020-06-26  8:34   ` Dave Horsfall
2020-06-26 11:13     ` arnold
2020-06-25 20:23 Noel Chiappa
2020-06-25 19:31 Noel Chiappa
2020-06-24 18:31 Norman Wilson
2020-06-25  6:22 ` arnold
2020-06-24 17:51 Noel Chiappa
2020-06-24 18:13 ` Richard Salz
2020-06-24 18:46   ` Lars Brinkhoff
2020-06-23 22:17 Norman Wilson
2020-06-23 22:24 ` Dave Horsfall
2020-06-24  4:09   ` Warner Losh
2020-06-24  5:10     ` Dave Horsfall
2020-06-24  5:33       ` Bakul Shah
2020-06-24  9:10         ` Andrew Warkentin
2020-06-23  9:09 Paul Ruizendaal
2020-06-23 14:01 ` Larry McVoy
2020-06-23 15:12   ` Clem Cole
2020-06-23 15:55     ` Rich Morin
2020-06-23 20:38     ` Rob Pike
2020-06-23 20:57       ` Larry McVoy
2020-06-24  5:14       ` arnold
2020-06-24 21:08         ` Dave Horsfall
2020-06-24 19:30       ` Clem Cole
2020-06-24 19:36     ` Larry McVoy
2020-06-25  6:52       ` Rob Gingell
2020-07-05  0:05       ` Dave Horsfall
2020-07-05  0:16         ` Larry McVoy
2020-07-06  4:42           ` Dave Horsfall
2020-07-06 16:51           ` Chris Torek
2020-07-07  1:07             ` Bakul Shah
2020-07-05  1:43         ` Clem Cole
2020-07-05 14:43           ` Larry McVoy
2020-07-05 18:40             ` Arthur Krewat
2020-07-05 20:08             ` Clem Cole
2020-07-05 20:42               ` John Cowan
2020-07-05 21:04                 ` Clem Cole
2020-07-05 21:14                   ` Dan Cross
2020-06-24 16:51 ` Anthony Martin
2020-06-24 17:31   ` Anthony Martin
2020-06-24 18:31   ` Paul Ruizendaal
2020-06-25  0:56     ` Rob Gingell via TUHS
2020-06-24 19:05   ` Paul Ruizendaal
2020-06-24 20:27 ` Derek Fawcus
2020-06-24 21:33 ` Greg A. Woods
2020-06-25  0:45   ` Adam Thornton
2020-06-25 19:40     ` Greg A. Woods

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='CAC20D2PLhOKmV6bWtcb8k7ywqV0wZi=y5whWawpTUbF-M1YfKw@mail.gmail.com' \
    --to=clemc@ccc.com \
    --cc=jnc@mercury.lcs.mit.edu \
    --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).