Perhaps this is a good place to start reading: https://en.wikipedia.org/wiki/Communicating_sequential_proce...