Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site hplabs.UUCP Path: utzoo!linus!security!genrad!decvax!harpo!seismo!hao!hplabs!luigi From: luigi@hplabs.UUCP (Luigi Semenzato) Newsgroups: net.unix-wizards Subject: can "wantin" ever be non-zero? (source licensee's only) Message-ID: <1643@hplabs.UUCP> Date: Thu, 28-Jul-83 13:40:08 EDT Article-I.D.: hplabs.1643 Posted: Thu Jul 28 13:40:08 1983 Date-Received: Fri, 29-Jul-83 02:49:14 EDT Organization: Hewlett Packard Labs, Palo Alto CA Lines: 19 I was looking at the 4.1BSD "scheduler" (sched(), in vmsched.c), and I found out that it spends most of the time sleeping on either of two events: "lbolt" or "runout", depending whether "wantin" is set or not. The only place in which wantin is set is in setrun() (or the equivalent part of wakeup()): if the process to be run is not in memory, wantin is set. Also, if the scheduler was sleeping on runout ("nothing to do, wake me up when you need me") setrun() performs a wakeup() on runout. It seems like the other sleep in sched() is of the type "I know there is a process that wants to be brought in, but it doesn't have enought priority right now, so I'll sleep for a while and try again". Well, the problem is: every time sched() goes to sleep, when it wakes up the first thing it does is clearing wantin. Why does it do that? Does it EVER go to sleep on lbolt? If yes, how? I am confused. -- Luigi Semenzato HP Labs Palo Alto, CA 94304