Eran Kravitz
2005-10-13 02:38:29 UTC
For semtest2 - it says that the output should show (on one of the lines)
"Create_Semaphore() returned 0". The way I implemented my semaphore ids
is that it first uses all 20 (or whatever the maximum number is)
semaphores and only then goes back to check if some of them were freed
when create_semaphore is called again. Therefore, if semtest2 is the
first thing to run when bochs starts (or the first program to use
semaphores) - I get that line, but if for example semtest1 runs first
(which uses 4 semaphores, and then frees them), when running semtest2 I
get "Create_Semaphore() returned 4". Just wanted to make sure that
that's still fine.
Also, since we're already talking about testing - it says that for
schedtest the mlf scheduling should have the 3 printed out earlier than
in the rr scheduling. I'm pretty sure I implemented my scheduling
systems correctly (since everything else works fine, and workload has
the expected results) however it doesnt seem to be the case that the 3
is printed earlier in mlf, at least not on average (they're about
equal). Is there something wrong with my code or is the placement of the
3 pretty random?
Thanks.
"Create_Semaphore() returned 0". The way I implemented my semaphore ids
is that it first uses all 20 (or whatever the maximum number is)
semaphores and only then goes back to check if some of them were freed
when create_semaphore is called again. Therefore, if semtest2 is the
first thing to run when bochs starts (or the first program to use
semaphores) - I get that line, but if for example semtest1 runs first
(which uses 4 semaphores, and then frees them), when running semtest2 I
get "Create_Semaphore() returned 4". Just wanted to make sure that
that's still fine.
Also, since we're already talking about testing - it says that for
schedtest the mlf scheduling should have the 3 printed out earlier than
in the rr scheduling. I'm pretty sure I implemented my scheduling
systems correctly (since everything else works fine, and workload has
the expected results) however it doesnt seem to be the case that the 3
is printed earlier in mlf, at least not on average (they're about
equal). Is there something wrong with my code or is the placement of the
3 pretty random?
Thanks.