0

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

tunnuz
  • 23,338
  • 31
  • 90
  • 128

2 Answers2

2

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

Vinicius Kamakura
  • 7,665
  • 1
  • 29
  • 43
1

Most likely they just set the priority of their computation thread(s) to something very low, and then rely on the OS's scheduler to do the rest. Threads/processes with a low priority will only run when no other threads need the CPU time for anything.

Jeremy Friesner
  • 70,199
  • 15
  • 131
  • 234