You are here:

C++/Shared Memory

Advertisement


Question
HI,

I would like to learn about shared memory implementaion. I have basic idea about that. But, still i need some more example how shared memory implemented in mission critical applications. Kindly send me some reference URL or post some explainations

Answer
Hello Lakshmipathy

Shared memory is used for communication between processes. I have seen it used in simulations, where multiple processes worked on shared data to run a simulation. A "blackboard architecture" would use shared memory. See
http://en.wikipedia.org/wiki/Blackboard_system

For me, shared memory is used less often than other inter-process communication methods.

How to create shared memory depends on which operating system you are using.

For Microsoft Windows, you need to use memory mapped files. You can read about that at
http://msdn.microsoft.com/en-us/library/ms810613.aspx

For unix/linux, you can read this:
http://beej.us/guide/bgipc/output/html/multipage/shm.html

If you have difficulties understanding the links, ask me a specific question. Be sure to tell me what operating system you are using.

Best regards
Zlatko

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Zlatko

Expertise

No longer taking questions.

Experience

No longer taking questions.

Education/Credentials
No longer taking questions.

©2012 About.com, a part of The New York Times Company. All rights reserved.