diff --git a/interrupts/interrupts-1.md b/interrupts/interrupts-1.md index ae0d858..1c3792e 100644 --- a/interrupts/interrupts-1.md +++ b/interrupts/interrupts-1.md @@ -25,13 +25,13 @@ The first - `Local APIC` is located on each CPU core. The local APIC is responsi The second - `I/O APIC` provides multi-processor interrupt management. It is used to distribute external interrupts among the CPU cores. More about the local and I/O APICs will be covered later in this chapter. As you can understand, interrupts can occur at any time. When an interrupt occurs, the operating system must handle it immediately. But what does it mean `to handle an interrupt`? When an interrupt occurs, the operating system must ensure the following steps: -* The kernel must pause execution of the current process; (preempt current task) +* The kernel must pause execution of the current process; (preempt current task); * The kernel must search for the handler of the interrupt and transfer control (execute interrupt handler); -* After the interrupt handler completes execution, the interrupted process can resume execution; +* After the interrupt handler completes execution, the interrupted process can resume execution. Of course there are numerous intricacies involved in this procedure of handling interrupts. But the above 3 steps form the basic skeleton of the procedure. -Addresses of each of the interrupt handlers are maintained in a special location referred to as the - `Interrupt Descriptor Table` or `IDT`. The processor uses an unique number for recognizing the type of interruption or exception. This number is called - `vector number`. A vector number is an index in the `IDT`. There is limited amount of the vector numbers and it can be from `0` to `255`. You can note the following range-check upon the vector number within the Linux kernel source-code: +Addresses of each of the interrupt handlers are maintained in a special location referred to as the - `Interrupt Descriptor Table` or `IDT`. The processor uses a unique number for recognizing the type of interruption or exception. This number is called - `vector number`. A vector number is an index in the `IDT`. There is limited amount of the vector numbers and it can be from `0` to `255`. You can note the following range-check upon the vector number within the Linux kernel source-code: ```C BUG_ON((unsigned)n > 0xFF);