So the order in which i give data from the keyboard and the mouse at the same time, doesn't matter? Or must i give the keyboard higher priority, so that IRQ1 cannot go wrong? (Since it always expects keyboard data)
Is this the kind of thing you're asking about? This kind of stuff hasn't been a concern on PC's for a few decades. When or if this happens a hardware exception is thrown, the kernel catches it, and offsets one of the requests to be the next one processed. Like Duoas said, this happens so fast that you'll never see it. If you're building your own PIC's however that's another story, how this issue is dealt with is platform dependant.
I'm currently working on emulating an 80(1)86 on a PSP (333 or 222MHz ARM CPU). Almost everything is working and implemented, only got the VGA, Keyboard/Mouse/PS/2 Controller and some little bugs in the CPU left. Currently have given keyboard input priority over mouse input, when there's both, to prevent IRQ1/12 Conflicts (both keyboard and mouse get input of port 0x60). Is this OK?