Programming Assignments for CS 404

The programs that you turn in will be graded according to the criteria given in the first of the following two links. The second link gives detailed instructions on exactly how you are to turn in your finished assignments.

Program grading criteria
Turning in your assignments

Below are your programming assignments. The due date for each one is contained in the assignment description.

Assignment 6.
Do Homework Problem 13.28, page 899, from the book CS-APP. You do not need to do the part about dynamically changing the size of the thread pool. Just choose a fixed size for the number of worker threads.

This is due Thursday, November 9.

Assignment 5.
Do Homework Problems 13.25, 13.26, and 13.27, pages 898-899, from the book CS-APP. Do this assignment by starting with your version of tiny.c from Assignment 3. Do each problem in a separate version of tiny.c Turn in a single directory with your three versions of tiny, a single makefile that builds all three versions, and all of the other files from the original tiny distribution. Use some kind of comment to mark the lines of tiny.c that you need to change in order to solve each problem.

This is due Tuesday, October 24.

Assignment 4.
Do Homework Problems 13.14 and 13.15, page 896, from the book CS-APP. The echo server program select.c in Figure 13.6 has a serious bug in it. Try to find it. Also, notice that even after you "fix" select.c (so that the client cannot block the server), the console user can still block the server. Can you fix this?

This is due Tuesday, October 10.

Assignment 3.
Do Homework Problems 12.8, 12.10, 12.11, 12.12, and 12.13, page 843, from the book CS-APP.

Do these assignments in your copy of tiny.c from Assignment 2. Use some kind of comment to clearly mark the lines of tiny.c that you needed to change in order to solve these problems. When you comment a line, denote which problem the line helps solve.

When you do problem 12.11 and you add the HEAD method, make sure that the HEAD method works with the dynamic response headers created by the CGI process. Similarly, when you do problem 12.12 and you add the POST method, make sure that your solution to problem 12.6 (from Assignment 2) works with the dynamic response headers generated by the CGI process (the same goes for the headers from a CGI processes created by a GET method). When you do problem 12.10, have your web page also test the POST method with the adder.c CGI program.

This is due Thursday, September 28.

Assignment 2.
Do Homework Problem 12.6, page 842, from the CS-APP book but modify the problem slightly. Have the tiny web server echo both the request lines and headers and the response lines and headers to its console window. (This will make tiny emulate the Live HTTP Headers tool in the Firefox browser.) Wrap your code that implements this problem in conditional compilation directives so that this code can be turned on or off at compile time.

Also do Homework Problem 12.7, page 843, but extend tiny so that it can serve both mpg files and png files. Be sure to find appropriate data files to test your modified tiny with.

Do both of these assignments in a single copy of tiny.c. Use some kind of comment to clearly mark the lines of tiny.c that you needed to change in order to solve these two problems.

This is due Tuesday, September 19.

Assignment 1.
The details of this assignment are in this page. This assignment is due on Thursday, September 7.


Return to the CS 404 home page.


compliments and criticisms