On Sun, 11 Feb 2001, Dimitris Vyzovitis wrote:

<stuff-skipped/>

> > I'm not sure what you want to show with test_fairness.  You have three
> > threads which all count up to the same number.  Then finally you print
> > out the three counters which always will be the same.  There's nothing
> > in this code testing fairness of scheduling.
> 
> Two things: first that all threads run equally often (this is the 
> farinees test, succeeds). Second, to illustrate that the behavior of the 
> vm changes substantially from the behavior observed in test_yield, in a 
> manner that appears to be inconsistent.
> 
> > 
> >     Dimitris> If you run test_yield with a longer sleep period, you'll
> >     Dimitris> notice that there is a dominant thread which gets approx
> >     Dimitris> as many runs as the other two. Although this does not
> >     Dimitris> violate the fairness conditions imposed by the jls, it
> >     Dimitris> is not quite what I expect given the perfectly fair
> >     Dimitris> behavior when no i/o is performed.
> > 
> > Ah, fix test_fairness and you'll see that it isn't IO related.
> > 
> >     Dimitris> Once again, this is not a bug in the blackdown vm since
> >     Dimitris> it still satisfy the jls, but the behavior of ibm's vm
> >     Dimitris> is more *consistent*.
> > 
> > [Actually, I would consider such a significant difference a bug.]
> > 
> > As said in my previous posting: The difference you see is is not
> > caused by scheduling and/or a specific Thread.yield() implementation.
> > You just see a comparison of _interpreted_ vs _compiled_ code.
> 
> Intersting of you to say. So, does the presence of the jitter modify vm 
> behavior so drastically? Isn't the bahavior of the vm without jit 
> inconsistent? I think that this deserves some more attention.

doh!
Revoke that - mea culpa.
I was under the mistaken impression that two threads were running slowly, 
which seemed weird.
Since only the fist one runs slowly, the discrepancy is obviously the 
matter of the jitter intervening in the second invokation of 
test_yield.run() and compiling for the last two threads (as you say above). 
Behavior is absolutely consistent, sorry for prolonging the discussion.

-- dimitris
   mailto:[EMAIL PROTECTED]


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to