Assignment #2 Requirements

 

The primary purpose of this document is to specify the format of your source code and documentation, and the format of your program's input and output.  This enforces some measure of uniformity among the appearance and results of your programs in order to facilitate marking.

 

 

Electronic submission procedure

 

 

Printed submission procedure

 


Approximate mark distribution

 

 

Style/clarity/internal documentation

 

 

Requirements specific to Q1

 


-------- START OF FCFS SIMULATION ----------

 

Time      Job #     Action         Service time left

--------  --------- -------------- -----------------

  3.0023          0 arrives                  14.2435

  3.0023          0 gets CPU 1               14.2435

  5.2701          1 arrives                   2.0010

  5.2701          1 gets CPU 2                2.0010

  6.0006          2 arrives                   3.1416

  7.2711          1 finishes                  0.0000

  7.2711          2 gets CPU 2                3.1416

.

.

.

119.2499         14 finishes                  0.0000

127.7730         13 finishes                  0.0000

 

-------- END OF FCFS SIMULATION ----------

 

-------- START OF SRTF SIMULATION ----------

 

Time      Job #     Action         Service time left

--------  --------- -------------- -----------------

.

.

.

 

-------- END OF SRTF SIMULATION ----------

 

-------- START OF RR SIMULATION ----------

 

Time      Job #     Action         Service time left

--------  --------- -------------- -----------------

.

.

.

 

-------- END OF RR SIMULATION ----------

 

-------- START OF HRRN SIMULATION ----------

 

Time      Job #     Action         Service time left

--------  --------- -------------- -----------------

.

.

.

 

-------- END OF HRRN SIMULATION ----------

 

Summary of job waiting time:

 

Algorithm  Mean      Variance  Maximum

---------  --------  --------  --------

FCFS         8.2255    1.4458   13.7123

SRTF         7.8534    1.5835   11.2216

RR           5.2135    3.1124   11.2275

HRRN         3.7530    0.9899    5.8800

 

 

java a2q1 23 32767 1 15

java a2q1 23 32767 2 15

java a2q1 2048 5555 1 14

java a2q1 2048 5555 2 14

 

Name the typescripts test1.txt, test2.txt, test3.txt, and test4.txt.  Include them with both your electronic and paper submission.

 

 

Requirements specific to Q2

java a2q2 a3_data.txt

 

# of page references = 923

======================================================

FIFO

======================================================

Frames                    6         10         16

------------------------------------------------------

Page faults             707        701        201

Faults/frames           117.8333    70.1000    12.5625

 

======================================================

LFU

======================================================

Frames                    6         10         16

------------------------------------------------------

Page faults             514        444        418

Faults/frames            85.6667    44.4000    26.1250

 

======================================================

PFF

======================================================

Threshold                 8         12         16

------------------------------------------------------

Frames (total)         3322       4419       5527

Frames (mean)             3.5991     4.7876     5.9881

Page faults             407        400        126

Faults/frames           113.0838    83.5492    21.0417