About Inter-process Communication

Adam Lackorzynski adam at os.inf.tu-dresden.de
Tue Jul 24 23:24:48 CEST 2012


Hi,

On Tue Jul 24, 2012 at 19:15:17 +0800, ZhangEditing wrote:
> I need to send megabytes of data from one virtual machine to another.
> I looked into source code of IPC streams for C++, but did not find any
> facility for sending the content of a large buffer (say, 512B).

Exchanging larger amounts of data between tasks (or VMs) is typically
done using shared memory, i.e. a piece of memory shared between both (or
more) parties and interrupts for notification.

> I have also noticed the buffer registers in the UTCB, but I haven't
> figured out how to use it.

Buffer registers are used for mappings and not for data.

> If there is a way to send the content of a large buffer, would you
> please reference me to the related documents?
> A simple example would be very helpful. 		 	   		  

There a shared memory library, see l4/pkg/shmc and
4/pkg/examples/libs/shmc/. The lib just wraps around a dataspace that
is shared between some tasks. There's also a more low-level example:
l4/pkg/examples/libs/l4re/c++/shared_ds/. This example is a client and
server one, where the client requests the dataspace from the server.



Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/




More information about the l4-hackers mailing list