1.Fill in the blanks:
const int MAXQUEUE = 10; int queue[ MAXQUEUE ]; int tail; int head; /* Other declarations and initializations here */ void enqueue( int a ) { queue[ tail] = a; tail = (tail + 1)%MAXQUEUE; } int dequeue() { tmp = queue[ head ]; head = (head + 1)% MAXQUEUE; }3. Complete the following broadcast() procedures. sendBroadcast() sends a message to N processes that will call receiveBroadcast(). sendBroadcast() and receiveBroadcast() will block until the message has been delivered to the N processes. Don't forget to initialize the semaphores.
const int N = 5; int theMessage; /* Other declarations and initializations here */ void sendBroadcast( int msg ) { theMessage = msg; } int receiveBroadcast() { int tmp = theMessage; return tmp; }4. Write what the following acronyms stand for and give a brief description (about 4 lines each) of what they mean.
5. Number the seven layers in the ISO reference model. Give a brief description (4 lines) of what each of them represent. Also for each layer give an example of a program, protocol, or feature that falls in that layer.
6. Assume the following IP address:
8. What are the differences between UDP and TCP? Explain some of the uses of UDP (about 10 lines).
9. How large should be the retransmision timer of TCP? What are the consequences of making this timer too short or too large? How TCP estimes this timer? (about 20 lines)