Date: Thu, 3 Oct 1996 13:55:15 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: dg@Root.COM Cc: dfr@render.com, peter@spinner.dialix.com, ccsanady@friley216.res.iastate.edu, freebsd-smp@freebsd.org Subject: Re: Scheduling and idle loops.. (Was Re: cvs commit: sys/kern . . ) Message-ID: <199610032055.NAA06712@phaeton.artisoft.com> In-Reply-To: <199610031424.HAA12159@root.com> from "David Greenman" at Oct 3, 96 07:24:07 am
next in thread | previous in thread | raw e-mail | index | archive | help
> >Why not use a byte in struct proc for the cpuid of the processor which > >most recently ran the process. If there is a choice of highest-priority > >processes, each cpu could choose a process which it has run before, > >otherwise just pick the highest priority process as normal. > > Right, if the CPU that it ran on last isn't available, but another one is, > you don't want to *not* run it just because of the processor affinity. You need three queues (for 2 CPU's). A process that's preempted should be scheduled to run again on the same processor's queue. At the same time, the ready-to-run ordering needs to be global. The trade of moving a process of of one CPU's queue to run it on another CPU, thereby losing the locality which causes the CPU affinity to be real, is a scheduling policy decision. Policy and implementation should remain seperate, as much as is possible, IMO. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610032055.NAA06712>