VMware {code} Community
apraman
Contributor
Contributor

VMCI and synchronization

Hi,

I am using VMCI to share data between Host and VM - both can read and write in the same shared region. Can I assume that the memory is synchronised i.e, VMCI internally has mutex implemented and I need not create such. (I think that is why API requires a name so that it can create a mutex for that handle). Please let me know.

Thanks and Regards,

Ram

0 Kudos
1 Reply
anupamc
Contributor
Contributor

VMCI does not enforce synchronized access to shared memory. It's left up to the application. This is similar to sharing memory by mmap()'ing a file using MAP_SHARED. Processes sharing memory need to implement their own spinlocks, for example. VMCI datagrams provide a way to send asynchronous notifications between the processes sharing memory.

In Workstation 6.5 a socket API on top of VMCI is exported to provide a richer programming API: http://www.vmware.com/products/beta/ws/VMCIsockets.pdf

0 Kudos