From owner-freebsd-current Wed Apr 16 13:51:15 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id NAA02947 for current-outgoing; Wed, 16 Apr 1997 13:51:15 -0700 (PDT) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id NAA02893 for ; Wed, 16 Apr 1997 13:51:09 -0700 (PDT) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id WAA07853; Wed, 16 Apr 1997 22:51:07 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.8.5/8.8.5) id WAA04208; Wed, 16 Apr 1997 22:38:05 +0200 (MET DST) Message-ID: <19970416223804.WH61024@uriah.heep.sax.de> Date: Wed, 16 Apr 1997 22:38:04 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: current@FreeBSD.org Cc: chuckr@mat.net (Chuck Robey) Subject: Re: scheduler References: X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: ; from Chuck Robey on Apr 16, 1997 12:08:36 -0400 Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk As Chuck Robey wrote: > For an OS class I'm in now (for which I'm writing as OS, actually) I need > to get a look at the FreeBSD scheduler code .... does anyone know where > that is? At different locations. :) The machine-dependant part is under /sys/i386/i386, mainly in swtch.s. You'll for example find the idle loop there, and see how the rtprio/ normal/idleprio queues are handled. You'll also learn from there why FreeBSD is ``cooler'' than messy DOS (yielding for example twice the battery operating time on our Toshiba notebook compared to Win95) -- it simply issues a `hlt' instruction to the CPU if nothing else is to be done. The machine-independant part is in /sys/kern/kern_synch.c. I have no idea about Peter D.'s recent Posix.4 enhancements, but they might probably make an interesting reading in this context as well. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)