DragonFly users List (threaded) for 2008-08
Re: cpu scheduler
:to: dragonfly users, developers and experts
:I'm a novice user to dragonfly and I'm currently studying an operating
:system subject. Can someone explain the cpu scheduler that dragonfly
:implement? What algorithm is used in the implementation? If I'm
:running a single-processor, how does it work? If I'm running a
:multi-processor, how does it work? How does it differs from solaris,
:freebsd and linux cpu schedulers?
:I may sound stupid to my questions, so please understand.
I can give you a basic outline but for the most part you have to
mess around to understand the scheduling completely.
The kernel has a thread scheduler, called LWKT. This is a fixed priority
non-preemptive scheduler... very simple in design. Each cpu has a LWKT
The user process scheduler takes all the user processes and schedules
one on each cpu via LWKT at a time. The user process scheduler is
responsible for preempting the user process and switching to another
user process. There is always at most one user process scheduled to
the LWKT scheduler on each cpu.
We currently have two schedulers in the tree,
/usr/src/sys/kern/usched_bsd4.c and /usr/src/sys/kern/usched_dummy.c.
The usched_dummy.c file is very well documented and describes the
API between the user process scheduler and the LWKT scheduler.
- cpu scheduler
- From: "Siquijor Philips" <firstname.lastname@example.org>