From owner-freebsd-current@FreeBSD.ORG Sat Oct 28 16:13:25 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4BB8716A40F; Sat, 28 Oct 2006 16:13:25 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (gerbercreations.com [71.39.140.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2D7343D49; Sat, 28 Oct 2006 16:13:24 +0000 (GMT) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.13.1/8.13.3) with ESMTP id k9SGCdB3044218; Sat, 28 Oct 2006 09:12:39 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.13.1/8.13.3/Submit) id k9SGCcOW044217; Sat, 28 Oct 2006 09:12:38 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Sat, 28 Oct 2006 09:12:37 -0700 From: Greg Lewis To: Daniel Eischen Message-ID: <20061028161237.GA44174@misty.eyesbeyond.com> References: <917908193.20061027102647@serebryakov.spb.ru> <20061027103924.F79313@fledge.watson.org> <45426071.7020403@elischer.org> <602423478.20061028001449@serebryakov.spb.ru> <4542896D.1050001@elischer.org> <20061027231642.GJ30707@riyal.ugcs.caltech.edu> <45429703.8070305@elischer.org> <20061028104741.Q69980@fledge.watson.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Cc: Lev Serebryakov , Paul Allen , Robert Watson , Julian Elischer , current@freebsd.org Subject: Re: KSE, libpthread & libthr: almost newbie question X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Oct 2006 16:13:25 -0000 On Sat, Oct 28, 2006 at 10:27:03AM -0400, Daniel Eischen wrote: > On Sat, 28 Oct 2006, Robert Watson wrote: > >On Fri, 27 Oct 2006, Julian Elischer wrote: > > > >>there is class of problems (e.g. some java programs) that have THOUSANDS > >>of threads, each representing an active aspect of some object. How do you > >>put an rlimit on that without either 1/ stopping the program from working > >>or 2/ allowing thousands of threads to exist but not screwing other users. > > > >Does the JVM actually expose thousands of threads to the OS, or does it > >actually do its own M:N threading internally based on its execution model? > >My impression is the latter, exposing threads to the OS only when it needs > >them to consume kernel or CPU resources. > > I think it exposes all threads to the OS. I think "green threads" > was its own threading. You should ask -java, though. I believe you are correct. Since 1.4 (or 1.3 if you used "native" threads with it, which we didn't by default) its been 1:1. Green threads was a userland threading implementation entirely in the JVM, much like libc_r. It wasn't M:N but rather M:1 (since there were no system threads, just the JVMs own internal threads). -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org