Synchronizing shared memory read and write

what is the best way to synchronize read and write of shared memory from multiple process? Or is this already handled some how?

What do you mean by synchronized? There is nothing to synchronized, it just happen. However if you want to protect data again simultaneous data access there are many different method.s The first which I like is to find a way to organized the data so it doesn’t need any protection.

If you absolutely need some sort of protection, you can use mutex, semaphore, rwlock, custom message, and there are probably other I’m missing.