------------------------------------------------------------------------------ Mohamed G. Gouda Midterm 3 CS 356: Computer Networks Spring 2007O Open Book 75 Minutes ------------------------------------------------------------------------------ 1. (10 points) In a network p[i:0..4], the following six process pairs are neighbors: {p[0],p[1]}, {p[0],p[2]}, {p[1],p[2]}, {p[1],p[3]}, {p[2],p[4]}, {p[3],p[4]} The processes in the network employ the protocool in Section 11.3 to maintain global topology information. At some instant, process p[3] has the following net array, where F stands for False and T stands for True. 0 1 2 3 4 +---+---+---+---+---+ 0 | F | T | T | F | F | +---+---+---+---+---+ 1 | T | F | T | F | F | +---+---+---+---+---+ 2 | T | T | F | F | F | +---+---+---+---+---+ 3 | F | F | F | F | T | +---+---+---+---+---+ 4 | F | F | F | T | F | +---+---+---+---+---+ Based on this net array, process p[3] can determine all the process pairs that it is sure that they are neighbors and that the two channels between them are up. Please list all the process pairs that p[3] is sure that they are neighbors and the two channels between them are up. Explain your answer. ------------------------------------------------------------------------------ 2. (10 points) Consider a "mesh" network p[i:0..m-1, j:0..n-1] where each process p[i,j] has the following neighbors: p[(i-1), j], provided i>0 p[(i+1), j], proivded i0 p[i, (j+1)], provided j j`=j+1) ^ (j > 0 => j`=j-1) ] V [j`=j ^ (i < m-1 => i`=i+1) ^ (i > 0 => i`=i-1) ] } up : array [N] of boolean {all true} var x : 0..m-1, y : 0..n-1 {ultimate destination of data msg} par g : N {any neighbor} begin true -> x,y := any, any; RTMSG [] rcv data(x,y) from p[g] -> RTMSG end Specify the statement RTMSG ensuring that the data messages are distributed along thier shortest routes. Does your specified RTMSG achieve load-balancing? Explain your answer. ------------------------------------------------------------------------------