How to set mximum allowed CPU time for a process ?
I am trying to play Heroes Of Might and Magic III (under wine) and after some hours of play my system just rebooted.
I looked for the CPU temp and it was 46 °C.
I know this game uses 100% CPU time, even though it gets more FPS than needed, and I think it over-heats my system.
Is there a way to tell my system that process 3851 can only have 25% CPU time and no more (like the task scheduler to suspend it 10 times per second for 75ms each and only let it run 25ms) ?
Simply setting the process to low priority would not help.
I think it would not be complicated to write a program that suspends and resumes a process many times per second, as long as you know the API. Has anyone had a need for something like this before ?
I have (Slackware) Linux 2.6.24 i686 AMD Sempron.