CIS-3152 Homework #3 (Concurrent TCP Servers)

Due: Monday, February 5, 2018

Continue reviewing Chapter 5 in the text on concurrent TCP servers and Chapter 4 in the text on the sockets API.

  1. The "Quote of the Day" protocol allows a client to receive some human readible text that represents a quote of interest. It can be used, for example, when a user logs into a system to present the user with some thought provoking quote as an amusement. The protocol is described by RFC-865. Review that RFC. Should this service be implemented using an iterative or concurrent server? Explain.

  2. This question is based on the old Concurrent TCP Servers lab.

    Using the echo client/server provided in class. Make the modifications described in the lab under Section 2 ("The Server"), parts 1, 2, and 3. The purpose of these modifications is to illustrate that the server is using distinct, concurrent processes.

  3. Continuing the previous question, modify the server program again so that it uses sigaction to prevent zombies by specifying the appropriate value for sa_flags (see the manual page for sigaction). This simplifies the program because the SIGCHLD signal handler does not need to collect the exit status of the terminated children. Is the signal handler needed at all? Explain. Verify that the server still works in that no zombies are created.

Submit your modified server program. Include, perhaps in the comments of your program, an answer to the first question. Note that you can only submit a single file to Moodle. Create a zip archive if you want to submit multiple files.

Last Revised: 2018-01-29
© Copyright 2018 by Peter C. Chapin <>