Question: what is the key difference between a trap and an interrupt?
Answer: The main difference between trap and interrupt is that trap is triggered by a user program to invoke OS functionality while interrupt is triggered by a hardware device to allow the processor to execute the corresponding interrupt handler routine. An operating system is event-driven.