Date: Sun, 11 Jul 1999 18:24:22 -0700 From: Arun Sharma <adsharma@home.com> To: freebsd-smp@freebsd.org Subject: sleep channel and schedcpu Message-ID: <199907120124.SAA26755@c62443-a.frmt1.sfba.home.com>
next in thread | raw e-mail | index | archive | help
Some thougths on what to do once the basic SMP primitives are in, and reasonable locking granularity is achieved in FreeBSD. (a) Sleep channels need to be done away with and replaced by condition variables. The reasoning: (1) More than one thread may be blocked on the same resource, but on a different condition of the same resource. Condition variables should solve the problem. (2) Multiple resource may map to the same hash queue, resulting in wakeup() having to search the hash queues. (3) In a SMP environment, access to the sleep queue will have to be serialized. So people working on sync primitives, make sure that your primitives contain their own queues and do not use sleep channels. (b) schedcpu() gets called once every second. This may be bad for servers with a large number of processes. A better solution would be SysV like scheduling classes, which are event driven and which update the priority of a process every 4 tick or whatever and during sleep and wakeup. Both of these points are from the Unix internals book by Uresh Vahalia. -Arun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907120124.SAA26755>