The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: steffen@sdaoden.eu (Steffen Nurpmeso)
Subject: [TUHS] Device special files
Date: Wed, 07 Feb 2018 19:36:07 +0100	[thread overview]
Message-ID: <20180207183607.E3NiH%steffen@sdaoden.eu> (raw)
In-Reply-To: <alpine.BSF.2.21.1802071628390.50080@aneurin.horsfall.org>

Dave Horsfall <dave at horsfall.org> wrote:
 |On Tue, 6 Feb 2018, Bakul Shah wrote:
 |>> Wasn't that "devfs" (which Penguin/OS calls "udev")?  I've never 
 |>> grokked that concept.
  ...
 |>    mknod <name> <b or c> <major> <minor>
  ...
 |Umm, I've known that since Edition 5; I'm not exactly new to Unix, you 
 |know...
  ...
 |> So the point of devfs is to avoid having to do mknod manually and yet 
 |> provide access to all found devices from the userland. As a side effect 
  ...
 |That makes sense; bit of a pain when a USB device suddenly disappears just 
 |I unplugged it, though...

That was indeed one of my a-ha! moments with FreeBSD, coming from
Linux!  All those files in /dev and i did not know anything about
anything -- which of all those many hundreds of files is actually
for real?  And then FreeBSD came over with the devfs and there
even was a really enlightening paper, which is still shipped with
FreeBSD (share/doc/papers/devfs/paper.me).  From Linux which back
then had the GNU LibC info file and something almost exclusively
for kernel hackers in the kernel documentation directory and
otherwise almost nil, to FreeBSD and a document which starts

  An outstanding novelty in UNIX at its introduction was the notion
  of ``a file is a file is a file and even a device is a file.''
  Going from ``hardware only changes when the DEC Field engineer is here''
  to ``my toaster has USB'' has put serious strain on the rather crude
  implementation of the ``devices as files'' concept, an implementation which
  has survived practically unchanged for 30 years in most UNIX variants.
  Starting from a high-level view of devices and the semantics that
  have grown around them over the years, this paper takes the audience on a
  grand tour of the redesigned FreeBSD device-I/O system, 
  to convey an overview of how it all fits together, and to explain why
  things ended up as they did, how to use the new features and 
  in particular how not to.

That was fantastic, that was enlightening, and that actually
seemed as such a brave move of entire FreeBSD (and it was, right)!
It is still a good read.  And so: suddenly i had so few files in
/dev, so few that i even could start looking around a bit!

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)


  reply	other threads:[~2018-02-07 18:36 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06 15:56 ron minnich
2018-02-06 17:56 ` Larry McVoy
2018-02-06 18:03   ` ron minnich
2018-02-06 19:48 ` Random832
2018-02-07  1:25   ` Greg 'groggy' Lehey
2018-02-07  1:36     ` Ron Natalie
2018-02-07  1:40       ` Clem Cole
2018-02-07  1:47         ` Henry Bent
2018-02-07  1:48     ` Dave Horsfall
2018-02-07  2:06       ` Dan Cross
2018-02-07 16:24         ` Arthur Krewat
2018-02-07 16:34           ` Dan Cross
2018-02-07 16:34           ` Nemo
2018-02-07 16:59             ` ron minnich
2018-02-08  0:39           ` Dave Horsfall
2018-02-08 16:18             ` Arthur Krewat
2018-02-08 22:47               ` Dave Horsfall
2018-02-07  2:13       ` Bakul Shah
2018-02-07  5:39         ` Dave Horsfall
2018-02-07 18:36           ` Steffen Nurpmeso [this message]
2018-02-07 19:07             ` Ian Zimmerman
2018-02-07 22:05               ` Clem Cole
2018-02-07 22:38                 ` ron minnich
2018-02-07 22:48                 ` Ron Natalie
2018-02-08 18:59                   ` Random832
2018-02-07 23:06                 ` Bakul Shah
2018-02-08 19:06               ` Steffen Nurpmeso
2018-02-07 22:04             ` Dave Horsfall
2018-02-08 13:03               ` Rafael R Obelheiro
2018-02-08 19:25               ` Steffen Nurpmeso
2018-02-07  1:38 Noel Chiappa
2018-02-09  0:09 Doug 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=20180207183607.E3NiH%steffen@sdaoden.eu \
    --to=steffen@sdaoden.eu \
    /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).