Discussion of chess software programming and technical issues.
Moderators: bob, hgm, Harvey Williamson
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
- Posts: 4675
- Joined: Mon Mar 13, 2006 6:43 pm
A Nice routine
If you are using your computer for running your chess program and at the same time for browsing TalkChess, you might want to have your chess program running at a lower priority. You can do this manually with the renice
command, or you can build the same functionality into your program. The routine is:
Code: Select all
const int rc = setpriority(PRIO_PROCESS, 0, 20);
if (rc != 0)
Die("Nice", "Bad setpriority");
For details: http://www.unix.com/man-page/Linux/2/setpriority/
- Posts: 24655
- Joined: Fri Mar 10, 2006 9:06 am
- Location: Amsterdam
- Full name: H G Muller
Of course you can also instruct the GUI to run the engines at lower priority. E.g. with XBoard using the option -niceEngines N.
- Posts: 238
- Joined: Tue Jul 12, 2011 11:31 am
Maybe cpulimit is worth bearing in mind too:
Two first meanings of the dutch word "leren":
1. leren [vc] (learn, larn, acquire) acquire or gain knowledge or skills.
2. leren [v] (teach, learn, instruct) impart skills or knowledge to.
- Posts: 4600
- Joined: Tue Feb 28, 2012 10:56 pm
Let's open a thread for each posix function.
- Posts: 11238
- Joined: Wed Mar 08, 2006 7:57 pm
- Location: Redmond, WA USA
hgm wrote:Of course you can also instruct the GUI to run the engines at lower priority. E.g. with XBoard using the option -niceEngines N.
That is a much better way of doing it. Arena has this feature also.