[lug] Quote of the Day

Sean Reifschneider jafo at tummy.com
Wed Jan 31 14:57:03 MST 2001


On Wed, Jan 31, 2001 at 01:11:31PM +0100, rm at mamma.varadinet.de wrote:
>'doers' threading does have some nice advantages. While this is
>certainly possible with processes (via IPC/shared memory/messages/se-
>maphores ...) the code starts to look rather uggly. 

Beauty is in the eye of the beholder.  To me, doing a regular variable
access which impacts another process is "ugly".  You still need to use
semaphores or the like to mediate access to the data, so I don't see that
it's really any cleaner that establishing shared memory or using a
memory mapped file...

>... as long as the process doesn't share data structures with others.
>Unfortunately, SysV IPC mechanisms don't have a 'cleanup-on-exit'. So,
>while your OS of  choice does release resource like filehandles etc.

That's more an issue for the "master", where the processes that tend
to die are more the helpers (which don't typicly create and destroy
the IPC instances).

>and 'ipcrm' to do the cleanup (i recall older versions of postgresql
>that needed manual cleanup every time a backend process died).

I haven't had to use those tools in many years, obviously postgresql
and apache are dealing with IPC issues fairly well these days...

Sean
-- 
 On seeing a girl with a pierced tongue, he thought, "Just like
 Microsoft.  Can't do the job right, so throw hardware at it."
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python



More information about the LUG mailing list