11-04-2014, 03:47 AM
Your problem is that most computers aren't stupid enough to table 100% of the cpu time to one task. Getting even 50% to one task is a feat in itself.
The only way I can think of to maximize your damage will be to use the SIMD vector operations that most intel computers have, then try to approximate the division of the largest possible number that can be held in the SIMD register and the smallest possible number that fits in the SIMD register and do it using double precision foating point (this is an assembly program). After that, you will need to convince the operating system that this program deserves the right to use more than 50% cpu time (this is a manifest written in C). Aim for a priority level of 26 (this is the windows code for realtime class priority: thread priority highest ), because there is no way in hell the operating system will give you 31 (realtme class priority: thread priority critical). I think it will only allow 11 and under, but just aim for 26. There is good chance you will be flagged as a virus, considering that the program is telling the computer that all user input tasks, the entire operating system shell, and a large portion of the keyboard are of lower priority than your program (they all are at level 13), so your manifest will also need to grant privilege to the task of a higher level than administrator. This privilege level is called SYSTEM; only the login process, device drivers for the memory units, keyboard input buffering tasks, and cygwin have this privilege on a windows computer.
Any task requesting table time will be granted the time before a task of lower priority. All tasks of equal priority share the same amount of time, but will be tabled should a higher priority task arise. A task of priority 31 is granted the maximum possible time, with losses only for the operating system to schedule more time for it to consume.
The only way I can think of to maximize your damage will be to use the SIMD vector operations that most intel computers have, then try to approximate the division of the largest possible number that can be held in the SIMD register and the smallest possible number that fits in the SIMD register and do it using double precision foating point (this is an assembly program). After that, you will need to convince the operating system that this program deserves the right to use more than 50% cpu time (this is a manifest written in C). Aim for a priority level of 26 (this is the windows code for realtime class priority: thread priority highest ), because there is no way in hell the operating system will give you 31 (realtme class priority: thread priority critical). I think it will only allow 11 and under, but just aim for 26. There is good chance you will be flagged as a virus, considering that the program is telling the computer that all user input tasks, the entire operating system shell, and a large portion of the keyboard are of lower priority than your program (they all are at level 13), so your manifest will also need to grant privilege to the task of a higher level than administrator. This privilege level is called SYSTEM; only the login process, device drivers for the memory units, keyboard input buffering tasks, and cygwin have this privilege on a windows computer.
Any task requesting table time will be granted the time before a task of lower priority. All tasks of equal priority share the same amount of time, but will be tabled should a higher priority task arise. A task of priority 31 is granted the maximum possible time, with losses only for the operating system to schedule more time for it to consume.