Page 1 of 1

Interrupt Priorities

Posted: Wed Jul 30, 2003 11:00 pm
by ddas
Intel 386 architecture does not support interrupt priorities.
  How to implement interrupt priority levels in s/w for such a machine ??

RE:Interrupt Priorities

Posted: Wed Jul 30, 2003 11:00 pm
by VE3MTM
That would require some sort of a queuing system inside the kernel, because ISRs block other interrupts until complete (until they execute IRET). You could rig up some sort of a system where interrupt calls are pushed onto a queue when they are received, and whenever the kernel has free time, it leafs through the queue and handles them according to their priority. That's the only way, really.

Another strategy would be to make the ISRs minimal. For a keyboard interrupt, for example, it just pushes the key onto the buffer and sets a flag. Then, the keyboard driver (a seperate thread), reads that and does whatever it needs to, like pass the keystroke to whatever process is listening, etc., but that is done outside the ISR, and thus it can be scheduled properly.

RE:Interrupt Priorities

Posted: Wed Jul 30, 2003 11:00 pm
by Stefan
A good idea anyways, as (in a normal os) when an ISR is running nothing else can.