So if I press a key (IRQ 1) at the same time the PIT (IRQ 0) goes off, will my keypress be ignored? or will it just be sent to the CPU after the PIT interrupt is handled?Note that interrupts are handled by priority level: 0, 1, 2, 8, 9, 10, 11, 12, 13, 14, 15, 3, 4, 5, 6, 7. So, if IRQ 8 and IRQ 3 come in simultaneously, IRQ 8 is sent to the CPU. When the CPU finishes handling the interrupt, it tells the PIC that it's OK to resume sending interrupts
And what if an IRQ 0 fires while an IRQ 1 is in the process of being handled (IRQ 1 handler called, but no EOI yet)? I can't imagine it would interrupt the interrupt handler, but that would mean a higher priority IRQ has to wait for a lower one to finish...
And what if the PIT is set to a really high frequecy, and a stupid OS developer made an interrupt handler for IRQ 1 that takes multiple PIT ticks to finish? Would the CPU receive only one IRQ 0? or would it receive multiple IRQ 0s back-to-back? or just none at all?