Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to synchronise shared memory.

Posted on 2006-10-25
6
Medium Priority
?
243 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 200 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

730 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