[243] in java-interest

home help back first fref pref prev next nref lref last post

Re: Threads vs New White Paper

daemon@ATHENA.MIT.EDU (Arthur van Hoff)
Thu Jun 8 16:46:42 1995

Date: Thu, 8 Jun 1995 13:38:08 -0700
From: Arthur.Vanhoff@Eng.Sun.COM (Arthur van Hoff)
To: java-interest@java.Eng.Sun.COM


Hi Patrick,

> >The underlying implementation is guaranteed to be preemtive. On platforms
> >that do not support thread preemtion (like the Mac), we'll make sure that
> >the thread is rescheduled on the next opportunity. In our Mac port we
> >check for this on every branch and method call. This "poor-mans" preemtion
> >provides you with similar semantics as true preemption.
> 
>   I'm interested as to why the "poor-mans" approach was taken here to
> provide the pre-emptive model. Why not write a custom thread manager for
> the Macintosh Java implementation. I'm fairly sure that the OS support that
> exists is just using the Time Manager or some variant thereof. It seems to
> me that placing a yield() into every branch or method call would could
> cause the program to slow down considerably.

The real reason is that the MacOS really isn't preemtable. We
considered writing our own thread manager for a while but you can't do
anything useful in interrupt level threads so we abandoned the idea.
The poor-mans approach works fine for now. Maybe with the Copeland or
Gershwin OS we can fix this.

Have fun,

	Arthur van Hoff (avh@eng.sun.com)
	http://java.sun.com/people/avh/
	Sun Microsystems Inc, M/S UPAL02-301,
	100 Hamilton Avenue, Palo Alto CA 94301, USA
	Tel: +1 415 473 7242, Fax: +1 415 473 7104
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post