CS 3733 Operating Systems, Fall 1999 Assignment 3 Comments
Warning: This is not for the current semester.
- The only lint warning that can be ignored refers to not using return
values of certain functions like printf. Do not ignore warnings about
inconsistent usage. Usually this is caused by not including the
appropriate include files in your source. For example, using wait
requires sys/wait.h.
- Don't give lint options which will cause it to not print out the
messages.
- If you call a function with the wrong number of parameters,
e.g wait with no parameters, it can cause a core dump.
- If a process shows its parent ID to be 1, it means that the
its parent has exited and the child has been inherited by
the init process which has PID 1.
- When the original process terminates, the prompt appears.
This is because the shell is waiting for the original process.
The shell does not care about the children.
- If a wait is put before the fprintf, the processes print out
in reverse order. All processes should print before their parents
exit.
- If the wait is put after the fprintf, it does not affect the order
of printing but the processes terminate in reverse order.
- The prtastr function is an important part of this assignment.
If you did not implement it correctly, much of the assignment is
meaningless. prtastr must delay after each character is output.
- You should choose a value for the delay parameter that causes a
delay between character output what you can see. Typically a large
value of the parameter will be necessary of between 10,000 and 1,000,000
depending on the speed of the machine.
- In the last part where the synchronization is done by sending a token
around the ring rather than with wait, the processes print in ascending
order rather than descending order.