From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 26 01:35:18 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 6176D37B405 for ; Wed, 26 Mar 2003 01:35:18 -0800 (PST) Received: from smtp.netli.com (ip2-pal-focal.netli.com [66.243.52.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2AC543FAF for ; Wed, 26 Mar 2003 01:35:17 -0800 (PST) (envelope-from vlm@netli.com) Received: (qmail 17826 invoked by uid 84); 26 Mar 2003 09:35:17 -0000 Received: from vlm@netli.com by l3-1 with qmail-scanner-0.96 (uvscan: v4.1.40/v4121. . Clean. Processed in 0.127617 secs); 26 Mar 2003 09:35:17 -0000 Received: from unknown (HELO netli.com) (172.17.1.38) by mx01-pal-lan.netli.lan with SMTP; 26 Mar 2003 09:35:17 -0000 Message-ID: <3E817469.4030403@netli.com> Date: Wed, 26 Mar 2003 01:35:37 -0800 From: Lev Walkin Organization: Netli, Inc. User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2.1) Gecko/20030125 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: Miguel Mendez References: <3E815D53.6010404@dynaweb.ru> <20030326091845.36425fad.flynn@energyhq.homeip.net> In-Reply-To: <20030326091845.36425fad.flynn@energyhq.homeip.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-31.9 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_MOZILLA_UA autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) cc: FreeBSD hackers list 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 09:35:21 -0000 Miguel Mendez wrote: > 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. What about Solaris' migration towards 1:1 model from the N:M one they had supported for years already? Who are insane, Solaris folks (moving towards Linux) or Free/NetBSD ones (migrating to the old Solaris' behavior)? -- Lev Walkin vlm@netli.com