Adding a new scheduling algorithm to Fiasco.OC

Valentin Hauner valentinhauner at gmx.de
Mon Jun 30 12:08:00 CEST 2014


Hi,

I've added a new config directive for 'sched_edf' to the Modules.* files
in 'kernel/fiasco/src', that is:
PREPROCESS_PARTS-$(CONFIG_SCHED_EDF) += sched_edf
This enables the user to compile the kernel with EDF scheduling when
setting this directive, right?

I want to implement the preemptive EDF algorithm, i.e. any running task
must be preempted if a new task with a shorter deadline arrives.
dominates() from sched_context-edf.cpp and next_to_run() from
ready_queue_edf.cpp are designed to choose the one with the shortest
deadline, but how can I tell Fiasco to act preemptive?

Thanks in advance!

Best regards,
Valentin

On 06/13/2014 10:01 PM, Adam Lackorzynski wrote:
> Hi,
>
> On Thu Jun 12, 2014 at 16:29:43 +0200, Valentin Hauner wrote:
>   
>> I'm planning to add a new scheduling algorithm to Fiasco.OC. I will
>> implement EDF.
>> First of all, is there some handout written by you main developers that
>> copes with the issues of implementing EDF in Fiasco.OC?
>>     
> No, there's no such memo.
>  
>   
>> What I've achieved so far:
>> I've created the files sched_context-edf.cpp and ready_queue_edf.cpp in
>> ./kernel/fiasco/src/kern, using the corresponding source files for your
>> fixed-priority scheduler as templates.
>> I've named the config directive used in ./kernel/fiasco/src/Modules.*
>> files analogous to yours, that is 'sched_edf' in my case.
>> Now, I'm beginning to modify sched_context-edf.cpp and
>> ready_queue_edf.cpp to fit the requirements of EDF, especially the en-
>> and dequeuing as well as the 'dominates' method.
>>
>> Are there any other major source files that I do have to alter?
>>     
> That looks good. You should look at the wfq files as those already
> implement an algorithm that is quite close to EDF.
>
>
>
> Adam
>   




More information about the l4-hackers mailing list