CS 3733 Operating Systems, Fall 2010 Assignment 6 Comments
This assignment was graded out of 30 points.
Part 1 was 15 points, part 2 was 10 points and part 3 was 5 points.
- A number of students did not send and receive data in network byte order.
If you see a comment on your paper that says NBO then I found that you
did not use network byte order.
- The Intel machines are little endian, but network byte order is big endian.
- If your server did not receive the range in NBO, it would still produce values,
but not from the range that was requested.
- If you communicated with another user who also got the byte order wrong,
you could get correct answers, even though the program was not correct.
- The server should modify testRange so that it outputs to the remote host.
Do this by passing an additional parameter, not by using a global variable.
If you do use a global variable, at least make it static.
- For the client, the threaded solution is the simplest, since critical section
protection with mutex locks is simple with threads.
If you used child processes you needed some way to protect the critical sections
and to accumulate the total count of bad values.
From what we know from this course, using a pipe would be the easiest.
An alternative would be to use select.
- For the last time this semester (except possibly on the final):
There is a difference between a program that gives the right answers most (99.999%)
of the time and one that is correct.
If you want to read a 32-bit integer over the network and do a single read of 4
bytes and check for an error, this will work most of the time.
But it is not correct!
The read may return 1, 2, or 3 bytes and you need to read again.
In the case of 4 bytes, the simplest solution is to read one byte 4 times.
You do not have this problem on write if you use r_write.
- I decided not to do any additional testing. Of the people who requested
to have their server tested, most of the them did not use network byte
order, so the server would not be able to receive the correct range.
- You can find the list of grades I have recorded for you on the second side of the
cover sheet.
Listed are the 7 assignment grades follwed by two exam grades.
The maximum scores on the assignments are: 20, 30, 30, 30, 40, 30 and 30.
I do not have the recitation grades yet.
If a grade is missing or incorrect, please see me ASAP.