Search code examples
multithreadingperformanceprocessboinc

How to adaptively adjust performance to CPU usage?


there. I don't even know if this question makes sense, however: how do BOINC-based applications adapt their performance so that they only use "free" CPU, without affecting the execution of user's applications?

Thank you,
Tunnuz


Solution

  • They set their process priority to the same as the idle thread?

    In windows SetPriorityClass() about IDLE_PRIORITY_CLASS:

    Process whose threads run only when the system is idle. The threads of the process are preempted by the threads of any process running in a higher priority class. An example is a screen saver. The idle-priority class is inherited by child processes.

    More about scheduling priorities in windows here