implement the kernel preemption