Solved

Shared memory

Posted on 1998-06-08
2
195 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

910 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now