I want to split the shared memory in reasonable pieces, but have no idea, which number is good? Are 100 shared memory handles for one application a reasonable number?
P.S: I have a produces/consumer problem. A producer writes data in shared memory, one or many consumers read the data time-shifted. The producer and the consumers should never access the same data-block. The consumers may try to access and modify the same memory-blocks. The consumer access should be managed by semaphores.
The single data-block is ca. 30kB and the entire shared memory is about 1GB. Using ca 100 pieces would for sure prevent locking for producer/consumer and minimize the number of locks required among the consumers.