Upgrade to Pro — share decks privately, control downloads, hide ads and more …

cs6210proj1presentation.pdf

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →
Avatar for dhconnelly dhconnelly
March 23, 2012
37

 cs6210proj1presentation.pdf

Avatar for dhconnelly

dhconnelly

March 23, 2012

Transcript

  1. Completely Fair Scheduler • Goal: fair and timely CPU for

    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
  2. Implementation in GTThreads • Used libavl library for rbtree implementation

    ◦ 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
  3. Results and Limitations • Experimental results: ◦ ~linear increase in

    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.