Hi,
I'm facing an interessting effect within my application when using multiple pthreads that execute computation intensive tasks. When the threads start processing the data, the main thread function takes ~20 ms for a single loop of processing. This time stays constant for a couple of seconds. After that, the computation time rises to ~80 ms. The thread is sill doing the same kind of work, just with different values, so I would expect the execution time to stay constant.
The initial approach to resolve this was to specify a Quality of Service Class for the pthreads involved. This indeed solved the problem for that time. Now the amount of data to process is getting bigger and the QOS setting seems to not work anymore. I'm now facing the same execution time changes as at the beginning.
Is there anything else I can do except of setting the QOS when the pthreads are created?
That's the API I'm using to set the QOS class for the pthread.
pthread_attr_set_qos_class_np(&qos_attr, QOS_CLASS_USER_INTERACTIVE, 0);
I'm running the application with standard Release build configuration.
THX!