Implement priority scheduler.
Fix priority scheduler. Modify join method.