From owner-freebsd-arch Wed Jul 17 0:54:16 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58E9F37B400 for ; Wed, 17 Jul 2002 00:54:14 -0700 (PDT) Received: from iguana.icir.org (iguana.icir.org [192.150.187.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1599343E3B for ; Wed, 17 Jul 2002 00:54:14 -0700 (PDT) (envelope-from rizzo@iguana.icir.org) Received: (from rizzo@localhost) by iguana.icir.org (8.11.6/8.11.3) id g6H7gik07335; Wed, 17 Jul 2002 00:42:44 -0700 (PDT) (envelope-from rizzo) Date: Wed, 17 Jul 2002 00:42:44 -0700 From: Luigi Rizzo To: Terry Lambert Cc: arch@FreeBSD.ORG Subject: Re: proposed changes to kern_switch.c and kern_synch.c Message-ID: <20020717004244.B7218@iguana.icir.org> References: <20020716235216.B6785@iguana.icir.org> <3D351B99.311431F@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3D351B99.311431F@mindspring.com>; from tlambert2@mindspring.com on Wed, Jul 17, 2002 at 12:24:09AM -0700 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Jul 17, 2002 at 12:24:09AM -0700, Terry Lambert wrote: > Luigi Rizzo wrote: > > Hi, > > we have implemented a weight-based process scheduler > > for FreeBSD-stable, and are trying to port it to -current (in the > > description below replace "process" with "thread/kse" as appropriate > > for the -current case). > > Are you going to make this new scheduler generally available? yes of course! At least the version for -stable is basically working, for -current i still have to understand the relation between KSEG's and threads etc. > What is the weighting? it is basically the WF2Q+ algorithm used in dummynet (i am the king of recycling :). The OS community calls this "Proportional Share" or something like that. Same as for dummynet queues, active processes get each a share of the CPU which is proportional to their weight. The absolute share of course depends on the number of active processes and the total sum of weights. The complexity of the algorithm is O(log N) where N is the number of active processes. The code has been developed by a PhD student of mine, Paolo Valente, who is also the guy behind the WF2Q+ implementation in dummynet. cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message