preemptive scheduler working