From owner-freebsd-arch Sun Nov 28 16:22:19 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id 4A92114DD0 for ; Sun, 28 Nov 1999 16:22:14 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id BAA29863 for ; Mon, 29 Nov 1999 01:22:05 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id BAA60452 for freebsd-arch@freebsd.org; Mon, 29 Nov 1999 01:22:05 +0100 (MET) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 32A9714DD0 for ; Sun, 28 Nov 1999 16:21:57 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id QAA47007; Sun, 28 Nov 1999 16:21:52 -0800 (PST) (envelope-from dillon) Date: Sun, 28 Nov 1999 16:21:52 -0800 (PST) From: Matthew Dillon Message-Id: <199911290021.QAA47007@apollo.backplane.com> To: Peter Jeremy Cc: freebsd-arch@freebsd.org Subject: Re: Threads stuff References: <3840B1EC.4614AAF0@vigrid.com> <199911281721.JAA45015@apollo.backplane.com> <38417A7F.B23C701D@vigrid.com> <99Nov29.111117est.40352@border.alcanet.com.au> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :On 1999-Nov-29 05:54:55 +1100, Daniel M. Eischen wrote: :>Do we really want to be able to bind a _thread_ to a CPU? : :Yes. : :> Wouldn't it be sufficient to be able to bind a process to a CPU? : :Not really. If a process has multiple threads, it makes sense to be :able to specify CPU affinity for each thread, since each thread can :be scheduled independently. : :If you've got a multi-threaded process, I'm not sure why you'd want to :bind it as a whole to a single CPU. This implies that only one thread :can ever execute at once - which removes one major use for threads. : :Peter And unless the cpu is reserved, the best that you can do in a general purpose system (or in a system running several multi-threaded applications) is to bind a thread to a 'virtual' cpu. For most purposes, you simply want to supply a hint to the kernel rather then actually try to enforce a hard requirement. A UTS can supply the hint, but cannot actually do the physical assignment without a ridiculous amount of complexity. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message