Boost::thread scheduling under HPUX
Under heavy load, my HP-UX 11i application can run multiple, CPU intensive boost::thread's. Unfortunately, this has the side effect that other processes suffer in terms of performance. I initially thought that decreasing the nice value of my app would do the trick and ensure that other processes with a higher value would get priority by the kernel scheduler. However, this does not appear to be true (my app's nice value is 30 when most other processes run at 20). The requirement of my app is to run only whenever the system is idle. Is there a way this can be done using boost::thread or does anybody know how I could configure my process under HP-UX so that it behaves as intended?
Thanks for the hint Brian. I can easily create another thread that can pause/resume the other worker threads, but I have no idea how this thread could constantly and non-intrusively monitor system load. -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Brian Allison Sent: Saturday, 19 November 2005 2:21 a.m. To: boost-users@lists.boost.org Subject: Re: [Boost-users] Boost::thread scheduling under HPUX AFAIK Pete, there are no POSIX hooks for doing this by way of having the kernel control the sleeping status of a program wrt the load factor. The typical approach for this problem involves having a control thread whose purpose is to control the work speed of the threads. This usually involves a programmatic solution - the nice values are only suggestions to the scheduling routine IIRC.
participants (2)
-
Brian Allison
-
Pete