Received: from SOUTH-STATION-ANNEX.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA15025; Sun, 17 Mar 96 15:17:17 EST
Received: from liquor.cabi.net by MIT.EDU with SMTP
	id AA27405; Sun, 17 Mar 96 15:16:28 EST
Received: by liquor.cabi.net (8.7.3/8.7.3) id PAA15427; Sun, 17 Mar 1996 15:19:45 -0500
Resent-Date: Sun, 17 Mar 1996 15:19:45 -0500
Date: Sun, 17 Mar 1996 15:13:51 -0500 (EST)
From: Eric John Kuzniar <kuzniar@cs.unca.edu>
To: java-linux@java.blackdown.org
Subject: Re: Thread.yield() doesn't
In-Reply-To: <Pine.SUN.3.91.960316042318.20020C-100000@luniga>
Message-Id: <Pine.ULT.3.91.960317150538.17801D-100000@clyde.cs.unca.edu>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Resent-Message-Id: <"06SyT3.0.Yl3.5E7Jn"@liquor>
Resent-From: java-linux@java.blackdown.org
X-Mailing-List: <java-linux@java.blackdown.org> archive/latest/1418
X-Loop: java-linux@java.blackdown.org
Precedence: list
Resent-Sender: java-linux-request@java.blackdown.org

What I did to help overcome obstacles in thread-slicing not being 
implemented was this. 

Run a thread at max priority, and have it's run method simply sleep for 
some time quantum, (I use 100ms, but your mileage may vary). Have all 
other threads run between the max-1 and min. Then every 100 ms the slicer 
thread will awaken, interrupt the currently running thread, and then 
go to sleep. Since the VM will round robin interrupted threads everything 
works dandy. 

	Eric

