Hi Everyone,

  I am seeing strange behavior in the way threads are switched in java
1.1.7v3.  This is on a RedHat Linux 6.0 system (kernel 2.2.5-22, with
glibc 2.1).  I have the jdk and native-threads packages for glibc on X86
from blackdown.org.

Problem 1: If I start 3 threads at the same priority and none yields or
blocks on i/o, only the first one to be started gets time.  On a Solaris
machine the three threads share time roughly equally.  Is this known
behavior?  Is there a way to choose a different model?  I should say
that this is using green threads.

Problem 2: I tried doing the same thing using native threads, in the
hope of getting a better time-sharing model.  When compiled and run with
native threads, the behavior is strange enough that I think there must
be a library mis-match.  The main routine usually doesn't sleep for 10
seconds when it is sent a sleep(10000l) (it sleeps for more like 100ms,
but very occasionally it will sleep for 10 seconds).  Can I re-build the
native threads part from sources?  Or is there a known library problem
with glibc2.1?

thanks in advance,
Rich
[EMAIL PROTECTED]


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

Reply via email to