DragonFly kernel List (threaded) for 2008-07
DragonFly BSD
DragonFly kernel List (threaded) for 2008-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Proportional share scheduler

From: "Bhosle, Mayur N" <mbhosle3@xxxxxxxxxx>
Date: Tue, 1 Jul 2008 19:16:46 -0400 (EDT)

Hi all,
          I have implemented a O(1) proportional share userland scheduler, it is based on Virtual-Time Round Robin (VTRR)Algorithm. I modified the implementation to make it O(1) for SMP. Some of the important points related to the implementation are as follows:

1. Instead of single run queue in case of current scheduler, i have separate run queues per processor.  
2. New process is assigned to run queue of a free processor if one exists, or else on next run queue in the round-robin sequence. Most of the time the run queues are equally loaded.
3. When a process comes back, it assigned to the same run queue as it was earlier assigned to, but not in case any processor is free. 
4. The Share of the process depends on the Real-Time priority class of the underlying thread.
5. The processes on the run queue are always maintained in decreasing order of the share value, selection of next process to run is just selecting the first process from run queue.
6. I haven't added any new APIs, but the modified the code for the APIs provided in the dummy scheduler.  

Currently i have tested the scheduler for 1-8 cpus and it is working fine. The performance is as good as the current scheduler. I used the "hackbench.c" code to compare the performance. 

Few things that are left for successfully completing scheduler for SOC. 
1. How do you guys test performance of the current scheduler, are there any standard benchmarks that i should run to give a fair comparison of the two schedulers.
2. I have to design Command Line interface for this scheduler so that you can specify the share at the time of executing the command. I need some suggestions on this. If you can tell some of the possible commands that you would like to have, that would be helpful. for example

     "pshare -s 20 top" : this command will assign 20% cpu to top.

    Currently using the nice command does affect the share of the process.
3. Any general suggestions that will make this scheduler good enough to be a part of code base would be really helpful.

    Looking forward to your replies.

College of Computing

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]