[Boost-users] Fast IPC between Linux and Windows on the same host

297 views
Skip to first unread message

U.Mutlu

unread,
Dec 24, 2013, 11:49:45 AM12/24/13
to boost...@lists.boost.org
Hi,
what is the fastest cross-platform IPC mechanism
between Linux and Windows on the same physical host?

Additional info:
Host OS is Linux (Debian), Windows XP is hosted in VirtualBox.
Of course TCP/IP sockets is a possibility, but I need something much faster.
My preference would be to use shared memory,
but is it possible in such an heterogene environment?
And: can Boost.Interprocess be used for this scenario?

Thx

--
U.Mutlu
DACOS Notdienstanlagen GmbH, Germany

_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Gavin Lambert

unread,
Jan 13, 2014, 1:22:43 AM1/13/14
to boost...@lists.boost.org
On 25/12/2013 05:49, Quoth U.Mutlu:
> what is the fastest cross-platform IPC mechanism
> between Linux and Windows on the same physical host?
>
> Additional info:
> Host OS is Linux (Debian), Windows XP is hosted in VirtualBox.
> Of course TCP/IP sockets is a possibility, but I need something much
> faster.
> My preference would be to use shared memory,
> but is it possible in such an heterogene environment?
> And: can Boost.Interprocess be used for this scenario?

Part of the point of a virtual PC is that it's an isolate environment,
so shared memory wouldn't work even if they were the same OS.

If you know that it's hosted in VirtualBox you could see if there's some
kind of host-to-guest communication API provided by VirtualBox itself (I
know that VMware has something like that, for example; I don't know if
VirtualBox has something similar or not).

Short of that, you'll need to use whatever you'd use if they were two
separate PCs (albeit hopefully on a shared network) -- most likely sockets.

Or you'll need to see if you can recompile whatever is running in the
guest so that it can run on the host directly instead.

Dominique Devienne

unread,
Jan 13, 2014, 3:37:30 AM1/13/14
to boost-users
On Tue, Dec 24, 2013 at 5:49 PM, U.Mutlu <for-...@mutluit.com> wrote:
what is the fastest cross-platform IPC mechanism
between Linux and Windows on the same physical host?

Not IPC per se, but this article might be of interest in your case. --DD 

Dominique Devienne

unread,
Jan 13, 2014, 3:37:48 AM1/13/14
to boost-users

Slava

unread,
Jan 13, 2014, 10:54:10 AM1/13/14
to boost...@lists.boost.org
On Mon, 13 Jan 2014 09:37:48 +0100, Dominique Devienne
A word of caution though: vmhgfs module is compilable only on <3.10
kernels. There are patches for newer kernels and even a whole OSS project
with patches for newer kernels, but the stability of the filesystem is not
all right. Both oracle and postgres databases occasionally end with
corrupted database if the database files are being hold on vmhgfs (I had
linux host and linux guest setup).

Regards, Slava

U.Mutlu

unread,
Jan 13, 2014, 11:53:51 AM1/13/14
to boost...@lists.boost.org
Gavin Lambert wrote, On 01/13/2014 07:22 AM:
> On 25/12/2013 05:49, Quoth U.Mutlu:
>> what is the fastest cross-platform IPC mechanism
>> between Linux and Windows on the same physical host?
>>
>> Additional info:
>> Host OS is Linux (Debian), Windows XP is hosted in VirtualBox.
>> Of course TCP/IP sockets is a possibility, but I need something much
>> faster.
>> My preference would be to use shared memory,
>> but is it possible in such an heterogene environment?
>> And: can Boost.Interprocess be used for this scenario?
>
> Part of the point of a virtual PC is that it's an isolate environment, so
> shared memory wouldn't work even if they were the same OS.
>
> If you know that it's hosted in VirtualBox you could see if there's some kind
> of host-to-guest communication API provided by VirtualBox itself (I know that
> VMware has something like that, for example; I don't know if VirtualBox has
> something similar or not).

In VirtualBox there seems to be such an API called HGCM,
but usage examples are scarce, and I don't know yet
if it's performance is any faster than a socket connection.

I just need a possibility to lock some physical memory
(less than the smallest page size of both OSes) and pass
its physical address to the process in the virtual machine.
With this approach there is this question: can an OS access
a pyhsical memory location that is not in its own pool, and control?
If yes, then I think one could write a small kernel driver...

> Short of that, you'll need to use whatever you'd use if they were two separate
> PCs (albeit hopefully on a shared network) -- most likely sockets.

Another alternative is creating a ramdisk in the host
and sharing it with the guest OS. This I already have tested,
it works, but even if it is a ramdisk, I think a direct
memory operation would be many factors faster.

> Or you'll need to see if you can recompile whatever is running in the guest so
> that it can run on the host directly instead.

Unfortunately there are some (dead) Microsoft "technologies"
from the stone-age that is no more supported by Microsoft
(very old MDB format, that is MS Access 2.0 format; unfortunately
I haven't found a Linux MDB-library that covers this old version;
unfortunately "mdbtools" does not cover this format,
and I'm not sure yet if it would work in Wine).
Ie. the usual catch-22 proprietary dependeny crap from and by MS...
I just inherited this old (binary-only) project, a rewrite would be very
costly, therefore the solution using Windows VirtualBox... :-(
Now my need for a very fast data exchange between the host and the guest.

Slava

unread,
Jan 13, 2014, 12:40:26 PM1/13/14
to boost...@lists.boost.org
On Mon, 13 Jan 2014 17:53:51 +0100, U.Mutlu <for-...@mutluit.com> wrote:

> I just inherited this old (binary-only) project, a rewrite would be very
> costly, therefore the solution using Windows VirtualBox... Now my need
> for a very fast data exchange between the host and the guest.

Maybe wine could offer a solution?

Regards, Slava
Reply all
Reply to author
Forward
0 new messages