[英]Can boost do shared memory between processes that are on different CPUs
If i have a multiprocessor with 2 CPUs, and i have a process running on CPU 1, and another process on CPU 2, is boost::interprocess shared memory be used between them? 如果我有一个带有2个CPU的多处理器,并且我有一个进程在CPU 1上运行,而另一个进程在CPU 2上,是否在它们之间使用boost :: interprocess共享内存? If so, how is that implemented?
如果是这样,如何实施? I couldn't find any documentation in the boost docs about it
我在关于它的增强文档中找不到任何文档
It is not advantage of boost, but platform. 这不是Boost的优势,而是平台。 Boost uses shmem or memory mapped files support in the level of operating system.
Boost在操作系统级别使用shmem或内存映射文件支持。
Yes, if you're on either an SMP or standard NUMA system. 是的,如果您使用的是SMP或标准NUMA系统。
Maybe not if some of your CPUs are running on daughter boards or similar. 如果您的某些CPU在子板上或类似板上运行,则可能不会。
The OS and underlying hardware platform (which you haven't told us) control this, and you should be able to ask a question specific to that OS/platform in an appropriate forum if you're still not sure. 操作系统和底层硬件平台(您尚未告诉我们)可以控制此操作,如果您不确定,您应该可以在适当的论坛中提出特定于该操作系统/平台的问题。
If you're not sure which of the above two cases are relevant, it's almost certain you're on a general-purpose platform and it will all work. 如果您不确定上述两种情况中的哪一种是相关的,那么几乎可以肯定您使用的是通用平台,并且一切正常。 Note that Boost may not expose NUMA affinity control however, if you want to choose which node pages are allocated on.
请注意,如果要选择分配哪些节点页面,Boost可能不会公开NUMA关联性控件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.