remzi-arpacidusseau / ostep-homework

2.11k stars 1k forks source link

fix: cpu result #15

Open Zaynex opened 4 years ago

Zaynex commented 4 years ago

Hi, thanks for your teaching materials. I ran the program, and the result here:

➜  cpu-intro git:(master) ✗ ./process-run.py -l 3:0 -L 5 -c -p
Time    PID: 0       CPU       IOs
  1     RUN:io         1
  2    WAITING                   1
  3    WAITING                   1
  4    WAITING                   1
  5    WAITING                   1
  6*    RUN:io         1
  7    WAITING                   1
  8    WAITING                   1
  9    WAITING                   1
 10    WAITING                   1
 11*    RUN:io         1
 12    WAITING                   1
 13    WAITING                   1
 14    WAITING                   1
 15    WAITING                   1
 16*      DONE         1

Stats: Total Time 16
Stats: CPU Busy 4 (25.00%)
Stats: IO Busy  12 (75.00%)
Inuyasha-Monster commented 4 years ago

The same with me ...

[root@node2 cpu-intro]# ./process-run.py -l 3:0 -L 5 -c -p
Time    PID: 0       CPU       IOs
  1     RUN:io         1
  2    WAITING                   1
  3    WAITING                   1
  4    WAITING                   1
  5    WAITING                   1
  6*    RUN:io         1
  7    WAITING                   1
  8    WAITING                   1
  9    WAITING                   1
 10    WAITING                   1
 11*    RUN:io         1
 12    WAITING                   1
 13    WAITING                   1
 14    WAITING                   1
 15    WAITING                   1
 16*      DONE         1

Stats: Total Time 16
Stats: CPU Busy 4 (25.00%)
Stats: IO Busy  12 (75.00%)