> >> Linux is smarter -- it automaticaly gives preference for the last CPU
> >> used, without any special settings.  Sometimes, however, if for some
> >> reason the kernel or other threads need that specific CPU, Linux will
> >> move the process.  You win.
> > Actually, NT does the same thing.
>
> Nope.  You set the affinity to CPU 0, 1, etc.  The process will then
> _only_ run on that specific CPU.

Right.  But if you DON"T specify affinity, it does something very much like
what you described linux as doing.

>
> >>...
> > have you actually tested this?
>
> Start Prime95 at idle priority with CPU affinity set to one of the CPUs.
> Start the "Tast Manager", choose "Performance" and look at the graphs.
> One should be at 100%, the other close to 0%.  Then start another process
> at normal priority and see how the load of that process divides between
> the CPUs, leaving one 50% idle while Prime95 stays on the single CPU it
> has set affinity to (the other).  I tried this on a Windows NT 4.00.1381
> Service Pack 3 Terminal Server.

well, on a regular (non-TSE) NT 4 Server (service pack 4) dual PPro-200, I
ran two instances of prime95, and gave one explicit affinity, and the other
I left default ('run on any CPU').  Guess what?  Both CPU's remained 100%
busy, and both instances of prime95 got 49-50% of the total (per the process
monitor in taskmgr.exe).  This implies to me that it is clever enough to
ALWAYS run the 'floating' process on the free CPU and leave the affined CPU
to the affined process.   Maybe TSE (Terminal Server Edition) has way
different heuristics, I dunno.

-jrp


_________________________________________________________________
Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm
Mersenne Prime FAQ      -- http://www.tasam.com/~lrwiman/FAQ-mers

Reply via email to