[G4] How many applications currently take adavantage of

Cameron Kaiser spectre at stockholm.ptloma.edu
Mon Feb 10 20:11:17 PST 2003


> I thought all apps get the advantage of dual 
> processors in OSX as the system itself is dual 
> aware and parcels out "all" the work to the 
> processor it chooses. As I understood in OSX it is 
> 'illegal' for an app to choose its own destination 
> or do many other things directly with the hardware 
> as it did in OS 9. Everything must pass through 
> the system now.
> Hey, if I am wrong here, let me know.

No, you're right, but there are multiple ways to be right in this case :-)

In a truly threaded application, which is the optimal case, the application
is broken down into multiple threads (execution units), each with a set of
tasks, which can be farmed out to run simultaneously on multiple processors.
Applications of this type are the minority, though the growing minority.

In a non-threaded application, which is the typical case (at least right
now), the application runs on only one processor. However, the application
could be run on any processor (not just the "main" one like in OS 9
multi-processing), and keep in mind that in the process of its operation it
must call the operating system to do tasks, and there are lots of threads
in OS X which can happily run on any processor at the same time. Moreover,
other applications, even non-threaded ones, can be running on the other
processor(s) anyway. In fact, unlike multi-processing in OS 9, not even the
scheduler must run on the "main" processor -- there is no more concept of
a "main" CPU, anyway.

So everything benefits, just not in the same manner.

-- 
----------------------------- personal page: http://www.armory.com/~spectre/ --
 Cameron Kaiser, Point Loma Nazarene University * ckaiser at stockholm.ptloma.edu
-- Remember, kids: for great justice take off every zig! ----------------------



More information about the G4 mailing list