Shared memory and IPC
Wez Furlong
wez at thebrainroom.com
Fri Sep 7 02:06:02 GMT 2001
On 06/09/01, "Luke Kenneth Casson Leighton" <lkcl at samba-tng.org> wrote:
> what happens if you run out and have to get some more
> MMAP_FIXED segments? how do you guarantee that all
> processes will all successfully mmap the same shared
> memory segment at the same address? how do you
> communicate the _need_ to get more MMAPED_FIXED
> segments to all processes? :)
You could have a well-known segment that lists the current
state of the maps, allocated chunks within the maps etc.
You would also keep a ctime for the maps, and a list of processes
that use the maps.
When someone adds a map, they update the ctime and send an async
signal to all the interested processes, which wake up and map
any regions that are newer than they remember.
Sounds a bit kludgy though...
> or, should the first implementation avoid this by
> specifying the required segment size at apr_initialise()
> time or as a parameter to apr_sms_shmem_create()?
Probably :)
--Wez.
More information about the samba-technical
mailing list