Computer Science 481/681 Quiz B Name _______________________ 1. For each of the following system calls used in a client / server application answer S, C, or B based upon whether the call would normally be used by the Server, the Client or Both ____ a. socket() ____ b. bind() ____ c. connect() ____ d. listen() ____ e. accept() 2. Which of the following best describes the connection model used in the multi-threaded (multi-process) server we described in class. a. Each server process was b. Each server process used the connected through a unique same port and socket. port. c. Each server process used the d. Each server process was connected same port but used a unique through a unique port but they socket. all used the same socket. Suppose a 3 way handshake is being used to establish a connection. Let SYN1 represent a packet that carries SYN and no ack. Let SYN2 represent a packet that carries both SYN and ACK that is sent in response to a SYN1 3. A delayed duplicate SYN2 received the SYN sent state is detected because: a. The SEQ number is wrong. b. The ACK number is wrong. c. Both SEQ and ACK are d. SYN2 is an unexpected packet known to be wrong. in the SYN sent state. 4. A delayed duplicate SYN1 received in the CLOSED / LISTEN state is a. detected because of wrong b. Detected because of wrong ACK SEQ number. number. c. Undetected and responded d. Responded to with a SYN 1. to with a SYN2. 5. A delayed duplicate SYN1 received in the ESTABLISHED state is: a. Responded to with RESET. b. Responded to with a data packet specifying current ACK and SEQ. c. Responded to with SYN2 d. Always causes TCP to crash. 6. The sequence of states through which a CLIENT typically passes in a TCP session termination is: a. Close-wait, last-ack, b. Fin-Wait-1, Closing, Time-Wait Closed Closed c. Fin-Wait-1, Fin-wait-2 d. Fin-Wait-1, Last-Ack, Closed Time-wait, Closed 7. The sequence of states through which a SERVER typically passes in a TCP session termination is: a. Close-wait, last-ack, b. Fin-Wait-1, Closing, Time-Wait Closed Closed c. Fin-Wait-1, Fin-wait-2 d. Fin-Wait-1, Last-Ack, Closed Time-wait, Closed 8. The objective of the use of the Nagle algorithm is to: a. Improve the responsiveness of b. Reduce the rate at which interactive sessions such as applications could inject X applications. small segments into the network. c. Reduce the rate at which d. Reduce the total amount of segments of ANY size could DATA bytes transferred by be injected into the network. interactive applications. 9. Suppose that a segment is received by a TCP. An ACK will be generated a. As soon as there is traffic b. As soon as the 200 ms timer to send in the other direction. expires. c. As soon as either (a.) or (b.) d. As soon as both (a.) and (b.) occurs occur 10. Ack timing is done in TCP by a. Starting a new 200 ms timer each b. Using a single global timer time a segment is received. that ticks every 200 ms. c. Using a time stamp carried in each arriving segment. 11. The "Bulk Dataflow" chapter identifies yet another condition that may result in a TCP kicking out an ACK. What is it? 12. For the following examples, answer (Yes) or (No) depending upone whether it represents the reprehensible practice of "shrinking the window" ___ (1) <--- ack=4096,wnd=2048 seq=4096,size=1024 --> <--- ack=5120,wnd=2048 ___ (2) <--- ack=4096,wnd=2048 seq=4096,size=1024 --> <--- ack=5120,wnd=1024