Concurrency and Asynchronous Programming: a Detailed Overview 22 Interrupts As you know by now, there are two kinds of interrupts: Hardware interrupts Software interrupts They are very different in nature. Hardware interrupts Hardware interrupts are created by sending an electrical signal through an IRQ. These hardware lines signal the CPU directly. Software interrupts These are interrupts issued from software instead of hardware. As in the case of a hardware interrupt, the CPU jumps to the IDT and runs the handler for the specified interrupt. Firmware Firmware doesn't get much attention from most of us; however, it's a crucial part of the world we live in. It runs on all kinds of hardware and has all kinds of strange and peculiar ways to make the computers we program on work. Now, the firmware needs a microcontroller to be able to work. Even the CPU has firmware that makes it work. That means there are many more small 'CPUs' on our system than the cores we program against. Why is this important? Well, you remember that concurrency is all about efficiency, right? Since we have many CPUs/microcontrollers already doing work for us on our system, one of our concerns is to not replicate or duplicate that work when we write code. If a network card has firmware that continually checks whether new data has arrived, it's pretty wasteful if we duplicate that by letting our CPU continually check whether new data arrives as well. It's much better if we either check once in a while, or even better, get notified when data has arrived.