CS 3733 Operating Systems, Fall 2003 Recitation Session 6
Week of October 6.
In this session you will continue using the process ring simulator that
you used in Recitation Session 5.
If you do not finish this recitation this week, you can complete it next week.
There will not be an additional recitation assignment during the week of
October 13.
- Log on to your account in the Linux Lab.
- Create a rec06 directory somewhere under your cs3733
directory.
- Copy all of the files from your rec05 directory into the
rec06 directory.
- Remove all of the .gif files from the rec06 directory.
- Start the process ring simulator and open a log file.
Try to do all of the remaining steps with one run of the simulator.
If you can't do them all in one session, click
here for instructions.
- You can display the output generated by the simulated program by
clicking on the Display Info button and then Display Output.
For each configuration indicated, run the program 3 times times.
Push the Reset button between runs. After logging the
output, push the clr button on the output window before starting
the next set of runs.
Try each of the following and record the output generated by the
simulated program.
After each of these, change back to the standard configuration:
After fork: parent
Choose Process: FCFS
Scheduling: no preempt
Print Atomic
- The standard configuration.
- Change After fork from parent to child.
- Change After fork from parent to either.
- Change After fork from parent to random.
- Change Choose Process from FCFS to Random.
- Change Scheduling from no preempt to round robin with a quantum of 5
and Choose Process from FCFS to Random.
- Repeat the experiment above with a quantum of 2
and see if it behaves differently.
- Change Print Atomic to Print Not Atomic with probability 0.1.
- Insert a wait(NULL) call before the fprintf statement.
- Change Print Atomic to Print Not Atomic with probability 0.1
and insert a wait(NULL) call before the fprintf statement.
- After running all of the experiments, answer the following questions:
- For which of the 10 experiments was the output in the same
order each time it was run?
- For which of the 10 experiments is the order of the output
determined by the ring program, rather than by the way the processes are
scheduled?
- For experiments 1, 8, 9 and 10 explain why you think the output
was in the order that it was.
- Put the answers at the end of your log file.
Use an editor such as vi.
If you are not familiar with producing HTML, you can append the file
rec06template.html to your
logfile.html.
- When you are finished, copy your logfile.html into an appropriate
location so that it can be accessed from your web page. Put a link to it on
your cs3733 course web page.
- Demonstrate to the TA that you have a link to the log file on your
course web page.