Testing applications that could use lots of cores.
Testing applications that could use lots of cores.
- Subject: Testing applications that could use lots of cores.
- From: Jay Reynolds Freeman <email@hidden>
- Date: Thu, 08 Oct 2009 12:59:01 -0700
In another thread here, someone mentioned running with 16 cores on a
Mac. I am most carefully not enquiring how such a happily parallel
situation came about (I suspect Nehalem virtual cores), but that
comment does bring up the issue of how one might reasonably test an
application that could in principle use more physical processor cores
than one has available.
My particular application uses multiple Unix processes, coupled by
mmapped shared memory, and uses OSAtomicTestAndSet for critical-
section access-control involving the shared memory. When I switched
from a two-core machine to an eight-core one, a lot of, er,
interesting bugs fell out of the tree, even though I had done hundreds
of hours of testing in the former. I became somewhat worried that
maybe the Unix process switcher was not switching randomly enough to
catch all the possible places where I might have messed up critical-
section access. (In defense of the switcher, I will confess that I
have cause to believe that I am remarkably talented at messing up
critical-section access.) I actually do not have any presently known
problems of this kind (knock on wood), but it would be very useful if
there were a way to simulate the presence of extra processors for test
purposes, so that I would not be unpleasantly surprised if Apple
should ever happen to ship a machine with more than eight processors.
In the Xcode documentation I find plenty of ways to disable
processors, but no way to fake more of them.
Any suggestions?
-- Jay Reynolds Freeman
---------------------
email@hidden
http://web.mac.com/jay_reynolds_freeman (personal web site)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden