It depends on how much other tasks have used from their timeslices.
The timeslice is 20 ticks (200 ms on x86). The deeper into a
timeslice, the lower the dynamic priority of a task.
At the beginning of it's timeslice, a task has dynamic priority 20.
Each timer tick it decrements by 1 (if it's still on the CPU), until
it reaches 0, at which point a reschedule is done.
When *all* processes on the run queue have exhausted their timeslices,
the dynamic priorities of all processes are recalculated.
Worst case, if your bursting threads have amost used up their
timeslices just before they went to sleep, they may wait 17 ticks (170
ms on x86) to get the CPU. However, if your bursting threads are
mostly idle, they will have a high dynamic priority, so most of the
time they will be scheduled immediately, or one or two ticks later.
This is the theory. Go forth and benchmark your application.
Regards,
Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/