From owner-freebsd-java Tue Dec 11 22:15: 1 2001 Delivered-To: freebsd-java@freebsd.org Received: from mgr1.xmission.com (mgr1.xmission.com [198.60.22.201]) by hub.freebsd.org (Postfix) with ESMTP id 1ADEC37B405 for ; Tue, 11 Dec 2001 22:14:56 -0800 (PST) Received: from [207.135.128.145] (helo=misty.eyesbeyond.com) by mgr1.xmission.com with esmtp (Exim 3.22 #1) id 16E2fN-0007sU-00; Tue, 11 Dec 2001 23:14:54 -0700 Received: (from glewis@localhost) by misty.eyesbeyond.com (8.11.6/8.11.6) id fBC6EmS87534; Wed, 12 Dec 2001 16:44:48 +1030 (CST) (envelope-from glewis) Date: Wed, 12 Dec 2001 16:44:47 +1030 From: Greg Lewis To: shudo@computer.org Cc: freebsd-java@FreeBSD.ORG Subject: Re: Native, kernel and user-space threads Message-ID: <20011212164447.A87498@misty.eyesbeyond.com> References: <20011212095914G.shudoh@aist.go.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011212095914G.shudoh@aist.go.jp>; from shudo@computer.org on Wed, Dec 12, 2001 at 09:59:14AM +0900 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 Wed, Dec 12, 2001 at 09:59:14AM +0900, shudo@computer.org wrote: > I wanna be convinced of the meaning of `native' threads. > > Currently, FreeBSD (release and stable) does not have a > threading mechanism implemented in kernel space. I > suppose native threads you refer is a threads library > which have POSIX threads API and implemented in user > space. Is this true? This is exactly the case. There is a userland threads library which implements the POSIX threads API (libc_r). > If so, the present difference between native threads and > green threads seems to be their own APIs. Both of them > are user-space threading libraries. Migration to the > POSIX interface is worth much to support forthcoming > Java 2 SDK 1.4. But, what are real present merits of > native threads without kernel threading for JDK users? There has already been a small flamefest on that topic today and I'm not about to join in :). However, as you mention, JDK 1.4 will no longer support green threads. We believe at this time, without having seen the 1.4 code, that a native threads implementation for JDK 1.3 will be useful both in getting a JDK 1.4 port going and in getting HotSpot and the Java Plugin to work in JDK 1.3. > I have been satisfied by green threads implementations > on Linux and FreeBSD while developing a JIT compiler for > them over three years. It performs faster than Linux > (kernel) threads with many applications because it is > implemented in user space. I do not have SMP machines :) I think many people have used green threads without any major problems both for their own use and in production systems. I know I have. Personally I would have preferred Sun kept green threads around, if only because it meant the underlying threading system behaved similarly across all platforms. But thats just my opinion :). -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Phone : (801) 796 6999 Information Technology Web : http://www.eyesbeyond.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message