Home > Archive > Unix Programming > August 2005 > query on Message queues
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
query on Message queues
|
|
| rahul8143@gmail.com 2005-08-29, 7:56 am |
| hello,
I read one statement about message queues that "Message queues
can be used between related and unrelated processes running on a
machine"
I want to know what is related and unrelated processes mean?
what are the examples for both related and unrelated processes on linux
OS?
regards,
rahul.
| |
| Fletcher Glenn 2005-08-29, 7:01 pm |
| rahul8143@gmail.com wrote:
> hello,
> I read one statement about message queues that "Message queues
> can be used between related and unrelated processes running on a
> machine"
> I want to know what is related and unrelated processes mean?
> what are the examples for both related and unrelated processes on linux
> OS?
> regards,
> rahul.
>
From this and your other posts, it sounds like you need to
crack your textbook and actually read it.
--
Fletcher
| |
| rahul8143@gmail.com 2005-08-29, 7:01 pm |
|
Fletcher Glenn wrote:
> rahul8143@gmail.com wrote:
>
> From this and your other posts, it sounds like you need to
> crack your textbook and actually read it.
>
Why i ask because i am between related and unrelated
word. its ok to use message queue for unrelated processes as both might
require each others data as input and output but in what context
related processes need message queue?
> --
>
> Fletcher
| |
| Gordon Burditt 2005-08-29, 7:01 pm |
| > I read one statement about message queues that "Message queues
>can be used between related and unrelated processes running on a
>machine"
> I want to know what is related and unrelated processes mean?
Processes are related if one is the parent or child of another, or
they are both child processes of a common ancestor. (Ok, nitpickers,
init is a common ancestor of all processes on the same machine, but
it's not generally too cooperative about setting up communication
between processes.)
Unnamed pipes can be used as a communication mechanism between
related processes, but it requires the common ancestor to create
the pipe and pass down the open file descriptor to the processes
doing the communicating.
>what are the examples for both related and unrelated processes on linux
>OS?
Related processes include a bunch of processes started by your shell
in response to a long, complicated pipeline command. Unrelated
processes include something forked by your mail client communicating
with the SMTP daemon on the local machine, the resolver code in
your process talking to the local nameserver, or your Mozilla client
talking to the local (caching) instance of Apache. Generally,
something called a "daemon" is unrelated to the processes it
communicates with (which might be on another host, also), although
there may also be communication between the "dispatcher" daemon
process (often listens on a socket) and "worker" daemon processes
(actually do requests) which may work more like "related process"
communication.
Gordon L. Burditt
| |
| Nils O. Selåsdal 2005-08-30, 3:56 am |
| rahul8143@gmail.com wrote:
> Fletcher Glenn wrote:
>
>
> Why i ask because i am between related and unrelated
> word. its ok to use message queue for unrelated processes as both might
> require each others data as input and output but in what context
> related processes need message queue?
Why ? Depends, usually when they want to pass information to eachother,
and the author found message queues a suitable form of interprocess
communication for the task :-)
| |
| Nils O. Selåsdal 2005-08-30, 3:56 am |
| Nils O. Selåsdal wrote:
> rahul8143@gmail.com wrote:
>
>
> Why ? Depends, usually when they want to pass information to eachother,
> and the author found message queues a suitable form of interprocess
> communication for the task :-)
Oh, and perhaps to clarify the related vs unrelated. A process
is usually said to be related with another if the other process
is either a parent or child of the process. (grandchild/grandparents
might qualify as well.)
That means one could establish various means of communication, such
as a pipe.
Between unrelated processes one must establish other means of
communication. Usually some can be resolved by a name,
such as a named pipe, unix sockets, files, message queues and others.
|
|
|
|
|