From owner-freebsd-arch@FreeBSD.ORG Wed Mar 26 02:45:21 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 33C1F37B404 for ; Wed, 26 Mar 2003 02:45:21 -0800 (PST) Received: from park.rambler.ru (park.rambler.ru [81.19.64.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 704EA43F75 for ; Wed, 26 Mar 2003 02:45:19 -0800 (PST) (envelope-from is@rambler-co.ru) Received: from is.park.rambler.ru (is.park.rambler.ru [81.19.64.102]) by park.rambler.ru (8.12.6/8.12.6) with ESMTP id h2QAj2mF058555; Wed, 26 Mar 2003 13:45:02 +0300 (MSK) Date: Wed, 26 Mar 2003 13:45:02 +0300 (MSK) From: Igor Sysoev X-Sender: is@is To: Jeff Roberson In-Reply-To: <20030326031245.O64602-100000@mail.chesapeake.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-25.8 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, QUOTE_TWICE_1,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: kse@elischer.org cc: Julian Elischer Subject: Re: 1:1 Threading implementation. 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: Wed, 26 Mar 2003 10:45:22 -0000 On Wed, 26 Mar 2003, Jeff Roberson wrote: > > > What this means is that for every pthread in an application there is one > > > KSE and thread. There is also only one ksegroup per proc in this model. > > > Since the kernel knows about all threads it handles all scheduling > > > decisions and all signal delivery. I have followed the POSIX spec while > > > implementing the signal code. I would really appreciate review from > > > anyone who is intimately familiar with signals and threads. Included in > > > this is an implementation of sigwait(), sigtimedwait(), and sigwaitinfo(). > > > > Wouldn't it have been easier to have one KSEGRP+KSE+thread per user > > thread? Having one ksegrp and many KSEs requires changing the kernel > > code where doing it the other way you could do it without making any > > changes. > > I don't understand? There are relatively minor changes to the kernel to > support this. Since nice is a property of the process, it makes sense > that there is only one ksegrp per process. I'm starting to think that the > ksegrp was overkill in general. As I understand all KSEs in one KSEGRP have the same priority. If you need several thread priority inside a process you need several KSEGRPs so Julian's suggestion is better. As far as I know KSEGRP has two orthogonal features: 1) it limits number of KSEs to number of CPU; 2) and it set KSE priority. Igor Sysoev http://sysoev.ru/en/