Re: About Inter-process Communication
Adam Lackorzynski <[email protected]>
| Newsgroups | gmane.comp.micro-kernel.l4.devel |
|---|---|
| Message-ID | <[email protected]> |
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 [email protected] Lackorzynski http://os.inf.tu-dresden.de/~adam/