[comp.unix.misc] Interprocess Communication / Multitasking

wht@n4hgf.Mt-Park.GA.US (Warren Tucker) (02/16/91)

In article <mark.666469192@typhoon.ucar.edu> bradfrd2@ncar.ucar.edu (Mark Bradford) writes:
>
>Here's the project: a real time data ingestion and archival system,
>built from several multitasking and cooperating programs using
>They say that UNIX is "notoriously lacking" in the necessary
>constructs to do this multitasking

UNIX lacks "lightweight processes," threads which execute within
a single address space (alas), but System V has all of the
necessary mechanisms for classical coprocessing (shared memory,
messaging, semaphores), so on the Sun you are in luck.  BSD has a
(usually unimplemented) mmap call which can support shared
memory, but lacks the other formal mechanisms you need (there are
hacks, but they are hacks).

You probably heard of "lacking" in reference to BSD.  System V
IPC has a bad name, but only among those have little experience
with the concepts involved or who have `enjoyed' exposure to it
on broken implementations.  The only pseudoproblem I have ever
had with it is key selection algorithms.  With a 32-bit key
`space', key management is problematical, but usually practicable.
 
-----------------------------------------------------------------------
Warren Tucker, TuckerWare   gatech!n4hgf!wht or wht@n4hgf.Mt-Park.GA.US
Many [Nobel physics] prizes  have been given  to people for  telling us
the universe is not as simple as we thought it was. -Stephen Hawking in
A Brief History of Time     In computing, there are no such prizes. -me
-- 
----------------------------------------------------------------------------
Warren Tucker, Tridom Corporation, gatech!n4hgf!wht, wht@n4hgf.Mt-Park.GA.US
When bad men combine,  the good must associate;  else they will  fall one by 
one, an unpitied sacrifice in a contemptible struggle. -Edmund Burke

djones@megatest.UUCP (Dave Jones) (02/20/91)

From article <320@n4hgf.Mt-Park.GA.US), by wht@n4hgf.Mt-Park.GA.US (Warren Tucker):
) In article <mark.666469192@typhoon.ucar.edu) bradfrd2@ncar.ucar.edu (Mark Bradford) writes:
))
))Here's the project: a real time data ingestion and archival system,
))built from several multitasking and cooperating programs using
))They say that UNIX is "notoriously lacking" in the necessary
))constructs to do this multitasking
) 
) UNIX lacks "lightweight processes," threads which execute within
) a single address space (alas) ...

Sun's "release 4" Unix, (an amalgam of BSD and ATT flavors), comes with
a lightweight process package. I've only looked at it long enough to
speculate, "I wouldn't have done it that way," but it may be just the
ticket for you. If you have a Sun workstation, say, "man lpw_create" to get
started.

wht@n4hgf.Mt-Park.GA.US (Warren Tucker) (02/22/91)

In article <15345@megatest.UUCP> djones@megatest.UUCP (Dave Jones) writes:
>From article <320@n4hgf.Mt-Park.GA.US), by wht@n4hgf.Mt-Park.GA.US (Warren Tucker):
>) UNIX lacks "lightweight processes," threads which execute within
>) a single address space (alas) ...
>
>Sun's "release 4" Unix, (an amalgam of BSD and ATT flavors), comes with
>a lightweight process package. I've only looked at it long enough to
>speculate, "I wouldn't have done it that way," but it may be just the
>ticket for you. If you have a Sun workstation, say, "man lpw_create" to get
>started.

Here's a big plus for "non-standard UNIX!!"

I have only looked briefly myself, but the implementation appears
to be a very rich superset of rather classical in-process
multiprocessing, like what I used to use quite profitably on Data
General's RDOS and AOS, Interdata's OS-32MT and --oh well, I
betray my age if I go on.

Thanks for the pointer, Dave.  I thought it quite odd when I came
to UNIX and found that you HAVE to use shared memory and Ph.D.
class IPC to communicate among threads.  At least you can get by
with S5.  With BSD, ye be sucking wind.  Lightweight processes
are a very very big plus for communications programs dealing with
a full duplex line.  fork(2) may be elegant, but it has always
reminded me of the physicist joke that ends with "First, assume a
spherical horse."

Now, maybe in Sys V Release 5, when a possible reunification of
all the new deviants takes place (a la S5R4), hopest me that lpw
will be in there.
 
-----------------------------------------------------------------------
Warren Tucker, TuckerWare   gatech!n4hgf!wht or wht@n4hgf.Mt-Park.GA.US
Many [Nobel physics] prizes  have been given  to people for  telling us
the universe is not as simple as we thought it was. -Stephen Hawking in
A Brief History of Time     In computing, there are no such prizes. -me