Tick accounting and processing
clock() is also responsible for driving tick accounting...which (every tick) examines the thread currently running on each of the system's CPUs, and invokes the appropriate scheduling class specific tick processing routine.
With callout tables being per CPU, one approach could be to have each CPU handle time quantum expiration, and other scheduling class related tasks synchronously for the threads running on that CPU. When a thread gets the CPU, a timeout can be enqueued to fire when that thread's time slice is scheduled to expire.
on 2009/10/26 12:17