Subject: Re: MP scheduling
To: Dave Huang <khym@azeotrope.org>
From: Tim Kelly <hockey@dialectronics.com>
List: port-macppc
Date: 11/11/2004 12:36:46
Hi Dave,

> Not sure what you mean... with the default options, make only launches
> one worker process at a time. Since the compiler is single-threaded,
> that single process can't use more than one CPU simultaneously. The OS
> schedules it to run on one CPU or the other for each timeslice, so you
> see it running on both CPUs, but since it's running on one then the
> other, rather than on both at the same time, you won't see usage >
> 100%. When you use -j2, make will launch two worker processes, so
> you'll see both CPUs used at the same time.

I think I understand. Basically, since top only updates every two
seconds (default), it sees the CPU usage from a 10,000 foot level. The
thing I don't fully understand is that sometimes I would two or more
nbmake processes, so it looked to me that to some degree there was some
parallelization of the build process. I do understand why the compiler
itself stayed on one CPU during an object file build, though. That would
be hard to parallelize.

tim