Subject: Moving scheduler semantics from cpu_switch() to kern_synch.c
To: None <tech-kern@netbsd.org>
From: Daniel Sieger <dsieger@TechFak.Uni-Bielefeld.DE>
List: tech-kern
Date: 09/10/2006 15:05:38
--AqsLC8rIMeq19msA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi all,
based on what gmcgarry did in September 2002 I'm actually trying to
move some of the scheduler semantics from cpu_switch() to
kern_synch.c.

During that time he wrote the functions nextrunqueue() and
chooseproc().

nextrunqueue() selects the next process (at that time there were no
LWPs) from the highest priority runqueue. chooseproc() either calls
nextrunqueue() and returns, or calls cup_idle() if there is no
runnable process.

My problem now is that cpu_idle() is only defined as a prototype but
is never actually defined (irritatingly, it has a man-page). So, what
is the right call to let the cpu idle until there is a LWP on one of
the runqueues?

Do you have any general comments on what I'm trying to do? I think
having this part of the scheduler written in C would be the first step
necessary for any further improvements.

Furthermore, are there any pitfalls I should consider?=20

Kind regards,
Daniel

--=20
Daniel Sieger  =20
Faculty of Technology
Bielefeld University

--AqsLC8rIMeq19msA
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (SunOS)

iD8DBQFFBA2hJUKmeYzbnToRAsMoAJ4v9llX/5einLwmvYs8ArcSwn/0QgCeICg4
XLlgebuzaDk/h01N7OrFizs=
=ql1a
-----END PGP SIGNATURE-----

--AqsLC8rIMeq19msA--