CS 3733 Operating Systems, Spring 2004 Recitation Review
- Week of January 19: Using the system
In this recitation you learned how to compile programs on the
Linux system and you write the get_filesize function.
- Week of January 26: The Process Scheduling Simulator
In this recitation you started using the simulator and got ready for
Assignment 2.
- Week of February 2: The Process Scheduling Simulator continued
In this recitation you modified the simulator input to do
5 experiments.
There were 10 processes with short CPU bursts and 10 with longer ones.
The algorithms used were FCFS, SJF, RR 1, RR 5 and RR 10.
You should have found that in this case SJF had the best average
waiting time and FCFS was next. Increasing the quantum for the RR
produced better average waiting times and if it were allowed to
increase above the largest CPU burst it would be identical to FCFS.
- Week of February 9: Testing valid_program_line
In this recitation you tested your valid_program_line function.
- Week of February 16: Threads
In this recitation you learned how to compile and run threads under
Linux and Solaris.
Some of the things you should have experienced:
- Here you had a parent and child each calculating a
value and adding it to a sum. Since each had its own
sum variable, the value did not represent the sum
of the values calculated. The program is
here.
- Having the parent wait for the child to finish would
not help here.
- When the same is done with two threads, the threads
share the same sum variable so the sum represents the
sum of the two values. The original process joins the
thread before doing its calculation so there is no
interference. The program is
here.
- If the thread is not joined, what happens depends on
how the original process and the thread are scheduled.
You probably found that under Linux the program usually
gave the correct answer.
- Under Linux, if the reference to -lpthread was removed,
the program would not compile.
- When run under Solaris with the join commented out you
probably found that most of the time the original
process printed its results and exited before the
thread had a chance to execute.
- When run under Solaris, the original program ran as
expected.
- When you try to compile under Solaris without the
-lpthread, the compile is successful but the program
fails on the pthread_create.
- Week of February 23: Ring Simulator Introduction
In this recitation you started using the simulator.
- Week of March 8: 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.
- Week of March 22: Bounded Buffer Simulator
In this recitation you should have found that an internal inconsistency
may occur long before its effect (the external inconsistency) is seen.
- Week of March 29: 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.
- Week of April 5: Disk Head Simulator
In this recitation you started using the simulator.
- Week of April 12: Disk Head Simulator - bad blocks
In this recitation you used the simulator to experiment with the effect
of bad blocks on disk head scheduling. You should have found that
there is a big change in the behavior when the error rate reaches
a certain point.
- Week of April 19: Makeup
This week is for making up missed recitations.