CS422: Fall2006 Midterm
| Question |
Max. |
Current |
| Part I. True and False |
10 pts. |
|
| 1-5 |
15pts |
|
| 6-10 |
15pts |
|
| 11-15 |
15pts. |
|
| 16-19 |
15 pts. |
|
| 20. |
10 pts |
|
| 21. |
10 pts |
|
| 22. |
10 pts |
Part I. Answer True or False (T/F) (1 point each).
___ The application that promoted the start of the Internet
was remote computer access.
___ Quantization noise is possible in analog
encoding.
____In RS232 the start bit is 1
____AM is more succeptible to noise than FM.
____The formal name of the Ethernet twisted pair is 10Base-T
____ Entries in a routing table are ordered from the most
general first to the most specific.
____ WEP stands for Wired Equivalent Policy
____ CSU/DSU stands for Central Service Unit/Data Service Unit
Part II. Answer the following questions:
1. (3 pts) Define a) Bandwidth, b) Throughput, and c) Delay
2. (3 pts) Write down Shanon's theorem and describe each of its
parameters.
3. (3 pts) Explain how "Packet Switching" ensures fairness.
4. (3 pts) Explain how using "Checksum" for error detection
could have some undetected errors.
5. (3 pts) Explain how network applications that do not follow the
locality principle can be modified to follow the locality principle.
6. (3 pts) Explain how the Ethernet Exponential Back Off mechanism
works.
8. (3 pts) Explain why wireless networks use Collision Avoidance
instead of Collision Detection like the Ethernet do.
10. (3 pts) Enumerate the layers of the ISO-7 Layer Reference
Model
11. (3 pts) Explain the differences between a switch and a hub.
12. (3 pts) Explain why routers and hosts should know the subnet mask
of the networks they are connected to.
13. (3 pts) Explain the Layering Principle
15. (3pts) Explain how is the TTL field updated in an IP packet.
18. (6 pts) Draw a diagram of an IP packet showing all the fields
and the
length in bits of each field.
| 20. (10 pts) From lab3 write the procedure void dumpURL(const char *
url ) that will print in stdout the requested URL. void dumpURL(const char * url ) {
|
21. (10 pts.) From lab4, assuming you have a
procedure void dispatchHTTP( int slaveSocket) that processes
the request and closes slaveSocket, write the loop server code
for a) iterative server, b) concurrent server using fork, c) concurrent
server creating a thread
after each request, and d) pool of threads, in the
procedures indicated. Each procedure receives as argument the master
socket already initialized and ready tobe used inside accept. void iterativeServer( int masterSocket) {
void forkServer( int masterSocket) { } void poolOfThreads( int masterSocket) { } void createThreadForEachRequest( int masterSocket ) { } // Other procedures |
| 22. (10 pts) From lab4 write the function that
implements
cgi-bin that executes programs stored in the directory cgi-bin/. The
"document" variable contains the name of the program or script as well
as the variables in the form "prog?a=b&c=d..." // Global variables void dispatchCGIProgram( int slaveSocket, char * document ) } |