You will find a couple of posts which describes an interrupts and an exceptions handling in the linux kernel.