all tasks (including IO-bound) • Replace existing list-based queues (one per priority level) with a red-black tree • All tasks stored in one rbtree ordered by elapsed CPU time • Task priorities used to determine CPU time slices • Finding next task still constant time; however, removing and inserting tasks into the rbtree is logarithmic
◦ add start/total time fields to uthread_struct_t ◦ add functions for insert/remove/compare of uthreads ◦ replace expires and active CPU run queues • Rewrite uthread_schedule to implement CFS ◦ Get running thread, update CPU time ◦ Insert into zombie queue if done, rbtree otherwise ◦ Call sched_find_best_uthread to get next task in rbtree ◦ Update next task's start time and run it • Point SIGVTALRM and SIGUSR1 at uthread_schedule
execution time with input size ◦ large standard deviations • Limitations ◦ Single timeslice durations used--not dynamically chosen from task priorities ◦ No support for group scheduling, etc.