Solved

How to synchronise shared memory.

Posted on 2006-10-25
6
236 Views
Last Modified: 2013-11-20
Hi,

I am using shared memory to share a text string between different processes, in which one process read data from memory which is updated by other processes. but how can i synchronise the data when multiple process are updating the same memory?

Thanks in Advance.
-Devender

0
Comment
Question by:devenderzensar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 50 total points
ID: 17801867
You can do this using named mutex.

http://www.codeproject.com/threads/ipc_tute.asp
See: Step 3. Synchronization.
0
 
LVL 3

Expert Comment

by:VCGuru
ID: 17801938
Semaphores, critical sections are other options. There's a lot of code on the internet
0
 

Author Comment

by:devenderzensar
ID: 17818388
I want to use shared memory to log trace information to the file. Thru my application multiple Dlls are loaded to retrieve information from further Dlls, and the leaf dll retrieve the information from the hardware. In this case i want to trace the information from my applicatio as well as all the loaded Dlls loaded in the applications memory space.

Thanks in advance.
-Devender
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Macro to save highlighted rows as a separate file 5 51
notReplace  challenge 53 153
if loop in java 3 174
bigDiff challenge 17 144
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question