\item Let the program you write be called \item PROBLEM: we have a set of girl processes and a set of boy processes. % Each boy can only talk to a girl through another girl intermediary. % Each girl can only talk to a boy through another boy intermediary. % Each boy can talk to any boy and each girl can talk to any girl. % The intermediary must do pass the question, and return the answer. While an intermediary is doing its job, it must not initiate its own conversation or accept new intermediary jobs. % Initially, every process knows the indices ($0,1,2,\ldots$) of all the other processes, but do not know their "names" (which is just the pid of the process). Each process is only allowed to stop after (1) it know every one's names and (2) it has given its name to every other process. When it stops, it prints the list of names (with associated processes). % The problem is that we may get into a deadlock situation: B1 waits for G1, and G1 waits for B2, and B2 waits for G2, and G1 waits for B1. To prevent this, we need t \ignore{ Here is the snag: there are fast and slow processes. The slow ones sleep for 1 second before going to the next task. No process knows about the speed of the other processes. } %