bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nice again


From: Roland McGrath
Subject: Re: nice again
Date: Tue, 20 Aug 2002 20:54:44 -0400 (EDT)

I don't think anyone wants to mess with the Mach scheduler or to worry too
much about making its wrongness appear close enough to right.

The simplest solution to the immediate issue of simple users of
getpriority/setpriority being confused is to just have them be proc RPCs
where we can diddle proc to do whatever is vaguely close to right in
actuality and appears close enough to what programs expect to stop the
complaints.  Things like maintaining an unrounded value to shadow task's
rounded one would be easy in proc.

Because of the privilege issue, either proc needs to be involved anyway or
it gets pretty hairy in the libc implementation to figure out when it needs
privileged ports and do all the magic itself.  

Implementing any of the hairy schemes you mention would either need to
happen in proc or be hopelessly hairy and probably impossible to make
robust in libc.  If you have to stop all other threads, you have to do
proc_dostop anyway, but you wouldn't want to stop the signal thread so we'd
need something different or else to have a silly dance with the signal
thread doing all the work.  OTOH, implementing that in proc is simple
enough because you can just task_suspend, diddle all you need to, and
task_resume.

In an ideal world (or maybe even L4 ;->), all such nonsense would be
handled by a new coherent RPC interface to a scheduling policy server that
shouldn't necessarily be proc.  Such an interface would probably take the
POSIX-world configuration values directly and translate them into whatever
its other internal models of parameterization are.  So that would look
substantially like having new proc RPCs for it.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]