Review/Test: Pseudo-device unit number management patch
Melvyn Sopacua
freebsd-current at webteckies.org
Tue Feb 17 01:47:28 PST 2004
On Monday 09 February 2004 16:54, Poul-Henning Kamp wrote:
> In message <20040209150039.GS2803 at pcwin002.win.tue.nl>, Stijn Hoop writes:
> >On Mon, Feb 09, 2004 at 03:32:16PM +0100, Poul-Henning Kamp wrote:
> >> Please also remember: /dev is _not_ an inventory of available devices.
> >
> >Just curious: what is it then? An inventory of available drivers? An
> >inventory of open devices?
>
> "A naming-space gateway from filenames to device drivers
> whose exact mapping is only stable in the timeinterval
> between a successful open(2) and the corresponding close
> (be it an explict close or not)." [2]
>
> Fortunately it is a good deal more deterministic than what my feeble
> attempt at a definition above could make it sound :-)
>
> The practical effects are hard to explain, but one example is that
> the stat/open race is much more fundamental in /dev than anywhere
> else in the filesystem.
>
> In the normal filesystem, a few odd things may happen between calls
> to stat(2) and open(2), in /proc you may get a different process
> than you intended, but in /dev _any_ odd thing may happen.
>
> You thought you opened a serial port called /dev/foo connected to
> your printer ? Well, I got news for you: it disappeared!
How does this work, when there's no mechanism in place to signal "the return
of the thingy". Mostly thinking about the keyboard here, because even if
there was a recheck_keyboard_existence utility, one couldn't really type it
in. So far I haven't been able to plug-in the keyboard and get it back again.
This is also a problem with some kvm-switches (the more expensive ones seem to
be able to fool the OS, but the ones you buy just for changing co-locaters
don't). I haven't checked with PC-Weazle cards (VGA/mouse/keyboard
redirection to serial outlet for ia32/pci) and RELENG_5_x yet, but if these
loose their keyboard as well, there's definitely a problem.
--
Melvyn
=======================================================
FreeBSD sarevok.idg.nl 5.2-CURRENT FreeBSD 5.2-CURRENT #2: Mon Feb 16 19:59:52
CET 2004
root at sarevok.webteckies.org:/usr/obj/usr/src/sys/SAREVOK_NOAPM_NODEBUG i386
=======================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040217/376753f2/attachment.bin
More information about the freebsd-current
mailing list