multithreaded in HP-UX

GurcanK used Ask the Experts™
I have a question about multi threading in HP-UX.
Although I can compile and link my multi-threaded source code(C++) successfully, it does not improve the performance of the application in comparison to single threaded state of the same app.

I compile like this:
 g++ *.cpp -lpthread -D_POSIX_C_SOURCE=199506L -D_REENTRANT  -o multiApp

Thanks for the help..
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
1. There is a class of programs that their *optimal* variant won't benefit from multithreading.
2. I don't know what is wrong with your program. There can be a big set of things that stop the application from being multithread-effective.
3. I don't know how do you measure the performance.

So, pseudocode can be welcome.
Also, exact OS version, CPU type/frequency/quantity should be mentioned.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial