From owner-freebsd-arch@FreeBSD.ORG Fri Mar 28 11:28:23 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 400C437B408; Fri, 28 Mar 2003 11:28:23 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 731C243F85; Fri, 28 Mar 2003 11:28:22 -0800 (PST) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h2SJSIBg006924; Fri, 28 Mar 2003 14:28:18 -0500 (EST) Received: from localhost (eischen@localhost)h2SJSHk2006921; Fri, 28 Mar 2003 14:28:17 -0500 (EST) Date: Fri, 28 Mar 2003 14:28:17 -0500 (EST) From: Daniel Eischen To: "Daniel C. Sobral" In-Reply-To: <3E843009.2060104@tcoip.com.br> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-25.4 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REPLY_WITH_QUOTES,USER_AGENT_PINE autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) cc: arch@freebsd.org cc: Scott Long Subject: Re: 1:1 threading. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2003 19:28:26 -0000 On Fri, 28 Mar 2003, Daniel C. Sobral wrote: > David Xu wrote: > > > > do you think that a multithreaded process should use more CPU time then > > a single thread process, so threaded process should have higher priority > > and block other single thread processes out? AFAIK, threading is not > > designed for this, you may misunderstand what threading is designed for. > > Threading might not have been originally designed for this, but a lot of > people use it this way, a lot of people *want* it this way, and POSIX > specifically mandates that this way be available. It is available through pthread_attr_setscope(). There's some confusion over this and the way libthr is implemented. KSE's within the same KSE Group were not designed to give more CPU time than a normal unthreaded/single KSE'd process. Unless this has been changed in the kernel somehow, the use of multiple KSEs by libthr or libkse (in a single KSEG) will not get any more CPU time than a non-threaded program. There was some debate over this, but multiple KSEs within a KSEG were _not_ suppose to allow this. You are suppose to create a new KSEG in order to get this behavior. -- Dan Eischen