CS 3733 Operating Systems, Spring 2000 Assignment 5 Comments


This assignment was graded on a basis of 20 points.

  1. For Part 1, either the child or the parent can get the CPU first after the fork. Because of this you cannot predict the order of the output. In fact, the output could be interleaved, though this will rarely occur.
  2. When the original process exits, the shell will display the prompt, even if there are children still running and producing output.
  3. If the parent of a process exits before the child, the child is inherited by the init process (PID 1) and so will display 1 for the PID of its parent.
  4. The output for Part 2 should be similar to the output from Part 1.
  5. For Part 3 if the delay is large enough, each process will say the first word and then each process will say the second word, etc. This is because all of the other process will have a chance to get the CPU when one process sleeps. It may even exhibit this behavior for small delays, or a given process may be able to output a few words in a row.
  6. For Part 4 each process waits for its child to exit before starting its output. The display and the audio will be in complete sentences in reverse order of PID.