Fork/Exec vs pthread
Fork/Exec vs pthread
- Subject: Fork/Exec vs pthread
- From: Tony Scaminaci <email@hidden>
- Date: Sat, 17 Mar 2007 11:48:29 -0500
I've got a memory test application that runs in both a terminal
window as well as in single-user mode. It has recently come to my
attention that because my app is only exercising one of the CPU's on
multi-processor machines, I can't adequately test the CPU cache paths
for the other processors. My app can catch cache failures so it's
imperative that I be able to test all processors on a given machine.
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?
Thanks,
Tony
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden