What are all the differences between pipes and message queues?
Please explain both from vxworks & unix perspectives.
I think pipes are unidirectional but message queues aren't.
But don't pipes internally use message queues, then how come pipes are unidirectional but message queues are not?
What are the other differences you can think of (from design or usage or other perspectives)?
A traditional pipe is “unnamed” and lasts only as long as the process. A named pipe, however, can last as long as the system is up, beyond the life of the process. It can be deleted if no longer used. Usually a named pipe appears as a file and generally processes attach to it for inter-process communication.
The pipe has no name; it is created for one use and both ends must be inherited from the single process which created the pipe. A FIFO special file is similar to a pipe, but instead of being an anonymous, temporary connection, a FIFO has a name or names like any other file.
The system has different types of message queues: workstation message queue, user profile message queue, job message queue, system operator message queue, and history log message queue.
The main difference between queues and pipes is the message size. Queues carry messages comprising a single ADDR – these would commonly be pointers. A pipe carries messages which are an arbitrary number of bytes long; the size is fixed for each pipe in the application and set at configuration time. Configuring Queues.
Message Queues are:
Pipes
That's what I can think of right now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With