CS 3733 Operating Systems, Fall 2007 Recitation Review
Here is a review of the first 5 recitations.
- Recitation 6: Ring Simulator Introduction
In this recitation you started using the simulator.
- Recitation 7: Ring Simulator
In this recitation you continued using the simulator.
You should have found the following:
- For the original ring, the order of the output is not predictable.
- The order may change depending on how the processes are scheduled.
- If each parent waits for its child before printing, the
statements come out in reverse order of process creation.
- If printing is not atomic, messages get jumbled up.
- Recitation 8: POSIX Thread Synchronization
- In Part 7, you should use something like: countertest 10 10000000
with about 10,000,000 iterations.
- In Part 8, when you removed the synchronization, to should have
run faster and probably still gave the correct answers.
- In Part 9, when you replaced count++ with three lines, it still
ran fase, but gave the wrong answers.
- In Part 10, when you put the synchronization back, it ran
slower again but gave the correct answers.
- In Part 13, when I timed the running with synchronization, I got
The function_to_time took 8294753 microseconds
This is about 8 seconds.
- In Part 14, when I timed the running without synchronization, I got
The function_to_time took 637663 microseconds
This is about .6 seconds. Of course the count was incorrect also.
- So, 10,000,000 calls to the lock-unlock pair took about 7.6 seconds
or .76 microseconds per lock-unlock pair.
- Recitation 9: Network Communication
In this recitation you learned how to compile network programs under
Linux. You experimented with multiple connections to the server and
found that with multiple clients connecting to the same server,
you cannot predict which client gets the messages typed at the server.