[LITMUS^RT] Implementation of limited-preemptive scheduling

Björn Brandenburg bbb at mpi-sws.org
Fri Jul 15 10:51:07 CEST 2016


> On 15 Jul 2016, at 10:24, Yuanbin Zhou <hduffddybz at gmail.com> wrote:
> 
> Recently there is a great deal of papers[1,2,3] dealing with the analysis and design of limited preemptive policy under fixed priority or earliest deadline first scheduling algorithm on a uniprocessor platform. Most parts of the theoretical problems have been solved in the real-time community although there still exists some open problems like the preemption points placement in a more general situation. I think it is reasonable to implement it on the litmus_rt system although there exists simulator for this kind of algorithm http://yaosim.sssup.it/.
> 
> Since yuanbin(me) and gaosheng in the CC list are newbies about litmus_rt and there is no manual for developers as far as we know, it is hard for us to estimate whether it is possible to implement this kind of algorithm. Can anyone tell us especially to gaosheng who will write most parts of the code how can we start?


Dear Yuanbin,

thanks for your interest in LITMUS^RT. Yes, limited-preemptive scheduling can be implemented in LITMUS^RT. In fact, LITMUS^RT already supports some form of non-preemptive scheduling via the “do not preempt flag” (NP flag) in the control page (see https://github.com/LITMUS-RT/liblitmus/blob/master/src/kernel_iface.c#L128). 

You can probably go a long way towards limited-preemptive scheduling just by reusing the NP flag. If you think you need to implement a custom plugin to achieve your objectives, I would suggest to use the P-FP or P-EDF plugins as a starting point: make a copy, rename the plugin, understand the preemptive scheduling logic, and then change it according to your target policy.

Regarding documentation, you’ll have to read the code; it should be reasonably clear but it does take some effort.

Best regards,
Björn





More information about the litmus-dev mailing list