Discussion:
Entropy in test results
(too old to reply)
Tom Brubaker
2005-03-06 19:34:49 UTC
Permalink
I've noticed that I don't always get the same results from the same inputs
when testing project 3. Times vary slightly. I realize that this is the
expected behavior for multiprogramming in the real world, but having read
the code for geekos and since we're using _simulated_ hardware, I expected
to find total determinism. Anyone have thoughts on where the entropy comes
from?

-Tom-
Timothy Finley
2005-03-07 03:41:43 UTC
Permalink
Post by Tom Brubaker
I've noticed that I don't always get the same results from the same inputs
when testing project 3. Times vary slightly. I realize that this is the
expected behavior for multiprogramming in the real world, but having read
the code for geekos and since we're using _simulated_ hardware, I expected
to find total determinism. Anyone have thoughts on where the entropy comes
from?
-Tom-
Well, the system you are running has other processes and other
applications going on which are vying for the cpu as well. This is
especially true is you are running on the linux lab since there are many
other users to the machine than yourself.

Tim
Tom Brubaker
2005-03-07 03:51:25 UTC
Permalink
Post by Timothy Finley
Well, the system you are running has other processes and other
applications going on which are vying for the cpu as well. This is
especially true is you are running on the linux lab since there are many
other users to the machine than yourself.
But isn't everything contained within my instance of bochs? The point is
then that there's no variability in the hardware because it's not real, it's
simulated. Since I have the code, I can see for my own eyes that the geekos
scheduling is totally deterministic. There's nothing going on in one run
that isn't going on in another run because it's all in my control. So where
does the variability come from? It's not important, I guess, but I find it
interesting...
Timothy Finley
2005-03-07 20:25:00 UTC
Permalink
Post by Tom Brubaker
But isn't everything contained within my instance of bochs? The point is
then that there's no variability in the hardware because it's not real, it's
simulated. Since I have the code, I can see for my own eyes that the geekos
scheduling is totally deterministic. There's nothing going on in one run
that isn't going on in another run because it's all in my control. So where
does the variability come from? It's not important, I guess, but I find it
interesting...
True, but the bochs "hardware" is actually software. Its possible that
bochs itself is implemented using multithreading and if that is the case
then the variability of scheduling in the host OS could cause variability
in for bochs's emulated hardware (what if you had separate threads for
the separate hardward entities, etc). I'm not sure if this is the actual
answer, but its at least an explanation that makes some sense to me.

Tim

Loading...