site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Mar 17, 2007, at 9:48 AM, Tony Scaminaci wrote: = Mike _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... My question relates to the difference between use of fork/exec to launch multiple processes and the use of pthreads. What I want is a guarantee that if the machine has 4 CPU's, all 4 will run a portion of the overall memory tests by launching four separate test processes with each one testing 1/4 of the available memory. I can't find any documentation regarding the difference between pthreads and fork/exec nor anything that states definitively that launching X number of threads or processes will spread those processes or threads across all X CPU's. Can someone please shed light on this and let me know which route I should go? There is no mechanism currently provided for strongly binding a thread to a specific execution context. This is traditionally something grossly abused by application developers that think that the OS should have no part in deciding what is and isn't important. The system reserves the right to schedule your threads as it sees fit; that being said if the system is otherwise idle, is not being power managed for thermal, acoustic or administrative reasons, and you have at least one thread per execution context, you can reasonably expect that on current systems you will run on all of them for much of the time. There will be *no* correlation between thread and CPU package/core, so you're not going to be able to say "this thread detected a cache error so this CPU is defective". There are interfaces to take CPUs offline, however, so you may want to consider a process of elimination in the situation where you have detected a cache error. This email sent to site_archiver@lists.apple.com