From owner-freebsd-threads@FreeBSD.ORG Mon Oct 30 18:23:22 2006 Return-Path: X-Original-To: freebsd-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 8FE3F16A569; Mon, 30 Oct 2006 18:23:22 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from mrout1.yahoo.com (mrout1.yahoo.com [216.145.54.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id 132E643DDD; Mon, 30 Oct 2006 18:23:17 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from minion.local.neville-neil.com (proxy7.corp.yahoo.com [216.145.48.98]) by mrout1.yahoo.com (8.13.6/8.13.6/y.out) with ESMTP id k9UIN5Or006637; Mon, 30 Oct 2006 10:23:06 -0800 (PST) Date: Mon, 30 Oct 2006 19:23:02 +0100 Message-ID: From: gnn@freebsd.org To: David Xu In-Reply-To: <200610302150.05499.davidxu@freebsd.org> References: <200610301649.26429.davidxu@freebsd.org> <200610302150.05499.davidxu@freebsd.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.50 (i386-apple-darwin8.7.1) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII 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 18:23:22 -0000 At Mon, 30 Oct 2006 21:50:05 +0800, David Xu wrote: > > [1 ] > On Monday 30 October 2006 18:25, gnn@freebsd.org wrote: > > > > 1.6) setrlimit for number of kenrel threads, it is not done, one-day > > > work. > > > > Cool that it's only a day. Is this something you're hacking on now? > > > > 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. > > > 1.7 CPU binding API, not done in libthr, found in other OSes. libpthread > > > does not support it either. > > > > > > 1.8 C++ object unwinding when pthread_exit is called(), I found it > > > is support by debian Linux and Solaris, I have sample implementation > > > for libthr. > > > > Cool as well, though not as big a deal as setrlimit. > > > > > 1.9) I forgot something. > > > > > > 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