This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: user-space threads


Hi,

On Thu, 2002-10-24 at 00:35, Tom Tromey wrote:
> >>>>> "Adam" == Adam Megacz <adam@megacz.com> writes:
> 
> Adam> Is it possible to implement gcj's threading entirely in userspace,
> Adam> using nonblocking I/O and alarm()?
> 
> Yes.
> 
> We've done about 50% of this before, in the distant past (1997 or 98).
> This was the old qthreads code; there might even be a relic or two of
> it still in the tree.
> 
> We had cooperative user-level threads.  We didn't try to solve the
> nonblocking I/O problem, but only because the customer didn't need
> that.

Although probably not that useful in practice it would be nice to have
fully cooperative threads (so only switch on wait(), yield(), sleep(),
join(), etc) for debugging purposes. That way you could easily spot
possible deadlocks/starvation issues.

I believe the java thread model does not guarantee any scheduling system
at all. Not even that threads that block on I/O make other threads run.

Cheers,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]