Consider the interprocess-communication scheme where mailboxes are used.
a. Suppose a process P wants to wait for two messages, one from mailbox A and one from mailbox B. What sequence of send and receive should it execute?
b. What sequence of send and receive should P execute if P wants to wait for one message either from mailbox A or from mailbox B (or from both)?
c. A receive operation makes a process wait until the mailbox is nonempty. Either devise a scheme that allows a process to wait until a mailbox is empty, or explain why such a scheme can-not exist.