Linux Programming Model

From: Gmu (gmutech_at_gmail.com)
Date: 09/28/05


Date: Wed, 28 Sep 2005 13:41:11 -0600

Hi Everyone,
Hope you are all having a great day. I'm sorry for the long mail,

Here is a brief summary:
Please note that I'm not looking to understand the IPC mechanisms but for
your valuable insights and experiences
of the IPC mechanisms and programming models and what is general is
considered good in the Linux Developer world.

Please read on to find out really what I need to know.

I'm starting on a big new commercial Linux project.

There a variety of choices of IPC in Linux.
I'm trying to figure out what kind of IPC Model will be conducive for our
Application.
The application is expected to have about 100 processes and a few threads in
each process.

Is the efficient and simple IPC Mechanism Message queues?
How about writing a memory manager around shared memory? Can I use this for
all my IPC allocating say fragments
in sizes of say 4,8,16,64,128 bytes... as needed and using buddy algorithm
or somethign manmage fragmentation?
Named Pipes/Sockets may be more expensive but then there is the problem of
finding the message queue id to send to.

I'm leaning towards message queues with a very simple name server to lookup
registered message queue ids by name
and send to it as a simple form of IPC across processes and a synchronized
FIFO queue to pass around data inside a process. Any thing obviously wrong
or worth noting in this approach? Any popular Name Server in this area with
a
BSD-like license?

OK, Now the important question.. What does a popular open source Linux
project like Apache do for IPC and programming model? What is the most
popular large scale open source Linux application, If there is one
application I can
go study the source.

Any replies/pointers/links will be appreciated.

Regards,
Gmu



Relevant Pages

  • "System V IPC is a botch?"
    ... immediately used to access a message queue, semaphore set, or shared memory ... With Sys V IPC, B can ... Does not fit comfortably within the "traditional unix filesystem ... > threaded process to block on multiple message queues. ...
    (comp.unix.programmer)
  • Re: Message Queue for high performance system
    ... Would like to know if there any limitations or caveats in using Linux ... IPC message queues. ... Old *nix systems required static allocation of message queues: ...
    (comp.os.linux.embedded)
  • Re: Interprocess communication: which scenario?
    ... > I need to do the following simple interprocess communication ... > via the client's GUI (Each client's GUI is viewed by a different ... > learning molecular-level trivia about IPC to implement the application ... > message queues, etc. is most appropriate for my application model. ...
    (comp.lang.c)
  • Re: Interprocess communication: which scenario?
    ... > I need to do the following simple interprocess communication ... > via the client's GUI (Each client's GUI is viewed by a different ... > learning molecular-level trivia about IPC to implement the application ... > message queues, etc. is most appropriate for my application model. ...
    (comp.unix.programmer)
  • error when compiling source that include sys/msg.h and linux/msg.h
    ... I need to do some ipc with message queues and want to know the max message size. ... But if add this line to my source the compiler bothers about redefiniting some ipc structs... ... Debian GNU/Linux 4.0 ...
    (comp.os.linux.development.apps)