> 1) On page 2 you state that "For NRU, start the clock pointing to page
> frame 0 with all use bits off."  Yet NRU is not one of the replacement
> algorithms assigned on page 1.

Oops.  I originally had 6 algorithms (another bug is that I didn't
change all the 900s to 750s)  I will announce in class.  Thanks for
the report and sorry for the bug.
Yet another comment on lab 1, 11 oct 1999

More notes on lab1, 4 Oct 1999

  1. I was asked what form the input will be in. That is must you parse all sorts of inputs.

    Not all sorts
    1 (0 1 5 0)
    1 (0 1 5 1)
    2 (0 1 5 0) (0 1 5 0)
    3 (0 1 5 1) (0 1 5 1) (3 1 5 1)
    5 (0 3 200 3) (0 9 500 3) (0 20 500 3) (100 1 100 0) (100 100 500 3)
    
    You must accept a positive integer n followed by n quadruples. You may assume that there is exactly one space after n and between the numbers in the quadruples and no space after ``('' and before ``)''

  2. You may assume context switching takes zero time

  3. I fell into a minor notational trap. I/O times are in the interval (0,IO] (i.e. 0 < t < IO). Well if IO is zero we get the interval (0,0] which is empty! What I wanted was that if IO=0 all I/O times are to be zero. So I added a parenthetical remark making this explicit

    ``Similarly, we assume the I/O times are UDRIs in the interval (0,IO]. (There is one exception, if IO is zero, then all I/O times are zero even though the interval (0,0] is empty.)''

    The text and postscript versions of lab1 on the web has had this parenthetical remark added. The version handed out in class does not have it.
  4. For SJF you should not assume ``run to completion'', i.e. you should swithc on I/O bursts. Also for PSJF

Notes from the grader, 4 Oct 1999

Notes on lab1 27 sep 1999

  1. If several processes are waiting on I/O, you may assume noninterference. For example, assume that on cycle 100 process A flips a coin and decides its wait is 6 units and next cycle (101) process B flips a coin and decides its wait is 3 units. You do NOT have to alter process A. That is, Process A will become ready after cycle 106 (100+6) so enters the ready list cycle 107 and process B becomes ready after cycle 104 (101+3) and enters ready list cycle 105.

  2. For processor sharing (PS), which is part of the extra credit:
    PS (processor sharing). Every cycle you see how many jobs are in the ready Q. Say there are 7. Then during this cycle (an exception will be described below) each process gets 1/7 of a cycle.
    EXCEPTION: Assume there are exactly 2 jobs in RQ, one needs 1/3 cycle and one needs 1/2 cycle. The process needing only 1/3 gets only 1/3, i.e. it is finished after 2/3 cycle. So the other process gets 1/3 cycle during the first 2/3 cycle and then starts to get all the cpu. Hence it finishes after 2/3 + 1/6 = 5/6 cycle. The last 1/6 cycle is not used by any process.