Training
×

Interrupt Hardware

The original PC used one 8259A programmable interrupt controller (PIC), later a second one was added. These days, the exact chips are no longer used, but almost the same functionality is implemented in chipsets and/or APICs. For our discussion here the difference between a PIC and an APIC is not relevant.
By default, the INtime software takes over the system clock (IRQ0). In the INtime for Windows “shared mode” configuration the clock interrupt is multiplexed between INtime and Windows. In the INtime for Windows “dedicated mode” configuration the clock interrupt is only used by INtime.
RT applications can take over other interrupts but must ensure that Windows drivers do not try to use the associated devices (such as the keyboard, mouse, etc.).
When an interrupt occurs and no interrupt is being processed yet, an interrupt vector is determined; the current processor context  (CS:EIP, flags) is saved on the current stack and the address of the next instruction is extracted from the Interrupt Descriptor Table (IDT); at the same time the ‘in-interrupt’ flag is set. That flag and the processor context are restored when the interrupt handler returns with an IRET instruction.