rperry - process-run #2 - seed = 1234567

IOs take 5 time units to complete.

Time        PID: 0        PID: 1           CPU           IOs
  1         RUN:io         READY             1          
  2        WAITING        RUN:io             1             1
  3        WAITING       WAITING                           2
  4        WAITING       WAITING                           2
  5        WAITING       WAITING                           2
  6        WAITING       WAITING                           2
  7*   RUN:io_done       WAITING             1             1
  8*       RUN:cpu         READY             1          
  9         RUN:io         READY             1          
 10        WAITING   RUN:io_done             1             1
 11        WAITING       RUN:cpu             1             1
 12        WAITING       RUN:cpu             1             1
 13        WAITING        RUN:io             1             1
 14        WAITING       WAITING                           2
 15*   RUN:io_done       WAITING             1             1
 16        RUN:cpu       WAITING             1             1
 17         RUN:io       WAITING             1             1
 18        WAITING       WAITING                           2
 19*       WAITING   RUN:io_done             1             1
 20        WAITING        RUN:io             1             1
 21        WAITING       WAITING                           2
 22        WAITING       WAITING                           2
 23*   RUN:io_done       WAITING             1             1
 24           DONE       WAITING                           1
 25           DONE       WAITING                           1
 26*          DONE   RUN:io_done             1          
Produce a trace of what would happen when you run these processes:
Process 0
  io
  io_done
  cpu
  io
  io_done
  cpu
  io
  io_done

Process 1
  io
  io_done
  cpu
  cpu
  io
  io_done
  io
  io_done

Important behaviors:
  System will switch when the current process is FINISHED or ISSUES AN IO
  After IOs, the process issuing the IO will run LATER (when it is its turn)

R=READY, C=CPU, I=IO, W=WAITING, D=DONE (CPU = RUN:cpu, IO = RUN:io or RUN:io_done)
Time PID: 0 PID: 1
1 R C I W D R C I W D
2 R C I W D R C I W D
3 R C I W D R C I W D
4 R C I W D R C I W D
5 R C I W D R C I W D
6 R C I W D R C I W D
7 R C I W D R C I W D
8 R C I W D R C I W D
9 R C I W D R C I W D
10 R C I W D R C I W D
11 R C I W D R C I W D
12 R C I W D R C I W D
13 R C I W D R C I W D
14 R C I W D R C I W D
15 R C I W D R C I W D
16 R C I W D R C I W D
17 R C I W D R C I W D
18 R C I W D R C I W D
19 R C I W D R C I W D
20 R C I W D R C I W D
21 R C I W D R C I W D
22 R C I W D R C I W D
23 R C I W D R C I W D
24 R C I W D R C I W D
25 R C I W D R C I W D
26 R C I W D R C I W D
27 R C I W D R C I W D