Is it a true statement that, shared memory does not work between a host OS and guest OS, but a Unix Domain Socket (specifically udp) can communicate between the two?
An in depth explanation would be appreciated, thanks!
In general Unix Domain Sockets cannot communicate between host OS and guest OS.
Unix Domain Sockets are, like e.g. Named Pipes, bound to the OS kernel. If you open the same Unix Domain Socket file node in the host and the guest, you get two different virtual network connections. One in the host kernel and one in the guest kernel. These are completely separate and cannot intercommunicate.
This doesn't apply iff host OS and guest OS share the same kernel, e.g. when using Linux namespaces/containers instead of real virtualization. Then it's possible to use Unix Domain Sockets to communicate between the systems.
For communication between two different OS kernels you need to use a real network protocol like IPv4/IPv6 or measures specific to the used virtualization software.