Message Passing: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
Line 35: Line 35:


To solve situations when a server is willing to receive messages from different ports (and synchronous messaging is used), we need a select-like interface that will allow reception of a message from any port p in a given set of ports.
To solve situations when a server is willing to receive messages from different ports (and synchronous messaging is used), we need a select-like interface that will allow reception of a message from any port p in a given set of ports.

==Mailboxes==
There may be some cases in which a thread will want to broadcast the same message to multiple threads at once, or perhaps a set of producer threads has to communicate with another set of consumer threads. In such cases, mailboxes can queue messages for multiple receivers. Mailboxes are similar to ports, except multiple recipients may retrieve messages instead of just one. A mailbox is not owned by a single thread, but is a common resource provided by the OS that's shared among the receiving threads. The order in which messages are received may either be ''first-in-first-out'' (FIFO) or based on message priority.


==Variable or Fixed Messages Size==
==Variable or Fixed Messages Size==
Line 53: Line 56:
=== External Links ===
=== External Links ===
*[[Wikipedia:Message Passing | Message Passing]] on Wikipedia
*[[Wikipedia:Message Passing | Message Passing]] on Wikipedia
*[[Wikipedia:Message queue | Message Queue]] on Wikipedia


[[Category:IPC]]
[[Category:IPC]]