CS360 Final Exam. Grading for Question 4
December 13, 1997
18 points
Part one was 15 points, broken down into the following:
1 point: sock = server_socket("games.cs.utk.edu")
1 point: Initialize a data structure to keep track of the high scores
1 point: Initialize a mutex
2 points: Have a thread that calls accept_connection and then forks
off a thread to service the connection
2 points: Read 34 bytes from the socket
2 points: Insert the high score into the data structure
2 points: Print the data structure to the socket
2 points: Hold the mutex while inserting the high score and printing
the data structure
2 points: You got varying number of these for getting details correct
Here are some of the things that pretty much everyone did wrong. I didn't
take off for it:
- not closing the fd
- not freeing strings when they get kicked out of the rb-tree
- not mallocing the thread_t
- not mallocing fdp -- if you just pass &fd, then you're going to
have some real problems.
- not allowing for read/write returning less items than you asked for.
For part 2 you got 2 points for saying what the problem was, and one point
for specifying a good solution.
Histogram of scores