DragonFly users List (threaded) for 2008-08
DragonFly BSD
DragonFly users List (threaded) for 2008-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cpu scheduler


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 26 Aug 2008 13:09:31 -0700 (PDT)

: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.
:
:regards,
:siquijor philips

    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
    scheduler.

    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.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



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