From owner-freebsd-threads@FreeBSD.ORG Tue Jul 4 13:20:13 2006 Return-Path: X-Original-To: threads@freebsd.org Delivered-To: freebsd-threads@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC4C216A4E0; Tue, 4 Jul 2006 13:20:12 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D50943D53; Tue, 4 Jul 2006 13:20:12 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.6/8.13.6/NETPLEX) with ESMTP id k64DKAoZ024102; Tue, 4 Jul 2006 09:20:11 -0400 (EDT) Date: Tue, 4 Jul 2006 09:20:10 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Peter Wemm In-Reply-To: <200607032253.35982.peter@wemm.org> Message-ID: References: <200607032253.35982.peter@wemm.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: threads@freebsd.org, Robert Watson , davidxu@freebsd.org Subject: Re: Strawman proposal: making libthr default thread implementation? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2006 13:20:13 -0000 On Mon, 3 Jul 2006, Peter Wemm wrote: > On Mon, 3 Jul 2006, Daniel Eischen wrote: >> On Mon, 3 Jul 2006, David Xu wrote: >> >>> On Monday 03 July 2006 19:48, Daniel Eischen wrote: >>> >>>> Yes, you have to support PTHREAD_PRIO_PROTECT, PTHREAD_PRIO_INHERIT >>>> mutexes, and SCHED_RR, SCHED_FIFO, and SCHED_SPORADIC scheduling >>>> (hopefully not under the restriction that you are a privileged >>>> user). >>>> >>> >>> I would tell you don't implement system scope thread in libpthread, >>> because system scope thread does not work in the way you said here, >>> it seems you are telling user that the libpthread is fully working in >>> the way, but the reality is not, without a correct kernel support, >>> I don't think you should introduce system scope thread into >>> libpthread, please remove this feautre if you think libpthread should >>> work in the way. >> >> I don't believe that system scope threads have to abide >> by SCHED_RR, SCHED_FIFO, and SCHED_SPORADIC scheduling >> since their contention scope is different. > > It sounds like (by your definition) that switching to a libthr that only > has system scope threads means we don't have to implement those modes, > right? Actually, I confused contention scope with allocation domain. Threads with scope system contention scope have to compete with all other system scope threads regardless of the process' priority. On a single CPU system (allocation domain = 1), system scope threads with SCHED_RR, SCHED_FIFO, and (if supported) SCHED_SPORADIC scheduling attributes need to be scheduled accordingly. -- DE