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.