Solved

Shared memory

Posted on 1998-06-08
2
226 Views
Last Modified: 2013-12-26
I want to have a region that can be read by many applications at the same time, but only one application at the time can write.  There can be no reader during a writer.  There can be many reader at once.
I'm using MQX, witch is similar to QNX.
Maybe with mutex or semaphore components...

   Thanks in advance.
0
Comment
Question by:pchaloux
[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
2 Comments
 
LVL 1

Accepted Solution

by:
vijayakumar earned 200 total points
ID: 1292674
You can use Shared memory which allows to share a given region of memory for two or more applications. You can use semaphores for synchronizing the shared memory access. The system calls for
doing this are shmget (to get shared memory), shmat(to attach to shared memory segment) and shmctl( for control operations ex. removing the shared memory). For Synchronizing the shared memory use semaphore system calls namely semget ( to get a sempahore id ), semop (to perform array of operation on sempahore set) and semctl(for control operations). Hope this helps.
0
 

Author Comment

by:pchaloux
ID: 1292675
thank you
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

726 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