From owner-freebsd-threads@FreeBSD.ORG Mon Oct 30 23:18:23 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from localhost.my.domain (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 36D6316A412; Mon, 30 Oct 2006 23:18:23 +0000 (UTC) (envelope-from davidxu@freebsd.org) From: David Xu To: gnn@freebsd.org Date: Tue, 31 Oct 2006 07:18:15 +0800 User-Agent: KMail/1.8.2 References: <200610301649.26429.davidxu@freebsd.org> <200610302150.05499.davidxu@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610310718.15763.davidxu@freebsd.org> Cc: freebsd-threads@freebsd.org Subject: Re: libthr status X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Oct 2006 23:18:23 -0000 On Tuesday 31 October 2006 02:23, gnn@freebsd.org wrote: > > I will hack at kernel side, but who will hack userland utilities ? > > e.g the /usr/bin/limits program. > > How hard is that to do? If it's "easy" then I can sign up to do that. > I think it is not hard, but I think one at least has to hack /usr/bin/limits, sh and csh which are in our base system. > > > > 2) Things can only be used by root: > > > > > > > > 2.1) the real-time scheduling options can only be used by root, e.g, > > > > if you call pthread_attr_setschedpolicy() with parameter SCHED_FIFO > > > > or SCHED_RR, the thread can only be created by root, normal user > > > > will get EPERM errno. you can use it in libpthread, but it is not > > > > real-time, it is a static priority scheduling in userland scheduler, > > > > if you want to preemptable other threads or processes in the system > > > > when playing real-time multimedia or military program, no way! > > > > > > > > 2.2) the real-time scheduling is not safe, it can deadlock itself and > > > > the whole system if program behavors incorrectly, it should only be > > > > used by trusted programs. > > > > > > Are these (can these be) documented in the man pages? > > > > No, they are not documented. > > If these limitations will be there for a while can you update the man > page? If you like I can review that change for correctness. > > Best, > George I will update them and make them reviewed. Thanks, David Xu