Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!snorkelwacker!bloom-beacon!eru!luth!sunic!tut!santra!mcsun!ukc!dcl-cs!aber-cs!pcg From: pcg@aber-cs.UUCP (Piercarlo Grandi) Newsgroups: comp.unix.wizards Subject: Re: programmatic devices Summary: portals: Another unimplemented 4.xBSD feature. Message-ID: <1559@aber-cs.UUCP> Date: 29 Dec 89 22:44:04 GMT Reply-To: pcg@cs.aber.ac.uk (Piercarlo Grandi) Organization: Dept of CS, UCW Aberystwyth (Disclaimer: my statements are purely personal) Lines: 35 In article <3062@cbnewsj.ATT.COM> avr@cbnewsj.ATT.COM (adam.v.reed) writes: In article <10641@ucsd.Edu>, brian@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@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcvax!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk