Async pipes under SYS3,SYS5
paul at hp-lsd.UUCP
paul at hp-lsd.UUCP
Wed Jul 11 04:16:00 AEST 1984
Nf-From: hp-lsd!paul Jul 24 10:16:00 1984
The basic win with named pipes (or FIFO's) is that you can connect unrelated
processes with pipes. GWYN at BRL gave a good general use for them and I can
add a couple more along the same lines:
Games: Now you can have your "gamesmaster" (database keeper?)
run all the time and just connect to it when playing is
convenient.
(More seriously - any global database managing program can be wired
this way)
Message-based systems can be implemented (somewhat) if you remember
that writes to pipes of 4K or less (a safe value I think on seeing
various unices) are atomic. This means that if you separate your
writes to the pipes (ie.. length followed by data) you can read
from several processes at once on one channel (nice since you don't
have select() in SYS-III). [This is a good way to tell the
gamesmaster that you want to play now - and can potentially handle all
the input from the various simultaneous players]. For message-based
systems, it is probably nice to have a publicly known "mailbox"
(or named pipe) connected to a name server for finding out who
else is "out there".
As mentioned, line printer spoolers are a good application as well
as most any time you want to arbitrate one resource with a program
(even a network connection?).
--Paul Bame
HP Logic Systems Division - Colorado Springs
{ihnp4!hpfcla, hplabs} !hp-lsd!paul
More information about the Comp.unix
mailing list