I have 2 python scripts https://gist.github.com/2233477.
rsgen.py
generates "random" inputs for use insimulate.py
simulate.py
does the actual simulation
Thing is, when I start to increase the input size from rsgen.py
with the --numReferences
param, I get different outputs
# ./rsgen.py --numReferences 1000 > rs.txt; cat rs.txt | xargs ./simulate.py
Number of page faults : 59
# ./rsgen.py --numReferences 100000 > rs.txt; cat rs.txt | xargs ./simulate.py
Number of page faults : 873
Number of page faults : 848
Number of page faults : 823
Number of page faults : 103
./rsgen.py --numReferences 1000000 > rs.txt; cat rs.txt | xargs ./simulate.py
Number of page faults : 866
Number of page faults : 869
Number of page faults : 876
Number of page faults : 907
Number of page faults : 910
Number of page faults : 1001
Number of page faults : 845
...
Notice as I increase numReferences, the python script simulate appears to run more times. Why is that? I am expecting just 1 line of "Number of page faults: ..."