I have read some basic concepts about semaphores
but haven't found a solution to my problem. I assume there
is an effective way to create some kind of locking mechanism for
"single writer, multiple readers" type of system?
I have a shared memory area in my system, which has to be read
very frequently by many processes, and updated infrequently by
exactly one process. If I use simple semaphore solution, which
has semaphore initial count set to one, then only one process
can read that memory area at a time, which, I assume, is not the
most effective solution? I need to protect that shared memory area,
because one process sometimes updates it (with memcpy, which I assume
is not atomic), so the memory area might contain partially old, partially
new data, which I don't want. However, there are no problems if
several processes read the area simultaneously, my only concern
is to prevent simulatenous write & read operations.
How can I implement this kind of "one writer, multiple readers"
solution in the most effective way?
----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----
http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
NewsOne.Net prohibits users from posting spam. If this or other posts