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

Buffering of Messages

Consider the case when a process sends the value of variable smesg to some port. While the message is in transit, it needs to be kept in some memory area. It may be kept in the sender's address space (in the variable smesg), 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 and does not require copying to and from a buffer. However, it is not suitable if asynchronous sends are allowed (why?).

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? There are no good general answers to these questions.


Prasun Dewan
Tue Sep 24 14:33:02 EDT 1996