CS 3733 Operating Systems, Fall 2008 Assignment 1 Comments

  1. A single staple in the upper left corner will do.
    The main lab has a variety of staplers that you can use.
    Please do not use any other type of binding.
  2. After each call to malloc you should check for errors.
  3. Watch out for integer division when calculating averages.
  4. When returning from main (or calling exit) the return value should not be negative.
  5. Your tests should include at least one test in which SJF and PSJF differ.
  6. Programs (and output) should not be printed with a proportional font.
  7. Use the correct headings in the main program. The output should be labeled FCFS, SJF, etc., not Part 1, Part 2, ... .
  8. If implemented efficiently, the code is not too long.
    PSJF and SJF are almost identical.
    FCFS is a special case of RR.
  9. Note that for PSJF in Test 2, there is no preemption since P1 has only 1 unit left on its CPU burst and P2 has a CPU burst of 2.
  10. A function has a memory leak if it allocates temporary space but does not free it. Memory leaks in operating systems can cause applications to run very slowly.
  11. What is wrong with the following solution to Part 0:
        void part0(char *s1, char *s2, int x1, int y1, int z1,
                            int x2, int y2, int z2) {
           s1 = "RRwwwwwRRRRRRRRR";
           s2 = "rrRRRRwwwwwwwwrrRRRRRRR";
        }
    
  12. What is wrong with the following:
          rrrrrrRRRRRRRRwwwwwwwRRR
          RRRRRRwwwRR
    
  13. What is wrong with the following:
          rrrrrrRRRrrRrrRRRRwwwwwwwRRR
          RRRRRRwwwRR
    
  14. Answers for the tests are available below:
    Test 1
    Test 2
    Test 3
  15. A prototype solution can be found here.