开发者

Graph algorithms (lib) with input graph in read-only shared memory on C/++

I would like to have a manager process sharing graphs via shared memory, read-only for other processes which will run various graph algorithms on these graphs. I would like to ask some questions emerged while researching the issue:

  • Are there any graph libraries which are able to operate on (possibly their own) graph structures in read-only shm? That is, the algorithms would need to have their workspace and result buffers in the local process memory, and not use any buffers declared in the graph structure.

  • Two libs which I know are famous are igraph and Boost. I don't know much about the C interface of the former and hav开发者_JS百科en't used Boost yet. Any experience in the topic (regarding shm compatibility)?

  • When looking in the Boost docs, I see that there is a Boost.Interprocess package with shm support.

    • At first I thought about using manually crafted shm with mmapped shm (Linux platform). Is Boost superior and recommended over this method?
    • Does the Boost Graph library plays nice along with manual shm or Interprocess?

Apart from insights about these questions I would be glad to read about your experience regarding graph processing and shared memory. Thanks!


In Boost Graph Library the various graph types are just concepts ( http://www.boost.org/doc/libs/1_42_0/libs/graph/doc/graph_concepts.html ).

You should be able to implement your own graph structure, adhere to the concept you need and apply any BGL algorithm on your own data (or perhaps just wrap your shared data in an edge_list class http://www.boost.org/doc/libs/1_42_0/libs/graph/doc/edge_list.html ).

Since you are looking at shared memory you might also be interested in the Parallel BGL ( http://www.boost.org/doc/libs/1_42_0/libs/graph_parallel/doc/html/index.html )

HTH

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜