Where to start when programming process synchronization algorithms like clone/fork, semaphores

Posted by David on Stack Overflow See other posts from Stack Overflow or by David
Published on 2010-03-30T16:30:44Z Indexed on 2010/03/30 16:33 UTC
Read the original article Hit count: 314

I am writing a program that simulates process synchronization. I am trying to implement the fork and semaphore techniques in C++, but am having trouble starting off. Do I just create a process and send it to fork from the very beginning? Is the program just going to be one infinite loop that goes back and forth between parent/child processes? And how do you create the idea of 'shared memory' in C++, explicit memory address or just some global variable? I just need to get the overall structure/idea of the flow of the program. Any references would be appreciated.

© Stack Overflow or respective owner

Related posts about process

Related posts about synchronization