“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.”
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.
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
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.
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…
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.