From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 9 00:33:22 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from localhost.my.domain (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 74B4416A412; Sat, 9 Sep 2006 00:33:22 +0000 (UTC) (envelope-from davidxu@freebsd.org) From: David Xu To: freebsd-hackers@freebsd.org Date: Sat, 9 Sep 2006 08:33:14 +0800 User-Agent: KMail/1.8.2 References: <57213DB3-3D5A-4B11-AB29-5696DC4B3AC2@colorado.edu> In-Reply-To: <57213DB3-3D5A-4B11-AB29-5696DC4B3AC2@colorado.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200609090833.14856.davidxu@freebsd.org> Cc: John Giacomoni Subject: Re: pin/bind a pthread to a processor? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Sep 2006 00:33:22 -0000 On Saturday 09 September 2006 04:18, John Giacomoni wrote: > Is it possible to bind a pthread to a processor in 5.5 or 6.1? > > I currently have a code base that uses libpthread with multiple > threads, mutexes and condition variables. > The problem I'm having is that I seem to be suffering wall-clock > timing aberrations that I believe are introduced by the scheduler. > > Thanks, > > John G > > -- > > John.Giacomoni@colorado.edu > University of Colorado at Boulder > Department of Computer Science > Engineering Center, ECCR 1B50 > 430 UCB > Boulder, CO 80303-0430 > USA I don't think we have such API allowing you to bind a thread to a specific CPU, I had implemented such an API for DragonFlyBSD, but its 1:1 threading is not mature yet. David Xu