Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Aug 2002 07:34:51 -0700
From:      David Schultz <dschultz@uclink.Berkeley.EDU>
To:        Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.ORG>
Cc:        FreeBSD-hackers@FreeBSD.ORG
Subject:   Re: Creating a sysctl? (mission impossible)
Message-ID:  <20020822143451.GA322@HAL9000.homeunix.com>
In-Reply-To: <20020822125455.376.qmail@exxodus.fedaykin.here>
References:  <20020820180222.927.qmail@exxodus.fedaykin.here> <20020822030842.GA22058@HAL9000.homeunix.com> <20020822125455.376.qmail@exxodus.fedaykin.here>

next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.ORG>:
> 	Well, the high overhead has usually been due to the design
> implementation. It is usually due to the data structure used for
> holding the processes in the scheduler. Aside from that, the only
> really expensive call is random(). I am trying to use least expensive
> design in this code but I am aware of this possible caveat.

Waldspurger presents one possible PRNG for this purpose in his
paper.  Nevertheless, I think much of the overhead is inherent in
precise lottery scheduling, since you have to consider all runnable
processes in the odds at each context switch.  Stride scheduling
is much nicer in this regard, in addition to offering dependable
response times.

Berkeley's undergrad OS course actually has students implement a
simplification of lottery scheduling as a component of the class
project.  It's an off-the-wall idea because they don't teach
anything about PS schedulers in general, nor do they properly
cover the relative merits of lottery scheduling.  Fortunately, the
task is trivial because the implementation is for a toy OS and
efficiency is a non-issue.

Best of luck on your project.  I'm interested in seeing how your
scheduler works out in a real operating system.  (I was actually
surprised to learn that someone had ported David Petrou's lottery
scheduler from FreeBSD 2.2.)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020822143451.GA322>