From owner-freebsd-arch Wed Nov 24 21:27: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 16EF414BEB for ; Wed, 24 Nov 1999 21:27:16 -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 GAA15598 for ; Thu, 25 Nov 1999 06:26:31 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id GAA37862 for freebsd-arch@freebsd.org; Thu, 25 Nov 1999 06:26:30 +0100 (MET) Received: from canonware.com (canonware.com [207.20.242.18]) by hub.freebsd.org (Postfix) with SMTP id 950FB14BEB for ; Wed, 24 Nov 1999 21:26:15 -0800 (PST) (envelope-from jasone@canonware.com) Received: (qmail 17547 invoked by uid 1001); 25 Nov 1999 05:25:21 -0000 Date: Wed, 24 Nov 1999 21:25:21 -0800 From: Jason Evans To: Matthew Dillon Cc: freebsd-arch@freebsd.org Subject: Re: Threads Message-ID: <19991124212521.W301@sturm.canonware.com> References: <199911241905.LAA20045@apollo.backplane.com> <14396.15070.190669.25400@avalon.east> <199911241941.LAA20231@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <199911241941.LAA20231@apollo.backplane.com>; from dillon@apollo.backplane.com on Wed, Nov 24, 1999 at 11:41:41AM -0800 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Nov 24, 1999 at 11:41:41AM -0800, Matthew Dillon wrote: > > :It would be nice to keep an eye out for the future... SMP > :coscheduling of threads. I'd like to see FreeBSD become the OS of the > :fastest computer in the world. Making it easy to coschedule threads > :(or processes for that matter) would go a long way towards displacing > :Linux in this category. > > Coscheduling is a fairly simple mechanism to implement. No real special > cases need to be added to the scheduler itself, you simply ensure that it > is 'most likely' for the threads to be scheduled together by placing them > next to each other in the run queue. > > For example, if you have a single scheduling queue (which I really think > is what we want) and the scheduler on each cpu picks off the next ready > thread from the same queue, and two threads wakeup simultaniously, > you can construct the queueing code such that it is highly likely that > the two threads will each be (nearly) simultaniously assigned a different > cpu and be able to run in parallel. Until reading about DEC's threading efforts (http://www.digital.com/info/DTJF03/DTJF03SC.TXT) a few days ago, I would have agreed with you. However, that paper makes some very valid arguments for needing multiple scheduling queues. The paper is very worthwhile reading. Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message