[call for comments] l2sched

Maxim A. Zhuravlev thIOretic at yandex.ru
Thu Nov 2 16:36:06 UTC 2006

What is l2sched?
l2sched is a mechanism that allows multiple third-party thread schedulers
collaborate. These schedulers are to be implemented as loadable kernel
modules aka KLD (kernel loadable driver).
l2sched is being designed to to make it possible to provide a complicated
software system with a scheduler meeting the system's requirements. l2sched
is going to increase the portability of a software, dependant on an
OS-specific scheduler's behavior (e.g.. the software, requiring the POSIX
real-time schedulers). Currently the POSIX real-time schedulers are
implemented as a part of the system schedulers. l2sched should let to
implement them independently.
l2schd should provide an scheduling policy-independent interface for the
thread/process-scheduler interaction. The interface is be based on
/usr/src/sys/sys/sched.h. The policy-specific calls like
void sched_prio(struct thread , u_char);
are to be replaced by
void sched_set_param(void*, void*).
l2sched is to give scheduler access to the cpu on a priority-based,
proportional basis (here we come - level 2 scheduling -l2sched). As the
l2sched is being designed for a general-purpose OS FreeBSD, it should
provide an adequate experience. So idle process' schedulers should act only
if no time-sharing threads' schedulers have runnable threads. The latest
should act only when no real-time schedulers are active. A scheduler can
schedule any subset of process types. With two given schedulers, the one
that hosts more threads should be provided with a bigger portion of
processor's time.
The author believes that the performance overhead can be minimized provided
a well-designed internal calls interface.

Any descussion/comments are wellcome.
mailto:maxim.zhuravlev at gmail.com
maxim (dot) zhuravlev (at) gmail (dot) com

WBR Maxim A. Zhuravlev

More information about the freebsd-hackers mailing list