------------------------------------------------------------------------------ Mohamed G. Gouda Midterm 1 CS 356: Computer Networks Spring 2008 ------------------------------------------------------------------------------ Open Book 75 Minutes ----------------------------------------------------------------------------- 1. (10 points) Assume that the Resource/Allocation Protocol in Section 4.5 is to be simplified as follows: the s resources in the protocol are all of the same kind. Thus, the exchanged messages between a user u[i] and controller c in the simplified protocol are rqst, grant, and rls (instead of rqst(r), grant(r), and rls(r), respectively). Use the AP notation to specify the controller c in the simplified protocol. ----------------------------------------------------------------------------- 2. (10 points) Consider a protocol that consists of two processes p and q. Process p sends rqst(i) messages to process q and q replies by sending back a rply(i) message for each rqst(i) message that it receives from p, where i is in the range 0..n-1 and n is a declared constant in p and q. Process p can send a rqst(i) message only after it has sent a rqst(i-1 mod n) message and only after it has received a rply(i) message for the last rqst(i) message that p has sent earlier to q. Assuming that the exchanged messages between p and q can be reordered but neither lost nor corrupted, specify processes p and q. ------------------------------------------------------------------------------