Linked by Thom Holwerda on Thu 1st Feb 2007 14:28 UTC, submitted by BlueVoodoo
General Unix "The UNIX operating system provides a rich set of features that allows processes to communicate with each other. Known as Inter-Process Communication, you can use this communication method to reconfigure an application at run time or to share data between different processes that are running in parallel. This article teaches you how to identify the methods that applications can use to communicate with each other, select the most appropriate method for your application, and begin your implementation."
Order by: Score:
Multi-Process vs. Multi-Threaded
by phoehne on Thu 1st Feb 2007 15:26 UTC
phoehne
Member since:
2006-08-26

A lot of people assume if you need to run two tasks in parallel that multi-threading is always superior to multi-processing. Sometimes it's easier to write more secure and robust solutions that use multiple processes, or to fork a process as needed to handle a task. I know I'm guilty of heading for pthreads without first really thinking about the best solution to the problem.

Reply Score: 3

A bit outdated ...
by antwarrior on Thu 1st Feb 2007 16:03 UTC
antwarrior
Member since:
2006-02-11

IPC consists of sharing information between applications, back in the day this used to consist of information that was not very "rich" and tended to be very application specific. Very few developers i know even know what pipes and semaphores are let alone how to use them. People who use these techiques tend be developing systems software

I understand the problem that semaphores tries to solve in concurrent processes but it's crazy to think that developers really want to dabble with these ideas ( with so much oppurtunity to get it beautifully wrong ) in their application development.

Modern programs share data like images, text and documents and use event handling, message passing frameworks to handling data exchange and sequencing between concurrent processes. ... SYS V model was nice, back in the day , but you rarely see it in this day, as a developer, unless you are writing system software , or you are debugging an application that might try to solve these problems with it's own framework. That has been my experience so far. any found it to be different

Reply Score: 1

RE: A bit outdated ...
by fffffh on Thu 1st Feb 2007 17:14 UTC in reply to "A bit outdated ... "
fffffh Member since:
2006-01-04

Yes and no.

Apache http daemon use SYSV IPC semaphores.
Mozilla browsers use IPC SHM (Evince connection).
Oracle (DB) use SHM/SYSV Semaphores.
The list can continue.

Reply Score: 1

RE[2]: A bit outdated ...
by antwarrior on Thu 1st Feb 2007 20:52 UTC in reply to "RE: A bit outdated ... "
antwarrior Member since:
2006-02-11

i think you misunderstood slightly what I meant, or maybe i misunderstood the focus of the article when i read it.
i am referring to communication between programs not the programming communicating with itself or a parts of itself...

Reply Score: 1

RE: A bit outdated ...
by samad on Thu 1st Feb 2007 17:21 UTC in reply to "A bit outdated ... "
samad Member since:
2006-03-31

Sockets require more effort, but the benefit is sockets can communicate with local processes AND remote processes on far away machines, without any change in the source code.

Why write a parallel processing program using pipes? They have little or no room for distributed computing. Writing such a program using sockets would allow the possibility of distributed computing.

Reply Score: 1