What to do with those idle cores?
cacm.acm.org
cacm.acm.org
Given that technologies like speedstep allow the voltage and frequency of a cpu to be modified dynamically, and that power consumption is governed by P = CV^2f:
Say we have a CPU with 4 cores with each core equivalent to a 1.6 GHz Pentium M. According to Wikipedia, the clock frequency on such a device can be stepped in 200 MHz increments over the range from 1.6 to 0.6 GHz. At the same time, the voltage requirement decreases from 1.484 V to 0.956 V.
So, say you have a workload that keeps one 1.6GHz core pegged to near 100%. Instead, why not spread this work to 3 cores, while lowering the speed to 0.6GHz and the voltage to 0.956V?
This would be equivalent to a 1.8GHz machine.
Would this save energy? The original power factor is:
1 core * (1.484^2) * 1.6 = 3.52
The new power factor is:
3 cores * (0.956^2) * 0.6 = 1.645
So, about half the power for this example. Of course, nothing is perfect, and spreading your workload amongst 3 cores will lose efficiency, and gain implementation complexity.
A practical consequence of this appears on a modern Core2 laptop, if you have a computational task of fixed size and let it run, once with speedstep locked to the lowest level and once with dynamic clocks. Obviously the dynamically clocked one will finish more quickly and sit idle after that. If you let it sit idle until the low-clocked one has finished, you'll find the low-clocked one will have consumed more total energy. This means that for occasional-load scenarios, the dynamic clocking gives longer battery life, and for heavy load it gives shorter waits.
Spreading does make sense even in this light of course, as things like shared caches, memory and bus controllers need to run as soon as at least one core is active.
Furthermore when all but one core is shut down, the clock speed of the remaining core can actually go UP by about 200mhz (called Turbo mode), providing a speed benefit to a single-threaded task.
Qt specifically now has support via QtConcurrent for map and map-reduce patterns that are automatically farmed out to a threadpool the same size as the number of cores and it handles most of the hairy bits of doing threading.
I've had to patch it heavily for my own use, but it's still a promising advance. I suspect we'll see more of the same in toolkits in the future.
I only thought of these tasks:
In a word processing: we can load grammar and nlp engines and download and analyze trends in web text for improve suggestions in nearly real time, also trying to understand what the user is writing and aiding to improve not only orthography and grammar but style too, for example.
In Web search, personalizing the whole searching and browsing experience downloading and processing partial results and with intelligent assistants running in the background (this is my favorite).