Scheduler and ready queue