From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 26 00:18:26 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 330C737B404 for ; Wed, 26 Mar 2003 00:18:26 -0800 (PST) Received: from energyhq.homeip.net (213-97-200-73.uc.nombres.ttd.es [213.97.200.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92C0B43FBD for ; Wed, 26 Mar 2003 00:18:24 -0800 (PST) (envelope-from flynn@energyhq.homeip.net) Received: from christine.energyhq.tk (christine.energyhq.tk [192.168.100.1]) by energyhq.homeip.net (Postfix) with SMTP id 68515AF584; Wed, 26 Mar 2003 09:18:23 +0100 (CET) Date: Wed, 26 Mar 2003 09:18:45 +0100 From: Miguel Mendez To: alex@dynaweb.ru Message-Id: <20030326091845.36425fad.flynn@energyhq.homeip.net> In-Reply-To: <3E815D53.6010404@dynaweb.ru> References: <3E815D53.6010404@dynaweb.ru> X-Mailer: Sylpheed version 0.8.11claws (GTK+ 1.2.10; i386--netbsdelf) X-Face: 1j}k*2E>Y\+C~E|/wehi[:dCM,{N7/uE3o# P,{t7gA/qnovFDDuyQV.1hdT7&#d)q"xY33}{_GS>kk'S{O]nE$A`T|\4&p\&mQyexOLb8}FO Subject: Re: Some specific questions about 5.x X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2003 08:18:27 -0000 X-List-Received-Date: Wed, 26 Mar 2003 08:18:27 -0000 --=.N0y:iHrl5Oj6r3 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 26 Mar 2003 10:57:07 +0300 Alex wrote: Howdy. > 1. Is it true that kernel threads are more "heavy" than userspace > ones (pthread) and hence application with hundreds of threads will > work evidently slower than that using pthreads due to more switching > penalties? AFAIK, not in a hybrid model. Systems that do 1:1 thread mapping (Like Gah! Nu/Linux) will suffer from this kind of situation, also will use more kernel memory. In hybrid implementations based on Scheduler Activations, like FreeBSD's KSE, and NetBSD's SA, there's a balance between the number of kernel virtual processors available and the number of userland threads, it's an N:M model. Nathan Williams' paper on the subject suggests that context switch is not much slower than a pure userland implementation. Also, keep in mind that pure userland has other problems, like when one thread blocks on I/O. In pure userland threading systems this means the whole process is blocked, whereas in KSE and SA only that thread is stopped. > 2. Is it true that even 5.x has no implementation for inter-process > semaphores that are blocking calling thread only not the whole process > as usually in FreeBSD? That I don't know, perhaps the local KSE guru, Julian might have an answer for this. Cheers, -- Miguel Mendez - flynn@energyhq.homeip.net GPG Public Key :: http://energyhq.homeip.net/files/pubkey.txt EnergyHQ :: http://www.energyhq.tk Tired of Spam? -> http://www.trustic.com --=.N0y:iHrl5Oj6r3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (NetBSD) iD8DBQE+gWJpnLctrNyFFPERAjBRAJ9XdUgcfg8DMVqRVKq3cposKYuMqQCgrNhC XfQS2H+jgl9hNTe2vtJp1go= =4k59 -----END PGP SIGNATURE----- --=.N0y:iHrl5Oj6r3--