From owner-freebsd-arch Fri Dec 10 17:24:55 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 96B1E14EA7 for ; Fri, 10 Dec 1999 17:24:50 -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 CAA01352 for ; Sat, 11 Dec 1999 02:24:47 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id CAA39728 for freebsd-arch@freebsd.org; Sat, 11 Dec 1999 02:24:46 +0100 (MET) Received: from picnic.mat.net (picnic.mat.net [206.246.122.133]) by hub.freebsd.org (Postfix) with ESMTP id B474A14DBD for ; Fri, 10 Dec 1999 17:24:22 -0800 (PST) (envelope-from chuckr@picnic.mat.net) Received: from localhost (chuckr@localhost [127.0.0.1]) by picnic.mat.net (8.9.3/8.9.3) with ESMTP id UAA36336; Fri, 10 Dec 1999 20:23:17 -0500 (EST) (envelope-from chuckr@picnic.mat.net) Date: Fri, 10 Dec 1999 20:23:17 -0500 (EST) From: Chuck Robey To: Arun Sharma Cc: freebsd-arch@freebsd.org Subject: Re: Thread scheduling In-Reply-To: <19991210114304.A3372@sharmas.dhs.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 10 Dec 1999, Arun Sharma wrote: > On Thu, Dec 09, 1999 at 11:40:40PM -0500, Chuck Robey wrote: > > In scheduling multiple threads on a FreeBSD SMP system, is it just > > important that if a thread asks for multiple processors, then it can > > contend for multiple processors, or is it in any way important that these > > multiple instances of execution from the same memory space actually occur > > at the same point in time. > > A thread can't be scheduled on more than one processor simultaneously. > Multiple threads in the same process can be. Assuming that this is > what you meant... > > Is it desirable ? Yes. Can it be guaranteed ? Not easily. If you have a > SMP machine dedicated to a particular task like web serving, the > optimal use of the system would be to run multiple threads in the same > address space on multiple processors. I note that Nate disagreed with you ... dropping the subject of if it can be done as premature, your blank statement of "Yes" isn't enough; can you offer some reason why it's desireable? If the task is reasonably active, it'll stay in memory, so extra time won't be spent swapping. I think that all caching is done per processor, not per memory space, and (if I'm right on that) then there wouldn't be a caching reason, right? Why is it desireable? > > -Arun > > ---------------------------------------------------------------------------- Chuck Robey | Interests include C programming, Electronics, 213 Lakeside Dr. Apt. T-1 | communications, and signal processing. Greenbelt, MD 20770 | I run picnic.mat.net: FreeBSD-current(i386) and (301) 220-2114 | jaunt.mat.net : FreeBSD-current(Alpha) ---------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message