------------------------------------------------------------------------------- M. G. Gouda CS 356 Fall 2004 Homework 2 ------------------------------------------------------------------------------- 1.[2 points] Solve Problem 7 in Chapter 5. ------------------------------------------------------------------------------- 2.[2 points] Solve Problem 3 in Chapter 5. ------------------------------------------------------------------------------- 3.[3 points] Consider a network that consists of processes p and q[i:0..n-1]. At any given time, process p can establish a connection with at most one q[i], using the connection protocol that uses timeout in Section 6.1. The data structure for process p is as follows: process p const n input m : integer {m>0} var conp : boolean, {init. false} cansend : 0..m, x : 0..n-1 {init. any} par y : 0..n-1 Design the actions in process p. ------------------------------------------------------------------------------- 4.[3 points] The length of a data block in the corruption detection protocol that uses parity bits in Section 8.1 is defined in terms of two constants m and n. It is required to compute the optimal values of m and n for this protocol, given the follwing facts. Let b be the total number of data and parity bits in a data block, and let r be the maximum number of bits in a corruption burst. The value of b is in the range from 1 to 299 and the value of r depends on the chosen value of b as follows. If b is chosen in the range 1..99 then r should be 10 If b is chosen in the range 100..199 then r should be 15 If b is chosen in the range 200..299 then r should be 24 (Hint: The optimal values for m and n are those that minimize the ratio (k/(m*n)), where k is the number of parity bits and m*n is the number of data bits in a data block.) -------------------------------------------------------------------------------