Pipes read or write bytes to a virtual file in memory. Anonymous pipes are pipes that don't have a name, and so may be used only between parent and child or child and child-related programs. A pipe name is like a file name. This allows any program in the system to obtain the name from the kernel and use the pipe. Named pipes are used more often than anonymous pipes because they allow two unrelated programs to communicate.
Messages are small packets of data that are placed in a queue.
They are named, and therefore any process can open the message queue and receive the message. Messages can be classified by type, and receiving programs may read only a particular type of message. Two message queues are required to establish two-way communication. Shared memory is the fastest inter-process communication mechanism. Essentially, a memory area is mapped into each of two different programs.