Unix Programming - Efficiency of shared memory

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > January 2004 > Efficiency of shared memory





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Efficiency of shared memory
zaphod

2004-01-23, 5:01 pm

Ok, my question is how exactly is shared memory supposed to behave as
specified by the POSIX standard. If I have two processes that both use
shm_open and mmap on the same memory:
1) If one process writes to the mapped portion of the file, how soon
are the changes affecting the second process ? Is a flushing operation
required for this ?
2) How efficient is it ? Is the changes to memory being written first
to file by the first process then read from file by second process
(inefficient) or is the RAM really being shared without necessarily
involving disk operations ? Or is it a combination of the two ...
3) How much more efficient is using shared memory over using
non-buffered IO ?
I would appreciate it if anyone could suppy some answers to these
questions,

Zaphod
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com