Re: Is it bad to have lots of sleeping tasks?

From: Hua Zhong (hzhong@cisco.com)
Date: Fri Aug 24 2001 - 15:13:04 EST


> Linus scheduler is pretty dire beyond about 8 runnable threads, but very
> good below that. It also has a refresh loop that is O(n) tasks, which is
> strange, and actually looks easily to eliminate.

So why not do it? Or implement a nicer scheduler? There are many good
ones. There are o(1) schedulers that provide much better proportional
sharing. They scale and also perform well even in "few running processes"
case. They are also not hard to implement (I once implemented such a
scheduler with 100 lines of patch, and that fitted in the existing Linux
runqueue framework). What's the resistence to scheduler changes?

> The critical bit is threads runnable at any given time. When that is low
as
> it is in almost all normal workloads the performance of the scheduler is
> very good indeed.
>
> > 2) If I have 1000 threads, and each calls sleep(), I assume that my
> ...
> > difference in the system's responsiveness?
>
> Read kernel/timer.c.
>
> Alan
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Aug 31 2001 - 21:00:14 EST