On 18/06/2015 06:41, zhou weitao wrote:
A partial solution might be if each task could request a fraction
of a CPU.
But CPU fraction is Time-Division. I don't think it's possible to
request a fraction.
Because it's timeslicing, there should be no problem at all requesting
fractions. For example if you request 0.5 CPUs, then your application
can run on one CPU for up to 50% of the time; or it could run on 2 CPUs
for 25% of the time.
There's a nice diagram here:
http://aurora.apache.org/documentation/latest/resource-isolation/
Having said that, I'm not sure where the 100ms timeslices in that
diagram come from. I'm pretty sure the Linux kernel CFS scheduler does
not work in that way.
https://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt
"CFS uses nanosecond granularity accounting and does not rely on any
jiffies or
other HZ detail. Thus the CFS scheduler has no notion of "timeslices"
in the
way the previous scheduler had"
Maybe that diagram is out-of-date?