Setting the environment variable AIXTHREAD_SCOPE to S, or modifying your program. The AIX documentation states:
"AIXTHREAD_SCOPE={P|S}, where P signifies process based contention scope and S signifies system based contention scope. Either P or S should be specified. The braces are provided for syntactic reasons only. The use of this environment variable impacts only those threads created with the default attribute. The default attribute is employed, when the attr parameter to pthread_create() is NULL."
"If you do not pass a NULL to the pthread_create() function, you must change your program and rebuild it to set the contention scope of created threads to system scope.
"For example:
pthread_attr_t attr;
pthread_attr_init (&attr);
pthread_attr_setscope (&attr,
PTHREAD_SCOPE_SYSTEM);
pthread_create (&tid, &attr, worker_function, 0);
"This forces the scheduler to keep exactly as many kernel threads as user threads, and to eliminates the problems we have seen with the library.