next up previous
Next: Pipes Up: Message Passing Previous: Synchronous vs Asynchronous

Buffering of Messages

A message sent by a process needs to be kept in some memory area until the receiving machine has received it. It may be kept in the sender's address space or may be buffered in an address space managed by the operating system such as the process table.

Keeping the data in the sender's address space is both time and space efficient: It does not require space for buffering sent messages and does not require copying to and from a buffer. However, it is not suitable if asynchronous sends are allowed (why?).

Similarly, a message must be buffered in the receiver's machine until a process receives it. This buffering must be provided by the operating system.

Several questions arise when data are buffered by the OS: What is the size of a message buffered by the OS? How many buffers are allocated? What happens when the buffer area gets exhausted? Are buffers allocated per port, per process, or shared by all processes and ports? Do receive and send buffers share a common buffer pool? There are no good general answers to these questions.


next up previous
Next: Pipes Up: Message Passing Previous: Synchronous vs Asynchronous
Prasun Dewan 2006-02-02