[clug] Semaphores and shared memory

Jepri jepri at webone.com.au
Tue Dec 9 08:18:22 GMT 2003

I've got some chunky data files that I would like to access at the same 
time from different programs.  I know that I can mmap the files into 
different programs at the same time, but what's the right way (TM)  for 
the programs to let each other know when they are updating the files?  
Ideally I'd use mutex or something, but I'm not sure how to share these 
between programs that do not have a common parent.  Do I have to resort 
to some kind of formal IPC like SysV shared memory ?

And what are semaphores anyway?  Are they indexes into a kernel 
semaphore table or what?

More information about the linux mailing list