programmatic devices

Piercarlo Grandi pcg at aber-cs.UUCP
Sat Dec 30 09:44:04 AEST 1989


In article <3062 at cbnewsj.ATT.COM> avr at cbnewsj.ATT.COM (adam.v.reed) writes:

    In article <10641 at ucsd.Edu>, brian at ucsd.Edu (Brian Kantor) writes:
    > A programmatic device (pdev) is a program (an executable binary) living
    > in the /dev directory.  When a user program tries to open it for
    > reading or writing, a process is started that runs the program, and
    ....
    > Oh, and if this isn't an original idea, pardon me.  I honestly can't
    > remember having heard of this before in the Unix world.  (It is vaguely
    
    This looks (except for some ad-hoc details) like a trivial
    instance of a stream device with a single stream module.
    Why write if you can buy?

But the module, except when using some tricks, has to be linked in with the
kernel.

On the other hand you can find a nice description of portals in the 4.2BSD
system manual. Alongside with wrappers and user process domains they have
never been implemented.

It has become fashionable is instead to implement fake file systems, instead
of devices, and mount them here and there. This is particularly easy with
NFS; you create a server that accepts the NFS procotol but does all sort of
things instead of actually operating on files.

Under Mach, or the INET domain in 4.2BSD TCP/IP you ask the service server
to give you a handle (socket, port) to a named service. If the server is not
active, the service server will start it. Using the Unix path walker as
service server is attractive, but has its limitations, even if as I
understand it Plan 9 does precisely that.
-- 
Piercarlo "Peter" Grandi           | ARPA: pcg%cs.aber.ac.uk at nsfnet-relay.ac.uk
Dept of CS, UCW Aberystwyth        | UUCP: ...!mcvax!ukc!aber-cs!pcg
Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg at cs.aber.ac.uk



More information about the Comp.unix.wizards mailing list