Subj : Re: threads do not get cpa To : comp.programming.threads,comp.sys.sgi.misc From : loic-dev Date : Mon Aug 08 2005 05:08 am Salut Markus, > However, the original question still remains: the number of processors > the program runs on seems unpredictable (at least to me), even after I > have added the pthread_setconcurrency() call. When I create 3 threads, > the program sometimes gets 3 processors, and sometimes just 1 (the SGI > is still mostly empty). > > Is there anything known about the way the number of processors to be > used is determined under IRIX 6.5.24m? I don't have access to a SGI machine, so I can't verify in the practice... However, accordingly to the a manual about IRIX programming, I read: You can specify an initial thread scheduling scope by calling pthread_attr_setscope() and passing one of the scope constants (PTHREAD_SCOPE_SYSTEM or PTHREAD_SCOPE_PROCESS) in the pthread_attr_t object. By default, process scope is selected and scheduling is performed by the thread runtime, but thread scheduling by the kernel is provided with the system scope attribute. System scope threads run at real-time policy and priority and may be created only by privileged users. You may need to select system contention scope (PTHREAD_SCOPE_SYSTEM) to obtain the wanted bahavior. With regards, Loic. .