From owner-freebsd-java Thu Aug 8 12: 7:20 2002 Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 045C037B400 for ; Thu, 8 Aug 2002 12:07:19 -0700 (PDT) Received: from gnuppy.monkey.org (wsip68-15-8-100.sd.sd.cox.net [68.15.8.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id B823043E6E for ; Thu, 8 Aug 2002 12:07:18 -0700 (PDT) (envelope-from billh@gnuppy.monkey.org) Received: from billh by gnuppy.monkey.org with local (Exim 3.35 #1 (Debian)) id 17cscu-0000im-00; Thu, 08 Aug 2002 12:07:16 -0700 Date: Thu, 8 Aug 2002 12:07:16 -0700 To: Nick Johnson Cc: freebsd-java@freebsd.org Subject: Re: Thread.sleep implementation Message-ID: <20020808190716.GA2757@gnuppy.monkey.org> References: <20020808074233.T13773-100000@turing.morons.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020808074233.T13773-100000@turing.morons.org> User-Agent: Mutt/1.4i From: Bill Huey (Hui) Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu, Aug 08, 2002 at 07:48:01AM -0700, Nick Johnson wrote: > I've noticed that in threads which are trying to make locks or wait to > retry on some failure condition, the JVM tends to suddenly begin using > tons of CPU, despite the presense of a Thread.sleep() call inside the > loop. > > What seems to also happen is starvation of the other threads, almost as > though Thread.sleep were implemented as a busy loop (?). I'll try to come > up with a test case for this. I bring it up here in case someone closer > to the JVM's internals might know what I'm talking about... Under what threading model ? bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message