0

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? If so, how is that implemented? I couldn't find any documentation in the boost docs about it

jekelija
  • 257
  • 4
  • 16

2 Answers2

1

It is not advantage of boost, but platform. Boost uses shmem or memory mapped files support in the level of operating system.

Mihran Hovsepyan
  • 10,810
  • 14
  • 61
  • 111
1

Yes, if you're on either an SMP or standard NUMA system.

Maybe not if some of your CPUs are running on daughter boards or similar.


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.

Useless
  • 64,155
  • 6
  • 88
  • 132
  • thanks for getting me pointed in the right direction; this is all very new for me and i just wasnt really sure where to even begin looking, so this gives me a good start to go do more investigating on my own – jekelija Oct 29 '14 at 15:36