checkout to branch duc
changed thread_set_priority, thread_unblock, next_thread_to_run. Doesnt pass tests. Need more research