9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: William Ahern <william@25thandClement.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] book chapters
Date: Fri, 27 Jun 2003 15:36:23 -0700	[thread overview]
Message-ID: <20030627223623.GA31591@wilbur.25thandClement.com> (raw)
In-Reply-To: <Pine.SUN.3.90.1030627173421.29163A-100000@magnum.cooper.edu>

On Fri, Jun 27, 2003 at 06:08:13PM -0400, Joel Salomon wrote:
> On Fri, 27 Jun 2003, pac wrote:
<snip>
> * Unix Assumes a Static File System
> I'm out of my depths here - anyone able to answer this?

Linux has this solution *wrong*. the DNOTIFY mechanism is accessed
thru fcntl(), and DNOTIFY uses signals. ugh!

I don't know if BSD _copied_ Linux. The free BSD's have kqueue(),
which is an interface that smoothes over file descriptors, signals,
process status and async-io context pointers. It includes a mechanism
to be notified on all file events. DNOTIFY on Linux only notifies
on directories (tho it will trigger a directory event when children
are modified).

However, Linux might get epoll(), which is supposed to be similar to
Solaris' /dev/poll, but a tad more general. It looks similar to kqueue(),
but not nearly as robust. (for better or worse)

I'm working on a shell utility, `watch', which outputs file event
notifications.

The code is ugly, because I ran into a lot of caveats figuring out
the semantics of kqueue vnode events.

	[http://www.25thandclement.com/~william/projects/watch.html]

I guess one tie-in to Plan 9 is that none of the BSD's (free ones, at least)
keep track of path names in their fs layer. Linux does, and in fact on Linux
/dev/pid/[fd] is analagous to fd2path(), except Linux tracks rename()s. Ted
Unangst, an OpenBSD developer, wrote me to say that he might hack OpenBSD to
keep some path info. I talked to him about it because if I'm monitoring a
large tree for events (say in a CMS), kqueue() forces me to open every last
file, while in Linux I need only open every directory; the issue being
descriptor table limits.

- Bill


  parent reply	other threads:[~2003-06-27 22:36 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-27  9:47 pac
2003-06-27 10:22 ` matt
2003-06-27 22:08 ` Joel Salomon
2003-06-27 22:12   ` Geoff Collyer, geoff
2003-06-27 23:39     ` boyd, rounin
2003-06-28  1:03     ` Scott Schwartz
2003-06-28  2:10       ` Dan Cross
2003-06-28  2:27         ` Dan Cross
2003-06-29 17:55     ` Jack Johnson
2003-06-30 11:17       ` matt
2003-06-30 13:43         ` ron minnich
2003-06-30 14:02           ` matt
2003-06-30 16:56           ` Jack Johnson
2003-06-30 17:16             ` boyd, rounin
2003-06-30 17:19               ` ron minnich
2003-06-30 17:24                 ` ron minnich
2003-06-30 17:29                   ` boyd, rounin
2003-06-30 18:40             ` rog
2003-06-30 23:16               ` Kenji Arisawa
2003-06-30 23:24                 ` boyd, rounin
2003-07-01  1:44                 ` David Presotto
2003-07-01 11:27                   ` Kenji Arisawa
2003-07-01 11:32                     ` David Presotto
2003-07-01  9:51             ` matt
2003-06-27 22:36   ` William Ahern [this message]
2003-06-27 22:28 Joel Salomon
2003-06-27 22:26 ` Geoff Collyer, geoff
2003-06-27 23:43 ` boyd, rounin
2003-06-27 23:46   ` Geoff Collyer, geoff
2003-06-28  0:53     ` Dennis Ritchie
2003-06-28 17:44 A. Baker
2003-06-29  4:38 ` Dennis Ritchie
2003-06-30 18:17 Richard C Bilson
2003-07-01 17:48 A. Baker
2003-07-02  0:27 ` Dennis Ritchie

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=20030627223623.GA31591@wilbur.25thandClement.com \
    --to=william@25thandclement.com \
    --cc=9fans@cse.psu.edu \
    /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).