Discussion:
semtest2
(too old to reply)
Eran Kravitz
2005-10-13 02:38:29 UTC
Permalink
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.
Iulian Neamtiu
2005-10-13 18:15:06 UTC
Permalink
Post by Eran Kravitz
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.
That's OK.
Post by Eran Kravitz
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.
Like we said in the grading criteria '...will usually (but not
certainly)...' so you should be in good shape.


Iulian
cs412017
2005-10-13 23:00:07 UTC
Permalink
As far as schedtest goes, as Eran mentioned, even I am not getting MLF
to output 3 earlier on average WHEN the quantum is set to 10...however,
on setting the quantum to be 2, I can see that 3 is consistently being
output earlier.
c***@CSIC.UMD.EDU
2005-10-14 00:12:53 UTC
Permalink
This holds true for higher values of the quantum as well.
(that 3 does not appear before in MLF )

I think it makes sense, as other processes dominate because the
quantum is very high and almost nothing gets shifted to lower
runqueues
cs412017
2005-10-14 13:29:30 UTC
Permalink
I agree with the reasoning. On Sunday, I was getting MLF to output
earlier even with higher quanta...I think the output varies with the
load on the cluster. Since more people are using it right now...could
that be affecting the results?

I'm pretty sure what I've done is correct.

Continue reading on narkive:
Loading...