[uClinux-dev] Re: realtime scheduling...

Miles Bader miles at lsi.nec.co.jp
Sun Mar 16 20:41:15 EST 2003


"John Willlams" <jwilliams at itee.uq.edu.au> writes:
> I was thinking it might be good to put a big wall between the real-time and
> non real-time aspects of a system (and application).  So, by hanging
> everything truly "real-time" off the NMI (using a 2nd interrupt controller),
> and everying related to uClinux of the maskable interrupts, the two can be
> pretty much completely ignorant of each other (except for a data tunnel from
> one side of the wall to the other).

Someone posted to the LKML about an interesting RT technique they're using
for linux, which is to basically have all interrupts go to an underlying
super-nano-pico-thing who's job is basically only to distribute interrupts,
using a priority-sorted queue of willing interrupt handlees.  The kernel's
low-level interrupt ops (sti, cli, etc) are replaced by equivalent `put the
kernel in the interrupt queue' and `remove the kernel from the interrupt
queue' calls to the super-nano-pico-thing [or perhaps they just toggle a
bit somewhere so they're fast].

Anything that has to be RT can then be stuck into the interrupt-handlee-
queue at a higher priority than the kernel, which will allow it to
completely ignore the kernel -- it will get any interrupts it wants with no
delay.

This technique seemed very cool compared to a conventional
`RT scheduler underneath linux', since:

 (1) The super-nano-pico-thing is _extremely_ simple and light, since it's
     not a scheduler at all, and has no concept of anything except
     interrupts and handlers (i.e., it doesn't have to think about
     `processes' or anything).  Thus it's likely to be very fast and robust.

 (2) The modifications to linux were very minor, since the underlying RT
     stuff looks to linux like just some sort of slightly odd interrupt
     controller.

 (3) I think it also managed to avoid some patents held by the RT-linux guys.

[Does anyone remember the name of this stuff?]

Sorry if this is all old-hat to everyone (I'm not a RT guy)!

-Miles
-- 
Suburbia: where they tear out the trees and then name streets after them.



More information about the uClinux-dev mailing list