Arjan van de Ven wrote:
On Sun, Sep 18, 2005 at 02:54:20AM +0200, Bernardo Innocenti wrote:
>Altough I generally dislike threaded programs and expecially
>those who spin on locks instead of designing a proper arbitration
>scheme for shared resources, I consider the new kernel behavior
>unfair and bogus.
is it? "sched_yield" means "give up the cpu to lower priority
processes",
because, frankly, if there were higher priority ones.. they'd already be
running. So what else does it mean?
It's more meaningful to interpret sched_yield() as "give up the processor,
as if the scheduler quantum had expired".
The scheduler wouldn't normally allow a lower priority process to
preempt a high-priority ready process for 30+ ms. Unless I'm
mistaken about Linux's scheduling policy...
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/
http://www.develer.com/