Reading material
Pages 10, 11, 19, 26-39 of
Cooperating Sequential Processes
by E.W. Dijkstra (the other pages are also of interest and you are suggested to at least skim through them).