I am working on rewriting a program on HP-UX. Orignally it use fork() and now it is using pthread. It turns out the performance of new code is much worse (about 30-50%). Since thread is supposed to be much light-weight than process, I believe it is the scheduling causes the new code slow. So, I tried to change the thread attribute so that it use PTHREAD_EXPLICIT_SCHED and
PTHREAD_SCOPE_SYSTEM. But then pthread_create() returns EPERM, which indicates that the parent thread does not have appropriate privilege.
Does HP-UX allows to change thread attributes? I appreciate your helps!
PTHREAD_SCOPE_SYSTEM. But then pthread_create() returns EPERM, which indicates that the parent thread does not have appropriate privilege.
Does HP-UX allows to change thread attributes? I appreciate your helps!