Parent process preforked a number of process and each preforked process created number of threads (thread pools). All the thread in the same address space can share the data and can use the different synchronization techniques for critical sections. I want to know how to synchronized between threads which are from different address space. My initial thought (I may be wrong) is to use shared memory and uses semaphore for synchronization. This design will increase two much use of semaphores/mutex.
Is there a better design to overcome the problem?. I know the apache 2.0 uses the hybrid mulitprocess and multithreaded server design. It will be helpful if i have some skeleton code idea for hybrid approach. I am more focusing on scalability and robustness.