CS413: Preparation for the Final Exam

When and where: Fri May 08 1998  1:00pm- 3:00pm WTHR

Material to Study:

About 70% of the final will be about the second part of the course. 30% will be about the first part.

The following questions are typical questions of the final exam.  The questions only cover the second part of the course. Examples of questions of the first part of the course can be found in your midterm exam.

1. Write what the following acronyms stand for and give a brief description (about 4 lines each) of what they mean.

  1. TCP
  2. IP
  3. UDP
  4. FTP
  5. ARP
  6. LAN
  7. HTTP
  8. SMTP
  9. WWW
  10. HTML
  11. DNS
  12. ATM
  13. CSMA/CD

2. 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.

3. Assume the following IP address:

IP Address: 128.211.1.30
SubnetMask: 255.255.255.0

4. Repeat question 3 for the following IP address:

IP Address: 208.208.141.203
SubnetMask: 255.255.255.128

5. Assume that there is an IP packet that is sent from host 128.123.0.0 to host 128.10.8.110. Explain how the packet is routed in the Internet using the network, subnetwork, and host part of the addresses.

6. Explain how the mapping from IP addresses to Ethernet addresses is done.

7. What are the differences between UDP and TCP? Explain some of the uses of UDP .

8. Explain how TCP handles the unreliability of IP .

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?

10. Explain the concept of windows in TCP. What is the advantage of using windows compared to sending a single packet only after an acknowledge has been received? What is the optimal size of the window? How does TCP changes the size of the window?

11. Explain how the domain name system (DNS) works. What does ARP and DNS have in common to make the translations efficient? Explain.

12.  The following code shows two threads that use two mutex semaphores: a) write the resource-allocation graph that describes the code,  b) From the allocation graph describe how the threads  can enter into a deadlock. c) How your result in b) changes if semaphore A is initialized to 2 instead of 1. d) How  could you prevent the deadlock?

 
semaphore A = 1;
semaphore B = 1;
semaphore C = 3;
void thread1()
{
    while (1) {
      wait( A );
      wait( B );
      wait( C );
      x = x - 10;
      y = y + 10;
      signal( A );
      signal( B );
      signal( C );
    }
}
void thread2()
{
    wait( B );
    wait( A );
    wait( C );
    x = x + 10;
    y = y - 10;
    signal( A );
    signal( B );
    signal( C );
}
 
 

13. a) Describe how the mapping from a virtual address to a physical address is performed. b) Explain how if a process modifies an arbitrary location 0xFFFFF, the change is not reflected in the address 0xFFFFF of other processes.

14. a) Explain how the fork() system call takes advantage of virtual memory. b) Explain how shared libraries take advantage of virtual memory. c) Explain how loading a program for execution can take advantage of virtual memory. d) Explain how multiprogramming (running multiple programs) can take advantage of virtual memory.

15 The following is a piece of the  http server of a 413 student. It  is part of the code that creates a new thread for every request .  The student complains that netscape is receiving an empty document. What is wrong with the following code?

 
    ....
    // Create a thread for every request
    ssock = accept( msock, &sin, alen );
    thr_create( .. , processRequest, ssock );
    close( ssock );
  ....
 
 


Gustavo Rodriguez-Rivera